Math help: Calculate pi using Gregory's Series on Beowulf?
Chris Richard Adams
chrisa at ASPATECH.COM.BR
Fri Aug 3 09:19:29 PDT 2001
Calulating Pi.
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 ) ]
where we iterate n times and i increments from 1 to n.
- then, pi = 1/n * sum
ANyone see how to get from Gregory's series to this form, or does this
form evolve from a different
approach? I'll keep trying... any feedback is appreciated.
Chris
More information about the Beowulf
mailing list