Re: A Formula for Pi



In article <yradnT-8e4hodsDVnZ2dnUVZ_rHinZ2d@xxxxxxxxx>,
James Waldby <no@xxxxx> wrote:

On Sat, 21 Jun 2008 21:37:06 -0700, Michael Press wrote:
[...] Mensanator <mensanator@xxxxxxx> wrote:
[...]
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

[Call this series R]

Also look up Euler's (who else?) transformation for accelerating
alternating series. In essence a difference table. Abramowitz and
Stegun, 3.6.27.

<http://mathworld.wolfram.com/EulersSeriesTransformation.html>

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.
(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.)

mathworld doesn't seem to mention the Van Wijngaarden variant of Euler's
transform, http://en.wikipedia.org/wiki/Van_Wijngaarden_transformation

--
Michael Press
.



Relevant Pages

  • Re: Fast Cube Root Using C33
    ... divides. ... The polynomial isn't a problem because all the instructions ... part should be dividing the unbiased exponent by three. ... use a lookup table to find a multiplier. ...
    (comp.dsp)
  • Re: Ultrareliable mechanisms
    ... algorithms require twice the space of the final result, and, far ... Requires one full-size divide, two half-size divides, ... computing billions of digits, so the whole thing is n log^2 n. ...
    (rec.arts.sf.written)
  • Re: Test for divisors of Phi(N)
    ... I believe the original poster asked about ... > checking divisibility rather than computing phimod d. ... One can think of other ways to attack N. For instance, if D divides ...
    (sci.crypt)
  • Re: Test for divisors of Phi(N)
    ... I believe the original poster asked about ... checking divisibility rather than computing phimod d. ... Suppose we had a test which, given N and d returned whether d divides ...
    (sci.crypt)