Math help: Calculate pi using Gregory's Series on Beowulf?
Chris Richard Adams
chrisa at ASPATECH.COM.BR
Fri Aug 3 12:19:29 EDT 2001
I found a link to compute pi using Gregory's Series. It states the form
allowing quickest convergence
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
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.
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
More information about the Beowulf