Re: A Formula for Pi
- From: Michael Press <rubrum@xxxxxxxxxxx>
- Date: Sun, 22 Jun 2008 23:18:06 -0700
In article <_eydnathcdmdo8LVnZ2dnUVZ_s3inZ2d@xxxxxxxxx>,
James Waldby <no@xxxxx> wrote:
On Sun, 22 Jun 2008 18:01:25 -0700, Michael Press wrote:
[...] James Waldby <no@xxxxx> wrote:[...]
On Sat, 21 Jun 2008 21:37:06 -0700, Michael Press wrote:
[...] Mensanator <mensanator@xxxxxxx> wrote:[...]
[Call this series R]But I would prefer a series that converges in ~300 terms to the one
that converges in ~10**34 terms.
How about Ramanujan's series that gets eight decimal places for each
term?
1 2.sqrt{2} (4n)! [1103 + 26390n]
-- = --------- sum_n ------- ---------------
pi 9801 (n!)^4 (4*99)^4n
M. previously said he is using gmp rational arithmetic, so might rule
out R because of its sqrt(2) multiplier.
Good rational approximations to sqrt{2} are easy to get.
On a different
tack, computing one term of R is as expensive as computing several
terms of Machin's formula. (Perhaps 13 multiplies, 1 divide,
No divides.
Ok, right -- rational arithmetic. Also, I know 13 is wrong; I
counted the same complement of 10 multiplies you show below but
overlooked it when posting earlier.
(4n)! --> (4(n+1))! 4 multiplies
(n!)^4 --> ((n+1)!)^4 3 multiplies
(4*99)^(4n) --> (4*99)^(4(n+1)) 1 multiply
Multiplication of terms: 2 multiplies
and some adds per R term,
vs. 2 multiplies, 1 divide, and some adds per Machin term.)
Likewise, with gpm rational arithmetic there's no divide per term
for the Machin calculation of pi/4 = 4 atan(1/5) - atan(1/239),
with atan(x) = x - x^3/3 + x^5/5 - ... (or in the Machin variants
noted by Rob Johnson). All these methods - R included - may need
additional multiplies to create common denominators while adding
up terms.
Agreed.
--
Michael Press
.
- References:
- Re: A Formula for Pi
- From: José Carlos Santos
- Re: A Formula for Pi
- From: Maury Barbato
- Re: A Formula for Pi
- From: Mensanator
- Re: A Formula for Pi
- From: Rob Johnson
- Re: A Formula for Pi
- From: Mensanator
- Re: A Formula for Pi
- From: Michael Press
- Re: A Formula for Pi
- From: James Waldby
- Re: A Formula for Pi
- From: Michael Press
- Re: A Formula for Pi
- From: James Waldby
- Re: A Formula for Pi
- Prev by Date: Re: A Formula for Pi
- Next by Date: largest prime
- Previous by thread: Re: A Formula for Pi
- Next by thread: Re: A Formula for Pi
- Index(es):
Relevant Pages
|