That is, obviously, identical
But isn't it cool that he used your formula program?
I read it incorrectly... not sure why. Oops. Maybe I should start puting my glasses on in the morning.
In any case, this sort of formula converges rediculously slowly.
After 100,000,000 itterations (~2.5 seconds), this code:
pi += (4 / (mode * numerator));
numerator += 2;
mode *= -1;
itteration++;
Thinks pi is:
mullins@grays:~/src/c$ time ./pi
3.1415931
real 0m2.773s
user 0m2.764s
sys 0m0.008s
Pi really is: 3.14159265 (to the 8th digit)
So it would be asinine to calculate pi in place of using a file that stores its digits to 1,000,000 places.