Algorithm used by PiFast Algorithm used by PiFast

The program implements a Brent binary splitting method together with an efficient cache handling hermitian FFT to multiply big integers (NTT with several primes is used for huge computations). To compute p, it is based on the Chudnovsky formula

426880   _____
Ö10005
 

p
=
å
n ³ 0 
(6n)!(545140134n+13591409)
(n!)3(3n)!(-640320)3n
,
which adds roughly 14 decimal digits by term.

PiFast also proposes a second method for verification, based on a Ramanujan formula

1
p
= 2Ö2
å
n ³ 0 
(4n)!(1103+26390n)
44n(n!)4 994n+2
,
which adds roughly 8 decimal digits by term.

My experience is that a careful implementation of these techniques seems better than any other approaches (like AGM based formulaes for example) for reachable number of digits.

PiFast implements the computation of E with two formulas, namely

e = ¥
å
n = 0 
1
n!
    and    e = ( ¥
å
n = 0 
(-1)n
n!
)-1.

From version 4.0, PiFast permits to compute a large family of user defined constants from linear combination of general hypergeometric series. The algorithm also uses binary splitting, which generalizes well to hypergeometric series.

Remarks

More information can be found in the PiFast package.


Back to mathematical constants and computation


File translated from TEX by TTH, version 2.32.
On 30 Aug 2001, 23:16.