Math help: Calculate pi using Gregory's Series on Beowulf?

Carlos O'Donell Jr. carlos at baldric.uwo.ca
Fri Aug 3 11:10:55 PDT 2001


> > I found a link to compute pi using Gregory's Series. It states the form
> > allowing quickest convergence
> > is..
> > 	pi = 2*sqrt(3)*[ 1 - (1/(3*3)) + (1/(5*3^2)) - (1/(7*3^3)) ... ]
> > In the example for computing pi that comes with MPICH/MPI-Beowulf, I see
> > something like...
> > 
> > 	Sum = Sum + 4 * [ 1 / ( 1 + ( 1/n * ( i - 0.5 ) )^2 ) ]
> > 	- then, pi = 1/n * sum
> 
> This is different:
> pi = 4 arctan(1) and arctan(x) = int_0^x[dy 1/(1 + y^2)]
> If you want to know how to calculate pi check 
> http://www.cecm.sfu.ca/projects/pihex
> Did you know that the quadrillionth bit of pi is '0' ?
> Martin
>

You can also check out:

http://numbers.computation.free.fr/Constants/Pi/pi.html

The artcan calucation of pi has logarithmic convergance, and 
thus is a very poor performer. See the AGM algorithms used today!

http://numbers.computation.free.fr/Constants/Pi/piclassic.html
http://numbers.computation.free.fr/Constants/Pi/pigeometry.html

http://numbers.computation.free.fr/Constants/Pi/piAGM.html

I think I'll have to go pickup a "calculate pi" program and see
how big I cang get it! :)

Enjoy!

Cheers,
Carlos.




More information about the Beowulf mailing list