Tuesday, December 28, 2010

Prices List Amc Cookware

Matlab problems to solve large products

Solve Euler project has become a daily habit and more to discover that we advance in the list the problems get more and more interesting, however there are some really simple solution, the question is to give the best look to avoid a brute force algorithm that consumes too much processing time when not strictly necessary (although this type of algorithm is good to create them because they leave open the interesting code changes).

However, although he continued to solve problems, today I want to say something very interesting that met yesterday to attempt to resolve the problem 20 proposed to determine the sum of all digits of the 100!, Really easy to work and that using num2str function and its inverse str2num can build a string vector with the vectors and add all the entries in this vector, the error appeared to get the final result because it does not coincide with that calculated on my calculator (Texas Instruments Voyage 200).

After a rigorous treatment of the issue found that:

Texas Instruments Voyage 300 Net operating

50 * 49 * 48 * 47 * 46 * 45 * 44 * 43 * 42 * 41 * 40 * 58150627116341760000 39
is

Matlab R2008b (GNU / Linux Debian Squeeze)
the same operation results
58150627116341755904

and from 39, the factor of 100 change with respect to the results obtained in calculator as a pedal (manual check done).

Explanation?? I wish I had answers
.

esDebian

0 comments:

Post a Comment