User constants
( Compute log(2), zeta(3), Catalan constant, pi with arctan formulas ..., with pifast)
Send your .pifast files ! Send your constants record computation ! Find faster series !
A new feature of PiFast, introduced in version 4.0, permits to compute a large family of user defined constants. Constant definitions are stored in a .pifast files. You can find a lot of these files on this page and download them to compute the corresponding constants with PiFast,like the constant p with a lot ot different formulas including arctan formulas), log(2), z(3) and others.
To appreciate the relative cost of the different formulas, timings for one million digits and 16 million digits are also given (computations done on a P4 2.4 Ghz on windows 2000 with PiFast 4.3). A special thanks to Russ J. Matheson, who afforded all timings for 1m, 16m and 100m digits, on his computer (Pentium 4 3.4 Ghz, on windows XP professional, with PiFast 4.3). His data can be downloaded as a text file in in excel form.
Please send your interesting .pifast files, they will be put on this page for PiFast users.
In this page, .pifast files can be downloaded one by one. A zip file containing all available .pifast files can be downloaded here.


User constants in PiFast are defined as a linear combination of hypergeometric series :
C = N-1

gn Hn,
where the gn are rational integers and Hn are hypergeometric series. The hypergeometric series can be defined in one of the form
H = a+ b

n > 0 

H = a+ b

n > 0 




where Z is a rational integer, and F and G are any integer polynomials. In the second form (2), PiFast only accepts F and G with same degree. (The form (1) can be reduced to a form of type (2) after some manipulations). Some predefined hypergeometric functions H are also available, they are
H = atan(Z) = Z - Z3/3 + Z5/5 - ...

H = atanh(Z) = 1/2 * log((1+Z)/(1-Z)) = Z + Z3/3 + Z5/5 + ...

H = log(1/(1-Z)) = Z + Z2/2 + Z3/3 + ...
The ability to define your own constant with PiFast first permits to compute new constants. It also permits to compute a given constant with different formulas, which can be used to check a computation. Speed comparisons between formulas for a constant can also be done.

1  The constant Pi

Here are .pifast files to compute p with PiFast with several different formulas.
An interesting remark is that the theoritical relative cost of the different atan formulas using binary splitting is different from the classical one usually described with a classical algorithm. The following table illustrates this remark (the comparison is done on a specific implementation and thus is not absolute, but it gives an idea of the relative cost).
Note : new timings on a Pentium 4 3.4 Ghz, by Russ J. Matheson can also be downloaded as a text file in in excel form.
File File author Time 1m (seconds) Time 16m (seconds) Comments
- - 3.91 106.8 Reference time with Chudnovsky formula
Pi_Machin Xavier Gourdon 13.30 361.8 Machin formula p/4=4 atan(1/5) - atan(1/239)
Pi_Atan_Gauss Xavier Gourdon 14.31 388.06 Gauss arctan formula p/4 = 12 atan(1/18)+8atan(1/57)-5 atan(1/239)
Pi_Stormer Pascal Sebah 14.55 388.7 Stormer formula p/4 = 11atan(1/57) + 7atan(1/239)-12 atan(1/682) +24atan(1/12943)
Pi_BBP Pascal Sebah 44.86 1234 BP formula by Plouffe and Borwein
Pi_Sebah1 Pascal Sebah 13.36 360.5 p/4 = 8 atan(1/21)+3atan(1/239) +4atan(3/1024)
Pi_Rational Pascal Sebah 16.13 421.2 p = 20atan(29/278) + 28atan(3/79)
Pi-lyster Stuart Lyster 16.48 431.8 p/4 = 22atan(1/28) + atan(p/q) with p and q huge integers of   thirty digits.

2  Log(2)

See the page The logarithmic constant : log(2) for details on this constant.
The world record computation for log(2) is 600 million decimal digits obtained by Shigeru Kondo (with PiFast41) in February 2002, in 11 hours using Log2_Sebah3 file (21 hours for verification using Log2_Sebah4 file). See record computation page for other constant records.
File File author Time 1m (seconds) Time 16m (seconds) Comments
Log2_Easy Xavier Gourdon 38.36 1087 log(2) = log[1/(1-1/2)] = n > 0 1/n/2n
Log2_Basic Xavier Gourdon 12.95 360.2 log(2) = 2 atanh(1/3) = 2n > =0 1/(2n+1)/32n+1
Log2_Sebah1 Xavier Gourdon 12.55 338.9 log(2) = 4 atanh(1/6) + 2 atanh(1/99)
Log2_Sebah2 Xavier Gourdon 13.66 369.9 log(2) = 4 atanh(1/7) + 2 atanh(1/17)
Log2_Sebah3 Xavier Gourdon 10.83 299.4 log(2) = 18 atanh(1/26) - 2 atanh(1/4801) + 8 atanh(1/8749)
Log2_Sebah4 Pascal Sebah 11.72 312.8 log(2) = 10 atanh(1/17)+4 atanh(13/449)
Log2_Sebah5 Pascal Sebah 13.22 351 log(2) = 144atanh(1/251)+54atanh(1/449)-38atanh(1/4801)+62atanh(1/8749)
Log2_Sebah6 Pascal Sebah 13.48 363.5 log(2) = 14atanh(1/31)+10atanh(1/49)+6atanh(1/161)

