Math help: Calculate pi using Gregory's Series on Beowulf?
Robert G. Brown
rgb at phy.duke.edu
Fri Aug 3 19:34:29 EDT 2001
On Fri, 3 Aug 2001, Chris Richard Adams wrote:
> Thanks, but I don't understand your notation:
>
> arctan(x) = int_0^x[dy 1/(1 + y^2)]
>
> how is a function of x dependent on y? I'll look this up, but is this
An INTEGRAL of y. With x as an upper limit. I'm too lazy to actually
do it, but try either integrating by parts or expanding (1+y^2)^-1 in a
taylor series and then integrating -- that sort of thing. There's
probably a simple trick for converting this into a series.
rgb
> where you are saying the expression in mpi-beowulf/examples/ came from?
>
> Thanks
>
> > -----Original Message-----
> > From: Martin Siegert [mailto:siegert at sfu.ca]
> > Sent: Friday, August 03, 2001 2:49 PM
> > To: Chris Richard Adams
> > Cc: beowulf at beowulf.org
> > Subject: Re: Math help: Calculate pi using Gregory's Series
> > on Beowulf?
> >
> >
> > On Fri, Aug 03, 2001 at 01:19:29PM -0300, Chris Richard Adams wrote:
> > > 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.
> >
> > 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
> >
> > ==============================================================
> > ==========
> > Martin Siegert
> > Academic Computing Services phone:
> > (604) 291-4691
> > Simon Fraser University fax:
> > (604) 291-4242
> > Burnaby, British Columbia email:
> > siegert at sfu.ca
> > Canada V5A 1S6
> > ==============================================================
> > ==========
> >
>
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
>
--
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
_______________________________________________
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
mailing list