Re: A Formula for Pi



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. 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, 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

-jiw
.



Relevant Pages

  • Re: A Formula for Pi
    ... James Waldby wrote: ... computing one term of R is as expensive as computing several ... (Perhaps 13 multiplies, 1 divide, ... vs. 2 multiplies, 1 divide, and some adds per Machin term.) ...
    (sci.math)
  • Re: A Formula for Pi
    ... Good rational approximations to sqrtare easy to get. ... computing one term of R is as expensive as computing several ... (Perhaps 13 multiplies, 1 divide, ... vs. 2 multiplies, 1 divide, and some adds per Machin term.) ...
    (sci.math)
  • Re: multiply/divide algorithm
    ... yes there are algorithms to do multiply and divide. ... fixed-point multiplies. ... I'm sorry that responses to your post weren't all attempting to be helpful ...
    (comp.lang.verilog)
  • Re: the reach of VHDL
    ... formula or it should be left for microblaze. ... particularly from the ever inspiring DSP litterature. ... Since you divide by 12.5, you actually use another 100x factor. ... which uses multiplies and add/sub operators. ...
    (comp.arch.fpga)
  • Re: [PATCH] SLAB : use a multiply instead of a divide in obj_to_index()
    ... can be used from other parts of the kernel as well? ... AFAIK this particular divide is the only one that hurts performance on ... s for the version using multiplies ... When some objects are allocated by one CPU but freed by another CPU we can ...
    (Linux-Kernel)