3  Log(10)

File File author Time 1m (seconds) Time 16m (seconds) Comments
Log10_Easy Pascal Sebah 19.94 554 log(10) = 6 atanh(1/3)+2atanh(1/9)
Log10_Sebah1 Pascal Sebah 13.48 362.7 log(10)=46atanh(1/31)+34atanh(1/49)+20atanh(1/161)

4  Apery constant Zeta(3)

The constant Zeta(3) is defined by
z(3) =


It has been proved irrational by Apery in 1978. See the page The Apery's constant : z(3) for details on this constant.
File File author Time 1m (seconds) Time 16m (seconds) Comments
Zeta3_Apery Xavier Gourdon 46.28 1498 Apery's formula
Zeta3_Zeilberger Xavier Gourdon 21.72 651 A Amdeberhan Zeilberger formula
Zeta3_Zeilberger2 Xavier Gourdon 23.36 705.5 Another Amdeberhan Zeilberger formula

5  Square root of 2 : 2

The best way to compute the value of 2 is by using the Newton process (see Newton page). However, it is of interest to study the speed of convergence of hypergeometric series converging to 2.
File File author Time 1M (seconds) Comments
Sqrt2_Easy Pascal Sebah 7.84 2 = (7/5)(1-1/50)-1/2 (Knopp)
Sqrt2_Sebah1 Pascal Sebah 3.63 2 = (239/169)(1-1/57122)-1/2
Sqrt2_Sebah2 Pascal Sebah 3.19 2 = (1393/985)(1-1/1940450)-1/2
Sqrt2_Sebah3 Pascal Sebah 2.78 2 = (8119/5741)(1-1/65918162)-1/2
Sqrt2_Sebah4 Pascal Sebah 2.56 2 = (47321/33461)(1-1/2239277042)-1/2
Sqrt2_Sebah5 Pascal Sebah 2.47 2 = (275807/195025)(1-1/76069501250)-1/2

6  Golden ratio : (1+5)/2

As for 2, the best way to compute this constant is to use the Newton method.
File File author Time 1M (seconds) Comments
Golden_Easy Pascal Sebah 17.28 f = 1/2+(1-1/5)-1/2
Golden_Sebah1 Pascal Sebah 4.76 f = 1/2+(19/17)(1-1/1445)-1/2
Golden_Sebah2 Pascal Sebah 3.30 f = 1/2+(341/305)(1-1/465125)-1/2
Golden_Sebah3 Pascal Sebah 2.73 f = 1/2+(6119/5473)(1-1/149768645)-1/2
Golden_Sebah4 Pascal Sebah 2.50 f = 1/2+(109801/98209)(1-1/48225038405)-1/2
Golden_Sebah5 Pascal Sebah 2.34 f = 1/2+(1970299/1762289)(1-1/15528312597605)-1/2
Golden_Cutler Anthony Cutler f = 1/2+(A/B)(1-1/C)-1/2 where A and B are 26-digits integers and C a 51-digits integer

7  Catalan constant

This constant is defined as
C = 1 -  1

+  1

-  1

+ =


A few number of geometrically converging series exist for this constant (see Steven Finch site).
The current world record computation for this constant is 201,000,000 digits by Pascal Sebah, obtained in 2002 using PiFast 4.1.
File File author Time 1m (seconds) Time 16m (seconds) Comments
Catalan_Broadhurst Pascal Sebah 171.9 4888 A Broadhurst BBP formula
Catalan_Lupas Pascal Sebah 105.1 3060 A Lupas formula in the Zeilberger style
Catalan_Sebah1 Pascal Sebah 175.94 4828 A rearragement of Broadhurst formula
Catalan_Huvent Gery Huvent 142.02 A formula from G. Huvent

8  Miscellaneous

File File author Time 1M (seconds) Comments
Lemniscate_Gauss Pascal Sebah 31.44 A Gauss formula
Lemniscate_Sebah1 Pascal Sebah 39.53
Zeta5_Huvent Gery Huvent 475.78 A zeta(5) formula from G. Huvent
Zeta5_Broadhurst Gery Huvent 510.80 A zeta(5) formula from Broadhurst
Ln2_cube Gery Huvent A ln(2)^3 formula

9  More ...

Send me your constant definition files and your records !

Back to Numbers, constants and computation

File translated from TEX by TTH, version 3.40.
On 24 Oct 2004, 16:34.