Simon Plouffe wrote:
Hello,
I was reading an article on the ENIAC, that monster could add 100,000 10 digits numbers in 1 second. At the time it was impressive in 1946 of course.
I made this simple test, a naive test.
I took maple 11, with a 3.0 Ghz PC pentium. ##################################### Digits:=10:
som:=0: for i from 1 to 1e99 do: som:=som+1.0/i:
1) 2 operations are made at each step. 2) the program is NOT optimized. 3) programmed in C, this would be a zillion times better.
Ok, it don't know anything about Maple but I am quite sure that Digits:=10, does not mean it should use integer unit with 10 decimal digits, right? So then (i) you compare floats with integers, (ii) you have divisions which are normally more expensive than additions. How fast is adding the first n (according to Gauss you can go up to n approx 2^16 before an overflow occurs) integers (32 bit) in a loop with maple? regards Christoph