Remarks on the computation of π

Jörg Arndt

        arndt@jjj.de

This document^{1} was L^{A}TEX’d at July 3, 2007

1This document is enclosed in the hfloat-package which is online at http://www.jjj.de/hfloat/. Note that the part about arithmetical algorithms was merged into the fxtbook, online at http://www.jjj.de/fxt/.

Contents

1 Remarks on the computation of π 2 1.1 Iterations for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Geometric iterations for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Products for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 Arctan formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5 How to build arctan formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.6 Ramanujan type formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.6.1 Type 1 n = 58 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.6.2 Type 1 n = 862 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.6.3 Type 2 n = 37 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.6.4 Type 3a n = 7...163 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.6.5 Type 3c n = 1555 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.6.6 Type 3b n = 190 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.7 Approximations for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.8 Continued fractions for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.8.1 The simple continued fraction for π . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.8.2 other continued fractions for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.9 Series for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.10 Miscellaneous formulas for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.11 A bit recursion for 1/π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.12 A self correcting iteration for π . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

A More arctan formulas 24

B Sums and integrals of sin(x)/x 29

Bibliography 30

Chapter 1

Remarks on the computation of π

1.1 Iterations for π

For general forms of the examples given here see J. & P. Borwein’s book [10] and their papers.

For some iterations an operation count (in units of full precision multiplications) is given. Operations different from multiplication are counted as follows: 1 squaring = 2/3 mult. 1 division = 4 mult. 1 inverse sqrt = 4 mult. 1 sqrt = 5 mult.

full prec mult → efficiency measure

2.order iteration, cf. src/pi/pi2nd.cc:

y_{0} = \frac{1}{\sqrt{2}}  (1.1)
a_{0} = \frac{1}{2}  (1.2)
y_{k+1} = \frac{1 − (1 − y_{k}^{2})^{1/2}}{1 + (1 − y_{k}^{2})^{1/2}} → 0 +  (1.3)
= \frac{(1 − y_{k}^{2})^{−1/2} − 1}{(1 − y_{k}^{2})^{−1/2} + 1}  (1.4)
a_{k+1} = a_{k} (1 + y_{k+1})^{2} − 2^{k+1} y_{k+1} → \frac{1}{π}  (1.5)
a_{k} − π^{−1} ≤ 16 · 2^{k+1} e^{−2^{k+1} π}  (1.6)

1.4 shows how to save 1 multiplication per step.

Operations per step: 1 inverse sqrt, 1 division, 2 squarings, 1 multiplication.

Quartic (4.order) iterations, cf. src/pi/pi4th.cc:

variant r = 4:

y_{0} = \sqrt{2} − 1  (1.7)
a_{0} = 6 − 4 \sqrt{2}  (1.8)
y_{k+1} = \frac{1 − (1 − y_{k}^{4})^{1/4}}{1 + (1 − y_{k}^{4})^{1/4}} → 0 +  (1.9)

CHAPTER 1. REMARKS ON THE COMPUTATION OF π 3

= \frac{(1 − y_{k}^{4})^{−1/4} − 1}{(1 − y_{k}^{4})^{−1/4} + 1}  (1.10)
a_{k+1} = a_{k} (1 + y_{k+1})^{4} − 2^{2k+3} y_{k+1} (1 + y_{k+1} + y_{k+1}^{2}) → \frac{1}{π}  (1.11)
= a_{k} ((1 + y_{k+1})^{2})^{2} − 2^{2k+3} y_{k+1} ((1 + y_{k+1})^{2} − y_{k+1})  (1.12)
0 < a_{k} − π^{−1} ≤ 16 · 4^{n} 2 e^{−4^{n} 2 π}  (1.13)

Identities 1.10 and 1.12 show how to save operations. Operations per step: 1 inverse 4th root, 1 division, 2 squarings, 1 multiplication. variant r = 16:

y_{0} = \frac{1 − 2^{−1/4}}{1 + 2^{−1/4}}  (1.14)
a_{0} = \frac{8/\sqrt{2} − 2}{(2^{−1/4} + 1)^{4}}  (1.15)
y_{k+1} = \frac{(1 − y_{k}^{4})^{−1/4} − 1}{(1 − y_{k}^{4})^{−1/4} + 1} → 0 +  (1.16)
a_{k+1} = a_{k} (1 + y_{k+1})^{4} − 2^{2k+4} y_{k+1} (1 + y_{k+1} + y_{k+1}^{2}) → \frac{1}{π}  (1.17)
0 < a_{k} − π^{−1} ≤ 16 · 4^{n} 4 e^{−4^{n} 4 π}  (1.18)

Same operation count as before, but this variant gives approximately twice as much precision after the same number of steps. The general form of the quartic iterations (1.7 and 1.14) is

y_{0} = \sqrt{λ^{∗}(r)}  (1.19)
a_{0} = α(r)  (1.20)
y_{k+1} = \frac{(1 − y_{k}^{4})^{−1/4} − 1}{(1 − y_{k}^{4})^{−1/4} + 1} → 0 +  (1.21)
a_{k+1} = a_{k} (1 + y_{k+1})^{4} − 2^{2k+2} \sqrt{r} y_{k} (1 + y_{k+1} + y_{k+1}^{2}) → \frac{1}{π}  (1.22)
0 < a_{k} − π^{−1} ≤ 16 · 4^{n} \sqrt{r} e^{−4^{n} \sqrt{r} π}  (1.23)

Cf. [10], p.170f.

AGM variant 1, cf. src/pi/piagm.cc:

a_{0} = 1  (1.24)
b_{0} = \frac{1}{\sqrt{2}}  (1.25)
p_{n} = \frac{2 a_{n+1}^{2}}{1 − ∑_{k=0}^{n} 2^{k} c_{k}^{2}} → π  (1.26)
π − p_{n} = \frac{π^{2} 2^{n+4} e^{−π 2^{n+1}}}{AGM^{2}(a_{0}, b_{0})}  (1.27)

cf. also src/pi/piagm.cc.

AGM variant 3fast, cf. src/pi/piagm3.cc:

a_{0} = 1  (1.28)

b_{0} = \frac{\sqrt{6} + \sqrt{2}}{4}  (1.29)
p_{n} = \frac{2 a_{n+1}^{2}}{\sqrt{3} (1 − ∑_{k=0}^{n} 2^{k} c_{k}^{2}) − 1} → π  (1.30)

π − p_{n} < \frac{\sqrt{3} π^{2} 2^{n+4} e^{−\sqrt{3} π 2^{n+1}}}{AGM^{2}(a_{0}, b_{0})}  (1.31)

AGM variant 3slow, cf. src/pi/piagm3.cc:

a_{0} = 1  (1.32)
b_{0} = \frac{\sqrt{6} − \sqrt{2}}{4}  (1.33)
p_{n} = \frac{6 a_{n+1}^{2}}{\sqrt{3} (1 − ∑_{k=0}^{n} 2^{k} c_{k}^{2}) + 1} → π  (1.34)

π − p_{n} < \frac{\frac{1}{\sqrt{3}} π^{2} 2^{n+4} e^{− \frac{1}{\sqrt{3}} π 2^{n+1}}}{AGM(a_{0}, b_{0})^{2}}  (1.35)

Derived AGM iteration (2.order), cf. src/pi/pideriv.cc:

x_{0} = \sqrt{2}  (1.36)
p_{0} = 2 + \sqrt{2}  (1.37)
y_{1} = 2^{1/4}  (1.38)
x_{k+1} = \frac{1}{2} (\sqrt{x_{k}} + \frac{1}{\sqrt{x_{k}}} ) (k ≥ 0) → 1 +  (1.39)

y_{k+1} = \frac{y_{k} \sqrt{x_{k}} + \frac{1}{\sqrt{x_{k}}}}{y_{k} + 1} (k ≥ 1) → 1 +  (1.40)
p_{k+1} = p_{k} \frac{x_{k} + 1}{y_{k} + 1} (k ≥ 1) → π +  (1.41)
p_{k} − π = 10^{−2^{k+1}}  (1.42)

Cubic AGM, from [17], cf. src/pi/picubagm.cc:

a_{0} = 1  (1.43)
b_{0} = \frac{\sqrt{3} − 1}{2}  (1.44)
a_{n+1} = \frac{a_{n} + 2 b_{n}}{3}  (1.45)
b_{n+1} = \sqrt[3]{\frac{b_{n} (a_{n}^{2} + a_{n} b_{n} + b_{n}^{2})}{3}}  (1.46)
p_{n} = \frac{3 a_{n}^{2}}{1 − ∑_{k=0}^{n} 3^{k} (a_{k}^{2} − a_{k+1}^{2})}  (1.47)

Quintic (5. order) iteration, from the article [13] cf. src/pi/pi5th.cc:

s_{0} = 5(\sqrt{5} − 2)  (1.48)

a_{0} = \frac{1}{2}  (1.49)
s_{n+1} = \frac{25}{s_{n}(z + x/z + 1)^{2}} → 1  (1.50)
where x = \frac{5}{s_{n}} − 1 → 4  (1.51)
and y = (x − 1)^{2} + 7 → 16  (1.52)
and z = (\frac{x}{2} (y + \sqrt{y^{2} − 4x^{3}}))^{1/5} → 2  (1.53)
a_{n+1} = s_{n}^{2}a_{n} − 5^{n} (\frac{s_{n}^{2} − 5}{2} + \sqrt{s_{n} (s_{n}^{2} − 2s_{n} + 5)}) → \frac{1}{π}  (1.54)
a_{n} − \frac{1}{π} < 16 · 5^{n} e^{−π 5^{n}}  (1.55)

Btw. the 5th order algorithm is the slowest of the above, because compared to the other iterations much more operations are needed for each step.

Cubic (3. order) iteration, from [20], cf. src/pi/pi3rd.cc:

a_{0} = \frac{1}{3}  (1.56)
s_{0} = \frac{\sqrt{3} − 1}{2}  (1.57)
r_{k+1} = \frac{3}{1 + 2 (1 − s_{k}^{3})^{1/3}}  (1.58)
s_{k+1} = \frac{r_{k+1} − 1}{2}  (1.59)
a_{k+1} = r_{k+1}^{2} a_{k} − 3^{k} (r_{k+1}^{2} − 1) → \frac{1}{π}  (1.60)

Nonic (9. order) iteration, from [20], cf. src/pi/pi9th.cc:

a_{0} = \frac{1}{3}  (1.61)
r_{0} = \frac{\sqrt{3} − 1}{2}  (1.62)
s_{0} = (1 − r_{0}^{3})^{1/3}  (1.63)
t = 1 + 2 r_{k}  (1.64)
u = (9 r_{k} (1 + r_{k} + r_{k}^{2}))^{1/3}  (1.65)
v = t^{2} + t u + u^{2}  (1.66)
m = \frac{27 (1 + s_{k} + s_{k}^{2})}{v}  (1.67)
a_{k+1} = m a_{k} + 3^{2 k−1} (1 − m) → \frac{1}{π}  (1.68)
s_{k+1} = \frac{(1 − r_{k})^{3}}{(t + 2 u) v}  (1.69)
r_{k+1} = (1 − s_{k}^{3})^{1/3}  (1.70)

1.2 Geometric iterations for π

Let r_{k} and R_{k} be the radii of a circles that are inscribed and circumscribed, respectively, to a regular polygon with 2^{k} sides and circumference 2. Then 2 π r_{k} < 2 < 2 π R_{k} and the relations

r_{2} = \frac{1}{4}  (1.71)
R_{2} = \frac{1}{\sqrt{8}}  (1.72)
r_{k+1} = \frac{R_{k} + r_{k}}{2}  (1.73)
R_{k+1} = \sqrt{R_{k} r_{k+1}}  (1.74)

allow to compute better and better approximations to π. This is called Cusanus’ method, it was discovered around 1450, cf. [44] pp.155-156. Note the different subscripts on the right hand side of the last equation: if they were equal the above iteration would compute the AGM(r_{2}, R_{2}).

Archimedes used the circumferences of regular polygons with 3 · 2^{k} that are inscribed (s_{k}) and circumscribed (t_{k}) the unit circle.

t_{0} = 2 \sqrt{3}  (1.75)
s_{0} = 3  (1.76)
t_{k+1} = \frac{2 t_{k} s_{k}}{t_{k} + s_{k}}  (1.77)
s_{k+1} = \sqrt{t_{k+1} s_{k}}  (1.78)

This is also called the Borchard-Pfaff algorithm. Again, if the subscipts on the right hand side of the last equation were the same then one would compute the harmonic-geometric mean HGM(a_{0}, b_{0}) that also has the quadratic convergence property of the AGM. One can identify equation 1.77 as

tan \frac{ϕ}{2} = \frac{2 tan ϕ sin ϕ}{tan ϕ + sin ϕ}  (1.79)

and equation 1.78 as

sin \frac{ϕ}{2} = \sqrt{tan \frac{ϕ}{2} sin ϕ}  (1.80)

The quantities in the above algorithms can be identified with (values of) trigonometrical functions and their half-argument relations.

It is easy to contruct one-valued iterations of similar kind. Consider 4 · 2^{k}-sided regular polygons circumscribed around the unit circle. The cicumference is used as an approximation for that of the circle: 2 π ≈ 8 · 2^{k} x_{k} where x_{k} is the length of one side of the 4 · 2^{k}-gons. One has

x_{k} = tan \frac{x_{0}}{2^{k}}  (1.81)

Start with the unit square (x_{0} = 1) and use

tan \frac{ϕ}{2} = \frac{tan ϕ}{1 + \sqrt{1 + tan^{2} ϕ}}  (1.82)

i.e. iterate

x_{k+1} = \frac{x_{k}}{1 + \sqrt{1 + x_{k}^{2}}}  (1.83)

This can be rewritten in many ways, this one is quite elegant: use

arctan \frac{1}{x} = 2 arctan \frac{1}{x + \sqrt{x^{2} + 1}}  (1.84)

i.e. iterate

ϕ_{k+1} = ϕ_{k} + \sqrt{ϕ_{k}^{2} + 1}  (1.85)

The approximation made in these algorithms is always of the type sin ϕ ≈ ϕ or tan ϕ ≈ ϕ. Note that all these iterations converge only linear. Cf. [3] and [45].

1.3 Products for π

Wallis product

\frac{π}{2} = \frac{2 · 2}{1 · 3} · \frac{4 · 4}{3 · 5} · \frac{6 · 6}{5 · 7} · \frac{8 · 8}{7 · 9} · ...  (1.86)
= ∏_{n=1}^{∞} \frac{4n^{2}}{4n^{2} − 1}

From

sin 2 x = 2 sin x cos x  (1.87)

or equivalent

\frac{sin 2 x}{2 x} = \frac{sin x}{x} cos x  (1.88)

follows by repeated substitution

\frac{sin x}{x} = ∏_{n=1}^{∞} cos \frac{x}{2^{n}}  (1.89)

using

cos \frac{x}{2} = \sqrt{\frac{1}{2} + \frac{cos x}{2}}  (1.90)
= \frac{\sqrt{2 + 2 cos x}}{2}  (1.91)

and x = \frac{π}{2} one gets

\frac{2}{π} = \sqrt{\frac{1}{2}} · \sqrt{\frac{1}{2} + \frac{1}{2} · \sqrt{\frac{1}{2}}} · \sqrt{\frac{1}{2} + \sqrt{\frac{1}{2} + \frac{1}{2} · \sqrt{\frac{1}{2}}}} · ...  (1.92)
= \frac{\sqrt{2}}{2} · \frac{\sqrt{2 + \sqrt{2}}}{2} · \frac{\sqrt{2 + \sqrt{2 + \sqrt{2}}}}{2} · ...  (1.93)

CHAPTER 1. REMARKS ON THE COMPUTATION OF π 8 From

\frac{tan x}{x} = ∏_{n=1}^{∞} \frac{1}{1 − tan \frac{x}{2^{n}}}  (1.94)

and

cos x = \frac{sin x}{x}/\frac{tan x}{x}  (1.95)

and formula 1.89 follows

\frac{sin x}{x} = ∏_{n=1}^{∞} (1 − tan^{2} \frac{x}{2^{n}} )^{2^{n}−1}  (1.96)
∏_{k=0}^{∞} [ \begin{matrix}\frac{2 (k− \frac{1}{2} ) (k+2)}{27 (k+ \frac{2}{3} ) (k+ \frac{4}{3} )} & 10 \\ 0 & 1 \end{matrix} ] = [ \begin{matrix}0 & π + 6 \\ 0 & 1 \end{matrix} ]  (1.97)

R.W.Gosper gave

∏_{k=0}^{∞} [ \begin{matrix}\frac{(k− \frac{5}{2} ) (k+ \frac{3}{2} ) (k+3) (k+ \frac{7}{2} )}{64 (k+ \frac{3}{4} ) (k+ \frac{5}{4} ) (k+ \frac{9}{4} ) (k+ \frac{11}{4} )} & 48 (k + \frac{41}{21}) \\ 0 & 1 \end{matrix} ] = [ \begin{matrix}0 & 15 π + 32 \\ 0 & 1 \end{matrix} ]  (1.98)

and

∏_{k=0}^{∞} [ \begin{matrix}\frac{(k− \frac{19}{6} ) (k− \frac{13}{6} ) (k+1) (k+ \frac{19}{6} ) (k+ \frac{25}{6} )}{64 (k− \frac{7}{12} ) (k− \frac{1}{12} ) (k+ \frac{3}{2} ) (k+ \frac{31}{12} ) (k+ \frac{37}{12} )} & (k − \frac{23}{42}) (k + \frac{1}{3}) (k + \frac{11}{6}) \\ 0 & 1 \end{matrix} ]  (1.99)

= [ \begin{matrix}\frac{6175}{2268} π − \frac{325}{378} & . \\ . & . \end{matrix} ]

Gosper gives two matrix products for arctan(x) (and thereby for π): Define

K(k, n) := [ 0 1^{\frac{k x^{2}}{(n+k)(x^{2}+1)} \frac{x}{x^{2}+1}} ] (1.100)

and

N(k, n) := [ \begin{matrix}−\frac{n x^{2}}{n+k} & x \\ 0 & 1 \end{matrix} ]  (1.101)

then

arctan(x) = upper-right (K(1, \frac{1}{2}) · K(2, \frac{1}{2}) · K(3, \frac{1}{2}) · K(4, \frac{1}{2}) · ...)  (1.102)
= upper-right (N(1, \frac{1}{2}) · N(1, \frac{3}{2}) · N(1, \frac{5}{2}) · N(1, \frac{7}{2}) · ...)  (1.103)

1.4 Arctan formulas

Formulas of the form

k \frac{π}{4} = ∑_{i=1}^{N} m_{i} arctan \frac{1}{x_{i}}  (1.104)

(k ∈ ℕ, m_{i} ∈ ℤ, x_{i} ∈ ℕ) where all x_{i}^{2} + 1 factor completely into factors in

F := {2, 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113}  (1.105)

(exceptions are formulas 1.116 and 1.118). For some of the formulas the factors are given in curly braces^{1}. All these formulas were built in 1992 with a mixture of C-programs and Computer Algebra. For the known formulas the original authors are given. Formulas 1.110 and 1.111 were used for the 100,000 digit computation of π in 1961, see [28]. Machin’s formula (1.109) was often used in π-computations before 1960. The computations used the expansion

arctan \frac{1}{x} = \frac{1}{x} − \frac{1}{3 x^{3}} + \frac{1}{5 x^{5}} − \frac{1}{7 x^{7}} + −...  (1.106)

Another expansion is given by

arctan \frac{1}{x} = x (\frac{1}{x^{2} + 1} + \frac{2}{3} \frac{1}{(x^{2} + 1)^{2}} + \frac{2 · 4}{3 · 5} \frac{1}{(x^{2} + 1)^{3}} + \frac{2 · 4 · 6}{3 · 5 · 7} \frac{1}{(x^{2} + 1)^{4}} + ...) (1.107)

\frac{π}{4} = arctan \frac{1}{2} + arctan \frac{1}{3}  (1.108)
{5} (Euler, 1706)
\frac{π}{4} = 4 arctan \frac{1}{5} − arctan \frac{1}{239}  (1.109)
{13} (Machin, 1776)
\frac{π}{4} = 6 arctan \frac{1}{8} + 2 arctan \frac{1}{57} + arctan \frac{1}{239}  (1.110)
{5,13} (Størmer, 1896)
\frac{π}{4} = 12 arctan \frac{1}{18} + 8 arctan \frac{1}{57} − 5 arctan \frac{1}{239}  (1.111)
{5,13} (Gauss)
\frac{π}{4} = 44 arctan \frac{1}{57} + 7 arctan \frac{1}{239} − 12 arctan \frac{1}{682} + 24 arctan \frac{1}{12943}  (1.112)
{5,13,61} (Størmer, 1896)
\frac{π}{4} = 88 arctan \frac{1}{172} + 51 arctan \frac{1}{239} + 32 arctan \frac{1}{682} +  (1.113)
+44 arctan \frac{1}{5357} + 68 arctan \frac{1}{12943}
{5,13,61,97} (Størmer, 1896)
\frac{π}{4} = 88 arctan \frac{1}{192} + 39 arctan \frac{1}{239} + 100 arctan \frac{1}{515} −  (1.114)
−32 arctan \frac{1}{1068} − 56 arctan \frac{1}{173932}
{5,13,73,101}

1the 2 is always omitted.

\frac{π}{4} = 100 arctan \frac{1}{319} + 127 arctan \frac{1}{378} + 71 arctan \frac{1}{557} −  (1.115)

−15 arctan \frac{1}{1068} + 66 arctan \frac{1}{2943} + 44 arctan \frac{1}{478707}

{5,13,17,41,73}

\frac{π}{4} = 322 arctan \frac{1}{577} + 76 arctan \frac{1}{682} + 139 arctan \frac{1}{1393} +  (1.116)

+156 arctan \frac{1}{12943} + 132 arctan \frac{1}{32807} + 44 arctan \frac{1}{1049433}

{5,13,61,89,197}

\frac{π}{4} = 1074 arctan \frac{1}{1568} + 657 arctan \frac{1}{4662} + 183 arctan \frac{1}{5357} −  (1.117)

−779 arctan \frac{1}{12943} − 32 arctan \frac{1}{17923} − 449 arctan \frac{1}{32807} +

+398 arctan \frac{1}{390112}

{5,13,17,61,89,97}

\frac{π}{4} = 1587 arctan \frac{1}{2852} + 295 arctan \frac{1}{4193} + 593 arctan \frac{1}{4246} +  (1.118)

+359 arctan \frac{1}{39307} + 481 arctan \frac{1}{55603} + 625 arctan \frac{1}{211050} −

−708 arctan \frac{1}{390112}

{5,13,17,29,97,433}

\frac{π}{4} = 1074 arctan \frac{1}{4246} + 1257 arctan \frac{1}{5357} + 1731 arctan \frac{1}{6107} +  (1.119)

+295 arctan \frac{1}{12943} + 625 arctan \frac{1}{19703} − 481 arctan \frac{1}{32807} −

−1042 arctan \frac{1}{39307} + 398 arctan \frac{1}{390112}

{...}

\frac{π}{4} = 7162 arctan \frac{1}{12943} + 3796 arctan \frac{1}{32807} + 2558 arctan \frac{1}{34208} +  (1.120)

+2729 arctan \frac{1}{44179} − 708 arctan \frac{1}{51387} + 2192 arctan \frac{1}{114669} −

−2805 arctan \frac{1}{157318} − 3696 arctan \frac{1}{485298} − 2407 arctan \frac{1}{24208144}

{...}

\frac{π}{4} = 2805 arctan \frac{1}{5257} − 398 arctan \frac{1}{9466} + 1950 arctan \frac{1}{12943} +  (1.121)

+1850 arctan \frac{1}{34208} + 2021 arctan \frac{1}{44179} + 2097 arctan \frac{1}{85353} +

+1484 arctan \frac{1}{114669} + 1389 arctan \frac{1}{330182} + 808 arctan \frac{1}{485298}

{5,13,17,29,37,41,53,61} (Gauss)

\frac{π}{4} = 50539 arctan \frac{1}{51387} + 1555 arctan \frac{1}{114669}  (1.122)

−6601 arctan \frac{1}{157318} − 20678 arctan \frac{1}{390112} − 5617 arctan \frac{1}{485298}

−64126 arctan \frac{1}{617427} + 10958 arctan \frac{1}{1984933} − 30569 arctan \frac{1}{3449051}

+23407 arctan \frac{1}{22709274} + 25433 arctan \frac{1}{24208144}

{...}

\frac{π}{4} = 36462 arctan \frac{1}{390112} + 135908 arctan \frac{1}{485298}  (1.123)

+274509 arctan \frac{1}{683982} − 39581 arctan \frac{1}{1984933}

+178477 arctan \frac{1}{2478328} − 114569 arctan \frac{1}{3449051}

−146571 arctan \frac{1}{18975991} + 61914 arctan \frac{1}{22709274}

−69044 arctan \frac{1}{24208144} − 89431 arctan \frac{1}{201229582}

−43938 arctan \frac{1}{2189376182}

{5,13,17,29,37,53,61,89,97,101}

\frac{π}{4} = 446879 arctan \frac{1}{683982} + 172370 arctan \frac{1}{1635786}  (1.124)

−193720 arctan \frac{1}{1984933} + 369078 arctan \frac{1}{2478328}

+18231 arctan \frac{1}{3014557} + 21339 arctan \frac{1}{3449051}

−154139 arctan \frac{1}{6225244} − 110109 arctan \frac{1}{18975991}

+80145 arctan \frac{1}{22709274} − 223183 arctan \frac{1}{24208144}

−107662 arctan \frac{1}{201229582} − 216308 arctan \frac{1}{2189376182}

{...}

\frac{π}{4} = 872408 arctan \frac{1}{1984933} + 619249 arctan \frac{1}{2298668}  (1.125)

+369078 arctan \frac{1}{2478328} + 18231 arctan \frac{1}{3014557}

−1217159 arctan \frac{1}{5033696} + 911989 arctan \frac{1}{6225244}

+783649 arctan \frac{1}{18975991} − 70886 arctan \frac{1}{22709274}

−374214 arctan \frac{1}{24208144} − 1044789 arctan \frac{1}{168623905}

+339217 arctan \frac{1}{201229582} − 446879 arctan \frac{1}{284862638}

+402941 arctan \frac{1}{2189376182}

{...}

1.5 How to build arctan formulas

For a n-term arctan relation of the form

\frac{k π}{4} = m_{1} arctan \frac{1}{a_{1}} + m_{2} arctan \frac{1}{a_{2}} + ... + m_{n} arctan \frac{1}{a_{n}}  (1.126)

1. Choose a set F = {p_{1}, ..., p_{n−1}} of primes of the form 4k + 1

2. Find a_{1}, ...a_{y} so that a_{i}^{2} + 1 factor completely in 2 ∪ F, i.e. a_{i}^{2} + 1 = 2^{e_{i,0}} · p_{1}^{e_{i,1}} · p_{2}^{e_{i,2}} · ... · p_{n−1}^{e_{i,n−1}} i = 1, 2, ..., y (the factor 2 for the odd x_{i} is ignored in what follows).

3. If you can’t find more than n a_{i}, i.e. y < n, then restart with another F

4. give the e_{i,j} a minus sign if (a_{i}%p_{j}) > \frac{p_{j}}{2}

5. Find the nullspace of the (n − 1) × y matrix M_{ij} := {e_{ij}}

6. Find linear combinations of the basis vectors of the nullspace that correspond to nice and nontrivial (i.e. k ≠ 0) arctan relations.

An example: for a 5-term relation

1. Choose F = {5, 13, 61, 101}

2. Find {2, 3, 5, 7, 8, 18, ..., 57, ..., 111, 239, 515, 682, 12943} (from which i choose the 5 largest 111, 239, 515, 682, 12943)

3. y >= 5 ok.

4. and

5. M =

5 13 61 101
111  0 0 -1 +1
239  0 +4 0  0
515  0 -1 0  2
682 +3 0 +2  0
12943 -4 -3 +1  0

(e.g. 239^{2} + 1 = 2 · 13^{4} and 239%13 = 5 < 13/2)

6. we were lucky:

\frac{1 π}{4} = 88 arctan \frac{1}{111} + 7 arctan \frac{1}{239} − 44 arctan \frac{1}{515} +  (1.127)
+32 arctan \frac{1}{682} + 24 arctan \frac{1}{12943}

Often one ends up with a trivial relation, i.e.

0 = m_{1} arctan \frac{1}{a_{1}} + m_{2} arctan \frac{1}{a_{2}} + ... + m_{n} arctan \frac{1}{a_{n}}  (1.128)

To build formulas with terms of the type arctan \frac{a}{b} use the factors of a^{2} + b^{2}.

Open questions:

1. What is the upper bound for the a_{i} for a certain set of factors F ?

2. Is there an algorithm that (in subexponential running time) finds for a certain set A = {a_{i}}, i = 1, ..., y (for which a_{i}^{2} + 1 factor completely in F) the arctan relations also for the subsets of A that contain only a_{i} for which a_{i}^{2} + 1 factor completely in a subset of ?

3. Is there a better algorithm to find the a_{i} for a certain F than these:

(a) tree search over all products ∏ p_{j}^{e_{ij}} (checking for each product if the product minus one is square)

(b) brute force checking all a = 2...∞ if a^{2} + 1 factors in F

1.6 Ramanujan type formulas

Some nice explicit ‘Ramanujan-type’ formulas for 1/π follow. For more formulas and explanation cf. [10] and [12]

The explicit formulas were made in 1994 using Mathematica (for numerical computation of the quantities in the general formulas and for finding the minimal polynomials) and MapleV (for solving the polynomials and numerical verification of the results).

The ‘huge’ formulas here are given rather for fun than for the computation of pi.

The ‘type X’ are the same as in [12].

It is

(z)_{k} := zk̄ := z(z + 1)(z + 2)...(z + k − 1)  (1.129)

in what follows.

1.6.1 Type 1 n = 58

\frac{1}{π} = ∑_{n=0}^{∞} \frac{(\frac{1}{4})n (\frac{2}{4})n (\frac{3}{4})n}{n!^{3}} (2 \sqrt{2} (1103 + 26390 n)) \frac{1}{(99^{2})^{2n+1}}  (1.130)

= \frac{\sqrt{8}}{9801} ∑_{n=0}^{∞} \frac{(4n)! (1103 + n 26390)}{(n!)^{4} 396^{4n}}  (1.131)

(Ramanujan) about 8 correct digits per term CHAPTER 1. REMARKS ON THE COMPUTATION OF π 14

1.6.2 Type 1 n = 862

\frac{1}{π} = ∑_{n=0}^{∞} \frac{(\frac{1}{4})n (\frac{2}{4})n (\frac{3}{4})n}{n!^{3}} \frac{A + n B}{X^{2n+1}}  (1.132)

(type 1, n = 862)

A := [4521962731044058367634998271455136035/4 +  (1.133)

+799377627848523458605912125112563234\sqrt{2} + +12(17750127552909235203012377369182079345275390781190873870656491261057219 + +1255123555958829884236839904476079251826408616374387198187634303258534\sqrt{2})^{1/2}]^{1/2}

B := [9617761395088953485915444091307636106000 +  (1.134)

+6800784302301588686616253973429782154400\sqrt{2} +52003425600\sqrt{2}(34204566586722903151731072537516469136640672047198830592963 + +24186280981018566606552309811255775851849456510216830399522\sqrt{2})^{1/2}]^{1/2}

X := 1670141896514232075 + 1180968660568974600\sqrt{2} +  (1.135)

+2736\sqrt{2}(372627201865017746341791564603 + +263487221293322577155951514850\sqrt{2})^{1/2}

(each term adds 37 digits)

1.6.3 Type 2 n = 37

\frac{1}{π} = ∑_{n=0}^{∞} (−1)^{n} \frac{(\frac{1}{4})n (\frac{2}{4})n (\frac{3}{4})n}{n!^{3}} \frac{(1123 + 21460 n)}{4} \frac{1}{882^{2n+1}}  (1.136)

(Ramanujan)

1.6.4 Type 3a n = 7...163

\frac{1}{π} = \frac{1}{\sqrt{−1728 J}} ∑_{n=0}^{∞} \frac{(\frac{1}{6})n (\frac{3}{6})n (\frac{5}{6})n}{n!^{3}} \frac{A + n B}{J^{n}}  (1.137)
= \frac{1}{\sqrt{−1728 J}} ∑_{n=0}^{∞} \frac{(6n)!}{12^{3n} (3n)! (n!)^{3}} \frac{A + n B}{J^{n}}  (1.138)

n  A  B  J correct digits per term
7  24  189 -125/64  ≤ 1
11  60  616 -512/27  1
19  300  4104  -512  3
27  1116  18216 -64000/9  4
43  9468  195048  -80^{3}  6
67  122124  3140242  -440^{3}  8
163 163096908 6541681608 -53360^{3}  15

The last (n = 163) is known as Chudnovsky’s formula:

\frac{1}{π} = \frac{6541681608}{\sqrt{640320}^{3}} ∑_{k=0}^{∞} (\frac{13591409}{545140134} + k) (\frac{(6k)!}{(k!)^{3} (3k)!} \frac{(−1)^{k}}{640320^{3k}} )  (1.139)

= \frac{12}{\sqrt{640320}^{3}} ∑_{k=0}^{∞} (−1)^{k} \frac{(6k)!}{(k!)^{3} (3k)!} \frac{13591409 + k 545140134}{(640320)^{3k}}  (1.140)

1.6.5 Type 3c n = 1555

\frac{1}{π} = \frac{1}{\sqrt{−12 J}} ∑_{n=0}^{∞} \frac{(\frac{1}{6})n (\frac{3}{6})n (\frac{5}{6})n}{n!^{3}} \frac{A + n B}{J^{n}}  (1.141)

= \frac{1}{\sqrt{−12 J}} ∑_{n=0}^{∞} \frac{(6n)!}{12^{n} (3n)! (n!)^{3}} \frac{A + n B}{J^{n}}  (1.142)

(type 3c, n = 1555)

A := 5280419026080999965452185 + 2361475178400070170568800 \sqrt{5} +  (1.143)

+32 \sqrt{5}(10891728551171178200467436212395209160385656017 +

+4870929086578810225077338534541688721351255040 \sqrt{5})^{1/2}

B := 654159204458052267524145750 + 292548889855077669080467200 \sqrt{5} +  (1.144)

+209664 \sqrt{3110}(6260208323789001636993322654444020882161 +

+2799650273060444296577206890718825190235 \sqrt{5})^{1/2}

J := −[17897749588626020 + 8004116944887336 \sqrt{5} +  (1.145)

+108 \sqrt{5}(10985234579463550323713318473 +

+4912746253692362754607395912 \sqrt{5})^{1/2}]^{3}

(each term adds 50 correct digits)

0 = 91056965337194438815073158624225 +  (1.146)

+9214187265360390391808927003100 A + +672035320036821921804675631270 A^{2} −

−21121676104323999861808740 A^{3} + A^{4}

0 = 17514180018137387326565131389045795600 +  (1.147)

+193756947585743300725193322013380000 B + +2063419786805410130433556462222680 B^{2} − −2616636817832209070096583000 B^{3} + B^{4}

0 = 27192565672854630400 +  (1.148)

+49698245345181030400 U + +22885453089727782720 U^{2} − −71590998354504080 U^{3} + U^{4}

J = −U^{3}  (1.149)

1.6.6 Type 3b n = 190

\frac{1}{π} = \frac{1}{\sqrt{3J}} ∑_{n=0}^{∞} \frac{(\frac{1}{6})n (\frac{3}{6})n (\frac{5}{6})n}{n!^{3}} \frac{A + n B}{J^{n}}  (1.150)

(type 3b, n = 190)

A := 21242668516504965 +  (1.151)

+15020834958518500\sqrt{2} +

+2\sqrt{5}(45125096427586568251645610141659 +

+31908261685643312902173585434250\sqrt{2})^{1/2}

B := 1839779353703421900 +  (1.152)

+1300920456890691000\sqrt{2} +

+24337404\sqrt{10}(1142912476713024496667 +

+808161162586491705750\sqrt{2})^{1/2}

J := [71864175655 + 22725423252\sqrt{10} +  (1.153)

+2808\sqrt{5} (261993316778681 + 82849561276216\sqrt{10})^{1/2} ]^{3}

(each term adds 34 digits)

0 = 18983882886895192207942622025 −  (1.154)

−2233154457185835655186373700 A + +5704998902295029443240990 A^{2} − 84970674066019860 A^{3} + A^{4}

0 = 11316047287507303785105891917318400 −  (1.155)
−143564046791790430632439232928000 B +
+21396235898865291113024998560 B^{2} −
−7359117414813687600 B^{3} + B^{4}
0 = 1860185517864501025 − 1262383694834359900 U +  (1.156)
+44498697145120230 U^{2} − 287456702620 U^{3} + U^{4}
J = −U^{3}  (1.157)

How to build Ramanujan type formulas:

1. Read the definitions of the general formulas.

2. Pick out the necessary definitions from Borweins’ book ([10]).

3. Write a mupad-package that implements all the needed quantities (steal from the mathematica

     package src/pi/bucket/piram.m).

4. For each formula and n do

(a) Get numeric approximations for the quantities you need (e.g. f_{n} and J_{n}), compute 500 digits or so.

(b) Find the minimal polynomials for those quantities.

(c) Solve the polynomials & beautify the results.

(d) Check the symbolic results by comparing them to the quantities they were made of, using a higher precision than before.

For more formulas and explanation cf. [12] and [10].

1.7 Approximations for π

In what follows π(n) denotes an n−digit approximation for π.

π(2) = \frac{22}{7} = 3.1428...  (1.158)
π(6) = \frac{355}{113} = 3.14159292...  (1.159)

The last approximation tells us that it is a particularly bad idea to use π as an irrational value e.g. in chaos theoretic programs: it is almost up to floating point (single-) precision a rational number with pretty small denominator. Use ϕ = \frac{\sqrt{5}−1}{2} instead:

π(2) = \sqrt{3} + \sqrt{2} = 3.1462...  (1.160)

Ramanujan [23] gives in his paper (among many other):

π(5) = \frac{12}{\sqrt{22}} log (\sqrt{2} + 2)  (1.161)
π(15) = \frac{12}{\sqrt{130}} log (\frac{1}{2}\sqrt{2} (\sqrt{5} + 2) (\sqrt{13} + 3))  (1.162)
π(16) = \frac{24}{\sqrt{142}} log (\frac{1}{2}\sqrt{7\sqrt{2} + 10} + \sqrt{11\sqrt{2} + 10})  (1.163)
π(18) = \frac{12}{\sqrt{190}} log ((\sqrt{10} + 3) (2\sqrt{2} + \sqrt{10}))  (1.164)
π(22) = \frac{12}{\sqrt{310}} log ( (\sqrt{2} + 2) (\sqrt{5} + 3) (2\sqrt{10} + \sqrt{20\sqrt{10} + 61} + 5))  (1.165)
π(31) = \frac{4}{\sqrt{522}} log (\frac{1}{256}\sqrt{2} (\sqrt{29} + 5)^{3} (11\sqrt{6} + 5\sqrt{29}) (\sqrt{3\sqrt{6} + 5} + \sqrt{3}\sqrt{\sqrt{6} + 3})^{6})(1.166)

From the definition of the J-function

J(τ) := 1/q + 744 + 196884 q + 21493760 q^{2} + 864299970 q^{3} + 20245856256 q^{4} +  (1.167)
+ 333202640600 q^{5} + 4252023300096 q^{6} + 44656994071935 q^{7} + 401490886656000 q^{8} +
+ 3176440229784420 q^{9} + 22567393309593600 q^{10} + ...

(where q := e^{2 i π τ}) it is possible to give approximations to π for certain values of τ (cf. [8]). E.g.

π(17) = \begin{matrix}log & (5280^{3} + 744) \\ √ & \overline{67} \end{matrix}  (1.168)
π(30) = \begin{matrix}log & (640320^{3} + 744) \\ √ & \overline{163} \end{matrix}  (1.169)

for τ = 67 and τ = 163, respectively. As q is close to an integer for these values, one can take more terms from the above series to get (approximating q by [q]) better approximations of the same type. With z := −J(\frac{1+i \sqrt{163}}{2}) + 744 = 640320^{3} + 744 one gets

π(46) = \begin{matrix}log & (z − 196884/z) \\ √ & \overline{163} \end{matrix}  (1.170)
π(60) = \begin{matrix}log & (z − 196884/z + 21493760/z^{2}) \\ √ & \overline{163} \end{matrix}  (1.171)

Using more terms doesn’t improve the accuracy anymore because of the approximation made for q.

1.8 Continued fractions for π

1.8.1 The simple continued fraction for π

π = 3 + \frac{1}{7 + \frac{1}{15 + \frac{1}{1 + \frac{1}{292 + \frac{1}{1 + \frac{1}{1 + ...}}}}}}  (1.172)

CHAPTER 1. REMARKS ON THE COMPUTATION OF π 19 there is no pattern in the occuring numbers,

1.8.2 other continued fractions for π

\frac{4}{π} = 1 + \frac{1^{2}}{2 + \frac{3^{2}}{2 + \frac{5^{2}}{2 + \frac{7^{2}}{2 + \frac{9^{2}}{2 + \frac{11^{2}}{2 + ...}}}}}}  (1.173)

(Brouncker, 1658)

\frac{4}{π} = 1 + \frac{1^{2}}{3 + \frac{2^{2}}{5 + \frac{3^{2}}{7 + \frac{4^{2}}{9 + \frac{5^{2}}{11 + ...}}}}}  (1.174)

(cf. [43])

\frac{6}{π^{2} − 6} = 1 + \frac{1^{2}}{1 + \frac{1 · 2}{1 + \frac{2^{2}}{1 + \frac{2 · 3}{1 + \frac{3^{2}}{1 + \frac{3 · 4}{1 + \frac{4^{2}}{1 + ...}}}}}}}  (1.175)

\frac{12}{π^{2}} = 1 + \frac{1^{4}}{3 + \frac{2^{4}}{5 + \frac{3^{4}}{7 + \frac{4^{4}}{9 + \frac{5^{4}}{+...}}}}}  (1.176)

1.9 Series for π

\frac{π}{4} = arctan 1  (1.177)
= 1 − \frac{1}{3} + \frac{1}{5} − \frac{1}{7} + \frac{1}{9} − \frac{1}{11} + \frac{1}{13} + −...  (1.178)

(Gregory, 1671). The error of the truncated series is about one half of the first neglected term.

Applying the Euler transform (cf. [41] p.253-255) to 1.177 gives the series

\frac{π}{2} = 1 + \frac{1}{3} + \frac{1 · 2}{3 · 5} + \frac{1 · 2 · 3}{3 · 5 · 7} + ...  (1.179)
= 1 + \frac{1}{3} (1 + \frac{2}{5} (1 + \frac{3}{7} (1 + ...)))  (1.180)

which is used in the spigot algorithm, cf. [9]. In [1] the following acceleration of the arctan-series is given:

arctan x = ∑_{k=0}^{n−1} (−1)^{k} \frac{x^{2k+1}}{2k + 1} + (−1)^{n} \frac{1}{2} x^{2n−1} ∑_{k=0}^{∞} (\frac{2x^{2}}{x^{2} + 1})^{k+1} \frac{k!}{((2n + 1))_{k+1}}  (1.181)

where ((2n + 1))_{k+1} denotes (2n + 1)(2n + 3)...(2n + 2k + 1). The error of the truncated series is less than |1 + x| times the first neglected term. For x = 1 (formula 1.177) and n = 500 this is

\frac{π}{4} = 1 − \frac{1}{3} + \frac{1}{5} − +... − \frac{1}{999} +  (1.182)
+ \frac{1}{2} (\frac{1}{1001} + \frac{1!}{1001 · 1003} + \frac{2!}{1001 · 1003 · 1005} + \frac{3!}{1001 · 1003 · 1005 · 1007} + ...)

\frac{π}{6} = arcsin \frac{1}{2}  (1.183)
= \frac{1}{2} + \frac{1}{2} (\frac{1}{3 · 2^{3}} ) + \frac{1 · 3}{2 · 4} (\frac{1}{5 · 2^{5}} ) + \frac{1 · 3 · 5}{2 · 4 · 6} (\frac{1}{7 · 2^{7}} ) + \frac{1 · 3 · 5 · 7}{2 · 4 · 6 · 8} (\frac{1}{9 · 2^{9}} ) + ... (1.184)

(Newton, 1665)

\frac{π}{4} = \frac{3}{4} + \frac{1}{2 · 3 · 4} − \frac{1}{4 · 5 · 6} + \frac{1}{6 · 7 · 8} − \frac{1}{8 · 9 · 10} + \frac{1}{10 · 11 · 12} − +...  (1.185)

\frac{4}{π} = 1 + \frac{1}{4} + (\frac{1 · 1}{2 · 4})^{2} + (\frac{1 · 1 · 3}{2 · 4 · 6})^{3} + (\frac{1 · 1 · 3 · 5}{2 · 4 · 6 · 8})^{4} + ...  (1.186)

(Gauss)

\frac{4}{π} = 1 + \frac{1}{2} + \frac{1}{2} (\frac{1}{2})^{2} + \frac{1}{2} (\frac{1 · 3}{2 · 4})^{2} + \frac{1}{2} (\frac{1 · 3 · 5}{2 · 4 · 6})^{2} + ...  (1.187)

\frac{2}{π} = 1 − 5 (\frac{1}{2})^{3} + 9 (\frac{1 · 3}{2 · 4})^{3} − 13 (\frac{1 · 3 · 5}{2 · 4 · 6})^{3} + −...  (1.188)

(Ramanujan, cf. p.7 in [46])

π = 3 \sqrt{3} ∑_{n=1}^{∞} \frac{(n!)^{2}}{(2n)! n}  (1.189)

π = 3 \sqrt{3} ∑_{n=0}^{∞} \frac{1}{(3n + 1) (3n + 2)}  (1.190)

Using the identity

π = ∑_{i=0}^{∞} \frac{1}{16^{i}} (\frac{4}{8i + 1} − \frac{2}{8i + 4} − \frac{1}{8i + 5} − \frac{1}{8i + 6})  (1.191)

it is possible to compute some hexadecimal digits of π without computing any of the preceding digits. See the article [35] for the algorithm. A similar series is

π = ∑_{i=0}^{∞} \frac{(−1)^{i}}{4^{i}} (\frac{2}{4i + 1} + \frac{2}{4i + 2} + \frac{1}{4i + 3})  (1.192)

π = 3 + \frac{1}{60} (8 + \frac{2 · 3}{7 · 8 · 3} (13 + \frac{3 · 5}{10 · 11 · 3} (18 + \frac{4 · 7}{13 · 14 · 3} (23 + ...))))  (1.193)

(Gosper, cf. [52])

∑_{n=1}^{∞} \frac{(−1)^{n+1}}{∑_{k=1}^{n} k^{2}} = 6 (π − 3)  (1.194)

(from [10], p.101) F.Bellard gives

740025 π + 20379280 = ∑_{n=1}^{∞} \frac{3 P (n)}{\binom{7 n}{2 n} 2^{n−1}}  (1.195)

where

P (n) := −885673181 n^{5} + 3125347237 n^{4} − 2942969225 n^{3}  (1.196)
+1031962795 n^{2} − 196882274 n + 10996648

π = log \frac{1}{x} − 2 x^{4} − 13 x^{8} − \frac{368}{3} x^{12} − ...  (1.197)

where x = \frac{1}{2} \frac{2^{1/4} − 1}{2^{1/4} + 1}

1.10 Miscellaneous formulas for π

e^{\sqrt{−1} π} = −1  (1.198)

(Euler) In [2] integrals of the form

I_{n,m} = ∫_{0}^{1} \frac{x^{m} (1 − x)^{n}}{(1 + x^{2})}  (1.199)

CHAPTER 1. REMARKS ON THE COMPUTATION OF π 22 examples are

I_{4,4} = ∫_{0}^{1} \frac{x^{4} (1 − x)^{4}}{(1 + x^{2})} = \frac{22}{7} − π  (1.200)
I_{2,4} = π − \frac{47}{15}  (1.201)
I_{6,12} = 16 π − \frac{153966181}{3063060}  (1.202)
I_{32,32} = 16384 π − \frac{316945148388686672766347599664}{6157640021368865976621675}  (1.203)

The fractions on the rhs. are, as shown in the paper, approximations for π, the last gives 23 correct digits.

π = \frac{426880 \sqrt{10005}}{13591409 (_{3}F_{2}(\frac{1}{6}, \frac{1}{2}, \frac{5}{6}; 1, 1; A) − B_{3}F_{2}(\frac{7}{6}, \frac{3}{2}, \frac{11}{6}; 2, 2; A))}  (1.204)

where

A := −\frac{1}{151931373056000}  (1.205)

(1.206)

B := \frac{30285563}{1651969144908540723200}  (1.207)

(Chudnovskys) From the Poisson summation formula follows:

∑_{x=−∞}^{+∞} (\frac{sin x}{x}) = π  (1.208)
∑_{x=−∞}^{+∞} (\frac{sin x}{x})^{2} = π  (1.209)
∑_{x=−∞}^{+∞} (\frac{sin x}{x})^{3} = \frac{4}{3} π  (1.210)
∑_{x=−∞}^{+∞} (\frac{sin x}{x})^{4} = \frac{2}{3} π  (1.211)

(cf. appendix B).

1.11 A bit recursion for 1/π

a_{0} := tan(1)  (1.212)
a_{k+1} := \frac{2 a_{k}}{1 − a_{k}^{2}}  (1.213)
b(x) := \{ \begin{matrix}1 & if x < 0 \\ 0 & else \end{matrix}  (1.214)

then

∑_{k=0}^{∞} \frac{b(a_{k})}{2^{k+1}} = \frac{1}{π}  (1.215)

∑_{k=0}^{∞} \frac{b(a_{k})}{2^{k+1}} = \frac{arctan(a_{0})}{π}  (1.216)

See and the paper [40].

1.12 A self correcting iteration for π

Use

sin \frac{π}{2} = 0  (1.217)

therefor the iteration defined by

x_{0} = \frac{π}{2} + ϵ_{0}  (1.218)
x_{k+1} = x_{k} + sin x_{k}  (1.219)

converges towards π. Convergence is of third order: if x_{k} = \frac{π}{2} + ϵ_{k} then

ϵ_{k+1} ≈ \frac{ϵ_{k}^{3}}{6}  (1.220)

Of course, this is not an ‘efficient’ iteration as the computation of a sine function is required. Similar iterations exist for cos() and tan(), see [42].

Appendix A

More arctan formulas

In what follows let A\frac{1}{x} denote arctan \frac{1}{x}.

arctan \frac{1}{x} = arctan \frac{1}{x + d} + arctan \frac{1}{x + \frac{x^{2}+1}{d}}  (A.1)
arctan \frac{1}{x} + arctan \frac{1}{y} = arctan \frac{1}{\frac{x y−1}{x+y}}  (A.2)
arctan \frac{1}{z} = arctan \frac{1}{x_{1}} + arctan \frac{1}{x_{2}} + ... + arctan \frac{1}{x_{n}}  (A.3)
⟺ z = \frac{Re(∏_{k=1}^{n} (x_{k} + i))}{Im(∏_{k=1}^{n} (x_{k} + i))}  (A.4)
⟺ (z^{2} + 1) = \begin{matrix}∏ & {n \atop k=1} & (x_{k}^{2} + 1) \\ (Im(∏_{k=1}^{n} (x_{k} + i))) & 2 \end{matrix}  (A.5)
arctan \frac{1}{x} = arctan \frac{1}{y} + arctan \frac{1}{z}  (A.6)
⟺ (x^{2} + 1) = \frac{(y^{2} + 1)(z^{2} + 1)}{(y + z)^{2}} = (y − x)(z − x)  (A.7)
\frac{k π}{4} = arctan \frac{b_{1}}{a_{1}} + arctan \frac{b_{2}}{a_{2}} + ... + arctan \frac{b_{n}}{a_{n}}  (A.8)
⟺ (a_{1} + i b_{1})(a_{2} + i b_{2})...(a_{n} + i b_{n})(1 − i)^{k} ∈ ℝ  (A.9)
\frac{k π}{4} = arctan \frac{1}{a_{1}} + arctan \frac{1}{a_{2}} + ... + arctan \frac{1}{a_{n}}  (A.10)
⟺ (a_{1} + i)(a_{2} + i)...(a_{n} + i)(1 − i)^{k} ∈ ℝ  (A.11)
\frac{k π}{4} = m_{1} arctan \frac{1}{a_{1}} + m_{2} arctan \frac{1}{a_{2}} + ... + m_{n} arctan \frac{1}{a_{n}}  (A.12)
⟺ (a_{1} + i)^{m_{1}}(a_{2} + i)^{m_{2}} … (a_{n} + i)^{m_{n}}(1 − i)^{k} ∈ ℝ  (A.13)

APPENDIX A. MORE ARCTAN FORMULAS 25 Let

a > b, gcd(a, b) = 1, a α + b β = 1 (A.14)

then

A\frac{1}{a}b = A\frac{1}{−β} α + arctan \frac{1}{a β − b α}  (A.15)

because if

r := a β − b α  (A.16)
arctan \frac{1}{z} := arctan \frac{1}{a/b} + arctan \frac{1}{r}  (A.17)

then

z = \frac{(a/b) r − 1}{(a/b) + r}  (A.18)
= \frac{a(α b − β a) − b}{a + b(α b − β a)}  (A.19)
= \frac{a(α b − β a) − b(1)}{a(1) + b(α b − β a)}  (A.20)
= \frac{a(α b − β a) − b(α a + β b)}{a(α a + β b) + b(α b − β a)}  (A.21)
= \frac{−a^{2} β − b^{2} β}{α a^{2} + α b^{2}}  (A.22)
= \frac{−β}{α}  (A.23)
A\frac{1}{x} = A\frac{1}{x + 1} + A\frac{1}{x^{2} + x + 1}  (A.24)
\frac{π}{4} = A\frac{1}{1} = ∑_{x=1}^{∞} A\frac{1}{x^{2} + x + 1} =  (A.25)
= A\frac{1}{3} + A\frac{1}{7} + A\frac{1}{13} + A\frac{1}{21} + A\frac{1}{31} + A\frac{1}{43} + A\frac{1}{57} + ...  (A.26)
A\frac{1}{2x + 1} = A\frac{1}{2x + 3} + A\frac{1}{2x^{2} + 4x + 2}  (A.27)
\frac{π}{4} = ∑_{n=1}^{∞} A\frac{1}{2n^{2}}  (A.28)
= A\frac{1}{2} + A\frac{1}{8} + A\frac{1}{18} + A\frac{1}{50} + A\frac{1}{98} + A\frac{1}{128} + …  (A.29)

APPENDIX A. MORE ARCTAN FORMULAS 26 define

jt(a_{0}, a_{1}, m_{1}, m_{2}, 0) := a0  (A.30)
jt(a_{0}, a_{1}, m_{1}, m_{2}, 1) := a1  (A.31)
jt(a_{0}, a_{1}, m_{1}, m_{2}, n) := m_{1} jt(a_{0}, a_{1}, m_{1}, m_{2}, n − 1) + m_{2} jt(a_{0}, a_{1}, m_{1}, m_{2}, n − 2) (A.32)

then

jt(a_{0}, a_{1}, m_{1}, m_{2}, n) = C_{1} x_{1}^{n} + C_{2} x_{2}^{n} where: (A.33)
x_{1,2}^{2} = m_{1} x_{1,2} + m_{2}, C_{1} + C_{2} = a_{0}, C_{1} x_{1} + C_{2} x_{2} = a_{1}  (A.34)
\frac{π}{8} = ∑_{n=1}^{∞}(−1)^{n}A\frac{1}{jt(0, 1, 2, 1, 2n)} = A\frac{1}{2} − A\frac{1}{12} + A\frac{1}{70} − A\frac{1}{408} + A\frac{1}{2378} − + … (A.35)
\frac{π}{8} = ∑_{n=1}^{∞} A\frac{1}{jt(1, 1, 2, 1, 2n)} =  (A.36)
= ∑_{n=1}^{∞}(−1)^{n} A\frac{1}{(1 − \sqrt{2})^{2n} + (1 + \sqrt{2})^{2n}}  (A.37)
= A\frac{1}{3} + A\frac{1}{17} + A\frac{1}{99} + A\frac{1}{577} + A\frac{1}{3363} + …  (A.38)
f(n) := jt(0, 1, 2, 1, 2n) jt(0, 1, 2, 1, 2n + 1)^{2} + jt(1, 1, 2, 1, 2n + 1)  (A.39)
eg. f(0) = 2 · 5^{2} + 7 = 57, f(1) = 12 · 29^{2} + 41 = 10133, ...  (A.40)
\frac{π}{8} = ∑_{n=1}^{∞} 3^{n} A\frac{1}{jt(0, 1, 2, 1, 2n + 1)} − ∑_{n=1}^{∞} 3^{n} A\frac{1}{f(n)}  (A.41)
= A\frac{1}{5} + 3 (A\frac{1}{29} + 3 (A\frac{1}{169} + 3 (A\frac{1}{5741} + …))) −  (A.42)
− (A\frac{1}{57} + 3 (A\frac{1}{10133} + 3 (A\frac{1}{1999509} + …)))
A\frac{1}{P_{n}} = 4 A\frac{1}{Q_{n+2}} + A\frac{1}{P_{n+4}} − 2 A\frac{1}{q(Q_{n+2})}(n odd)  (A.43)
\frac{π}{4} = A\frac{1}{P_{1}} = 4 (A\frac{1}{5} + A\frac{1}{169} + A\frac{1}{5741} + …) −  (A.44)
− 2 (A\frac{1}{q(5)} + A\frac{1}{q(169)} + A\frac{1}{q(5741)} + …)
with g(n) := jt(0, 1, 2, 1, n + 3) jt(0, 1, 2, 1, n + 2)^{2} + jt(1, 1, 2, 1, n + 2)  (A.45)
A\frac{1}{jt(1, 1, 2, 1, n)} = 5 A\frac{1}{jt(1, 1, 2, 1, n + 2)} + 2 A\frac{1}{jt(1, 1, 2, 1, n + 3)}  (A.46)
− A\frac{1}{q(jt(0, 1, 2, 1, n + 2))} + 2 A\frac{1}{g(n)} (n odd)
\frac{π}{4} = 2 A\frac{1}{3} + A\frac{1}{7} = 2 A\frac{1}{3} + 2 A\frac{1}{17} + A\frac{1}{41} =  (A.47)

= (12 A\frac{1}{17} + 5 A\frac{1}{41}) − 2 A\frac{1}{70} − 4 A\frac{1}{307}  (A.48)
= (70 A\frac{1}{99} + 29 A\frac{1}{239}) − 2 A\frac{1}{70} − 4 A\frac{1}{307} − 12 A\frac{1}{12238} − 24 A\frac{1}{58911}(A.49)
= (408 A\frac{1}{577} + 169 A\frac{1}{1393}) −  (A.50)
− (2 A\frac{1}{70} + 4 A\frac{1}{307} + 12 A\frac{1}{12238} + 24 A\frac{1}{58911} + 70 A\frac{1}{...} + 140 A\frac{1}{...})
\frac{π}{4} = 2 (\sqrt{2} − 1) − ∑_{n=1}^{∞} (jt(0, 1, 2, 1, 2n) A\frac{1}{q(jt(0, 1, 2, 1, 2n + 1))}+  (A.51)

+ 2 jt(0, 1, 2, 1, 2n) A\frac{1}{g(2n + 1)})

\frac{π}{4} = 3 ∑_{n=1}^{∞} A\frac{1}{jt(1, 1, 3, 1, 2n)} − ∑_{n=1}^{∞} A\frac{1}{jt(1, 1, 3, 1, 2n)}  (A.52)

= 3 (A\frac{1}{4} + A\frac{1}{43} + A\frac{1}{469} + A\frac{1}{5116} + …)  (A.53)
− (A\frac{1}{q(4)} + A\frac{1}{q(43)} + A\frac{1}{q(469)} + A\frac{1}{q(5116)} + …)
= 3 (A\frac{1}{4} + A\frac{1}{43} + A\frac{1}{469} + A\frac{1}{5116} + …)  (A.54)
− (A\frac{1}{38} + A\frac{1}{39818} + A\frac{1}{51581558} + …)

q(n) := \frac{3n + n^{3}}{2}  (A.55)
F_{n} := jt(0, 1, 1, 1, n)  (A.56)
= F ibonacci(n) = 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...  (A.57)

A\frac{1}{x} = 2 A\frac{1}{2x} − A\frac{1}{3x + 4x^{3}}  (A.58)
\frac{π}{4} = 1 − ∑_{n=0}^{∞} 2^{n} A\frac{1}{3 2^{n} + 4 2^{3n}} = 1 − ∑_{n=0}^{∞} 2^{n} A\frac{1}{q(2^{n+1})}  (A.59)

= 1 − (A\frac{1}{7} + 2 A\frac{1}{38} + 4 A\frac{1}{268} + 8 A\frac{1}{2072} + 16 A\frac{1}{16432} + …)  (A.60)

\frac{π}{4} = ∑_{n=1}^{∞} A\frac{1}{F_{2n+1}}  (A.61)
= A\frac{1}{2} + A\frac{1}{5} + A\frac{1}{13} + A\frac{1}{34} + A\frac{1}{89} + A\frac{1}{233} + …
A\frac{1}{F_{2n}} = 3 A\frac{1}{F_{2n+2}} − A\frac{1}{F_{2n+4}} − A\frac{1}{q(F_{2n+2})} ⇒  (A.62)
\frac{π}{4} = \frac{3\sqrt{5} − 5}{2} − ∑_{n=1}^{∞} F_{2n} A\frac{1}{q(F_{2n+2})}  (A.63)

= \frac{3\sqrt{5} − 5}{2} − (1 A\frac{1}{18} + 3 A\frac{1}{268} + 8 A\frac{1}{4662} + 21 A\frac{1}{83270} + …)  (A.64)

A\frac{1}{x + \sqrt{x^{2} − 4}} = ∑_{n=1}^{∞} A\frac{1}{x jt(0, 1, x, −1, n)^{2}}  (A.65)

for x = 2 :

A\frac{1}{2 + \sqrt{2^{2} − 4}} = A\frac{1}{1}  (A.66)
= \frac{π}{4} = ∑_{n=1}^{∞} A\frac{1}{2 n^{2}}  (A.67)

for x = 4 :

A\frac{1}{4 + \sqrt{4^{2} − 4}} = A\frac{1}{2 + \sqrt{3}}  (A.68)
= \frac{π}{12} = ∑_{n=1}^{∞} A\frac{1}{4 jt(0, 1, 4, −1, n)^{2}}  (A.69)
= A\frac{1}{4} + A\frac{1}{64} + A\frac{1}{900} + A\frac{1}{12544} + A\frac{1}{174724} + A\frac{1}{2433600} + ... (A.70)
A\frac{1}{2x^{2}} = 2 A\frac{1}{4x^{2} − 2x + 1} − A\frac{1}{4x^{2} + 2x + 1} ⇒  (A.71)
\frac{π}{4} = ∑_{n=1}^{∞} [A\frac{1}{4n^{2} − 2n + 1} + A\frac{1}{4n^{2} + 2n + 1}]  (A.72)
A\frac{1}{2x^{2}} = 2 A\frac{1}{4x^{2} + 2x + 1} − A\frac{1}{2x^{3} + x} + A\frac{1}{4x^{3} + 3x}  (A.73)
A\frac{1}{2x^{2}} = 2 A\frac{1}{4x^{2} − 2x + 1} + A\frac{1}{2x^{3} + x} − A\frac{1}{4x^{3} + 3x} ⇒  (A.74)
\frac{π}{4} = ∑_{n=1}^{∞} [A\frac{1}{4n^{2} + 2n + 1} + A\frac{1}{2n^{3} + n} − A\frac{1}{4n^{3} + 3n}]  (A.75)

\frac{π}{6} = ∑_{n=0}^{∞} A\frac{1}{2 jt(1, 3, 4, −1, n)^{2}}  (A.76)
= A\frac{1}{2} + A\frac{1}{18} + A\frac{1}{242} + A\frac{1}{3362} + A\frac{1}{46818} + A\frac{1}{652082} + ...  (A.77)

\frac{π}{4} = ∑_{n=1}^{∞} A\frac{1}{2n^{2}} = (by changing the order of summation)  (A.78)

= ∑_{n=0}^{∞} \frac{(−1)^{n}}{(2n + 1)2^{2n+1}} ζ(4n + 2)  (A.79)

Appendix B

Sums and integrals of sin(x)/x

For k ∈ ℤ

∑_{x=−∞}^{+∞} (\frac{sin x}{x})^{k} = ∫_{−∞}^{+∞} (\frac{sin x}{x})^{k}dx  (B.1)
= r_{k} π  (B.2)

where r_{k} is a rational number. The equality of the integral with the sum follows from the Euler-MacLaurin summation formula (cf. [6] section 9.5 and [7] section 0.7.1.3). That the sums are equal to π times a rational follows from the Poisson summation formula and that

\frac{sin(x)}{x} = ∫_{−∞}^{+∞} q(x)  (B.3)

where

q(x) := \{ \begin{matrix}π & if − \frac{1}{2} < x < +\frac{1}{2} \\ 0 & else \end{matrix}  (B.4)

(i.e. \frac{sin(x)}{x} is the Fourier transform of q(x)). (\frac{sin(x)}{x})^{k} is the fourier transform of the k-1 – fold self convolution of q(x).

The first values of r_{k} are:

\begin{matrix}k & r_{k} \\ 1 & 1 \\ 2 & 1 \\ 3 & 3 / 4 \\ 4 & 2 / 3 \\ 5 & 115 / 192 \\ 6 & 11 / 20 \\ 7 & 5887 / 11520 \\ 8 & 151 / 315 \\ 9 & 259723 / 573440 \\ 10 & 15619 / 36288 \\ 11 & 381773117 / 928972800 \\ 12 & 655177 / 1663200 \\ 13 & 20646903199 / 54499737600 \\ 14 & 27085381 / 74131200 \\ 15 & 467168310097 / 1322526965760 \end{matrix}

APPENDIX B. SUMS AND INTEGRALS OF SIN(X)/X 30 Paul Zimmerman found an order 2 recursion for the more general integral

c(k, j) = ∫_{−∞}^{∞} \frac{sin(x)^{k}}{x^{j}}  (B.5)

It is

c(k, j) = k \frac{(k − 1) c(k − 2, j − 2) − k c(k, j − 2)}{(j − 1) (j − 2)}  (B.6)

with

c(k, j) = \binom{k − j}{k/2 − j/2} \frac{π}{2^{k−j}} for j = 1, 2  (B.7)

Bibliography

[1] C.Tripp: Inverse factorial series, The Mathematical Gazette (67) 1983 pp.183-188

[2] F.Chorlton: Pancake functions and approximations to π, The Mathematical Gazette (79) 1995 pp.371-374

[3] B.C.Carlson: Algorithms involving arithmetic and geometric means, Amer. Math. Monthly (78) 1971 pp.496-505

[4] D.A.Cox: The arithmetic geometric means of Gauss, L’Enseign. Math. (2) 1984 pp.275-330

[5] D.E.Knuth: The Art of Computer Programming, 2.edition, Volume 2: Seminumerical Algorithms, Addison-Wesley 1981,

online errata list at http://www-cs-staff.stanford.edu/~knuth/

[6] R.L.Graham, D.E.Knuth, O.Patashnik: Concrete Mathematics, Addison-Wesley, New York 1988

[7] I.N.Bronstein, K.A.Semendjajew, G.Grosche, V.Ziegler, D.Ziegler, ed: E.Zeidler: Teubner-Taschenbuch der Mathematik, vol. 1+2, B.G.Teubner Stuttgart, Leipzig 1996, the new edition of Bronstein’s Handbook of Mathematics, (english edition in preparation)

[8] H.Cohen: A Course in Computational Algebraic Number Theory, Springer Verlag, Berlin Heidelberg 1993,

errata list online at ftp://megrez.math.u-bordeaux.fr/pub/cohenbook/

[9] S.Rabinowitz, S.Wagon: A Spigot Algorithm for the Digits of π, Amer. Math. Monthly, (102) March 1995 pp.195-203

[10] J.M.Borwein, P.B.Borwein: Pi and the AGM, Wiley 1987

[11] J.M.Borwein, P.B.Borwein: On the complexity of familiar functions and numbers, SIAM Rev. Vol.30 December 1988, pp.589-601

[12] J.M.Borwein, P.B.Borwein: More Ramanujan-type Series for 1/π, in: ‘Ramanujan Revisited’, Proceedings of the Centenary Conference, Univ. of Illinois at Urbana-Champaign June 1-5, 1987 pp.359-374

[13] J.M.Borwein, P.B.Borwein: Scientific American, March 1988

[14] J.M.Borwein, P.B.Borwein: More quadratically Converging Algorithms for Pi, Mathematics of Computation, (46), January 1986, pp.247-253

[15] J.M.Borwein, P.B.Borwein: The Arithmetic-Geometric Mean and Fast Computation of Elementary Functions, SIAM Rev. (26) 1984, pp.351-365

[16] J.M.Borwein, P.B.Borwein: Cubic and higher order algorithms for π, Cand. Math. Bull. Vol 27 (4) 1984,

online at http://www.cecm.sfu.ca/~pborwein/

[17] J.M.Borwein, P.B.Borwein, F.Garvan: Some cubic modular identities of Ramanujan, Trans. A.M.S. 343, 1994, pp.35-47

[18] J.M.Borwein, P.B.Borwein: Some modular identities of Ramanujan useful in approximating π, Proceedings of the American Mathematical Society, (95), November 1985, pp.365-371

[19] J.M.Borwein, B.B.Borwein: A Very Rapidly Convergent Product Expansion for π, BIT (23) 1983 pp.538-540

[20] D.H.Bailey, J.M.Borwein, P.B.Borwein and S.Plouffe: The Quest for Pi, 1996,

online at http://www.cecm.sfu.ca/~pborwein/

[21] B.C.Berndt: An overview of Ramanujan’s notebooks, Proc. Conf. Karl der Grosse (to appear)

online at http://www.math.uiuc.edu/ berndt/

[22] B.C.Berndt: Ramanujan’s Modular Equations, pp.313-333 in ‘Ramanujan Revisited’, Proceedings of the Centenary Conference, Univ. of Illinois at Urbana-Champaign June 1-5, 1987

[23] S.Ramanujan: Modular Equations and Approximations to π, Quart. J. Math. (45) 1914, pp.350-372 in: G.H.Hardy, P.V.Seshu Aiyar, B.M.Wilson: Collected Papers of Srinivasa Ramanujan, Chelsea Publ. 1927, reprinted 1962

[24] C.Størmer: Sur l’application de la theorie des nombres entiers complexes a la solution en nombres rationels x_{1}x_{2}...x_{n}c_{1}c_{2}...c_{n}, k de l’equation: c_{1}arctg x_{1} + c_{2}arctg x_{2} + .... + c_{n}arctg x_{n} = k \frac{π}{4} , Archiv for Math. og Naturv., (19) 1896, no.3, pp.1-96

[25] J.Todd: A Problem on Arctangent Relations, MAA Monthly, (8) 1949, pp.517-528

[26] D.H.Lehmer: On Arccotangent Relations for π, MAA Monthly (45) 1938, pp.657-664

[27] D.H.Lehmer: A cotangent analogue of continued fractions, Duke Math, Journal (4) 1938, p.323-340

[28] D.Shanks, J.W.Wrench: Calculation of π to 100,000 Decimals, Math. Comp., 1961

[29] D.H.Bailey: The Computation fo π To 29,360,000 Decimal Digits Using Borweins’ Quartically Convergent Algorithm,

online at http://www.nas.nasa.gov//~dbailey/dbailey.html

[30] D.H.Bailey: Numerical Results on the Transcendence of Constants Involving π, e, and Euler’s Constant

[31] D.H.Bailey, S.Plouffe: Recognizing Numerical Constants

online at http://www.cecm.sfu.ca/organics/papers/

[32] D.H.Bailey, J.M.Borwein, P.B.Borwein: Ramanujan, Modular Equations, and Approximations to Pi or How to compute One Billion Digits of Pi, Amer. Math. Monthly, (96) 1989, pp.201-219,

(an extended version is) online at http://www.cecm.sfu.ca/organics/papers/

[33] D.H.Bailey: A Portable High Performance Multiple Precision Package, RNR Technical Report RNR-90-022, May 18, 1993

online at http://www.nas.nasa.gov//~dbailey/dbailey.html

[34] Newman: A Simplified Version of Fast Algorithms of Brent and Salamin, Math. Comp. (44), 1985, pp.207-210

[35] D.Bailey, P.Borwein, S.Plouffe: On the rapid computation of various polylogarithmic constants,

online at http://www.cecm.sfu.ca/~pborwein/

[36] E.Salamin: Computation of π Using the Arithmetic-Geometric Mean, Mathematics of Computation (30), july 1976, pp.565-570 [37] S.Ramanujan: Squaring the Circle, Journal of the Indian Mathematical Society, V, p.132, 1913

in: G.H.Hardy, P.V.Seshu Aiyar, B.M.Wilson: Collected Papers of Srinivasa Ramanujan, Chelsea Publ. 1927, reprinted 1962

[38] J.M.Borwein, F.G.Garvan: Approximations to π via the Dedekind eta function, (1996)

    online at http://www.cecm.sfu.ca/~jborwein/

[39] D.V.Chudnovsky, G.V.Chudnovsky: Approximations and complex multiplication according to Ramanujan, pp. 375-472 in ‘Ramanujan Revisited’, Proceedings of the Centenary Conference, Univ. of Illinois at Urbana-Champaign June 1-5, 1987

[40] J.M.Borwein, R.Girgenson: Addition theorems and binary expansions, Canadian J. Math. (47) 1995, pp.262-273,

    online at http://www.cecm.sfu.ca/~jborwein/

[41] K.Knopp: Theorie und Anwendung der unendlichen Reihen, Springer-Verlag 1882

[42] M.Beeler, R.W.Gosper, R.Schroeppel: HAKMEM. MIT AI Memo 239, Feb. 29, 1972, Retyped and converted to html by Henry Baker, April 1995,

    online at: ftp://ftp.netcom.com/pub/hb/hbaker/hakmem/hakmem.html/#contents

[43] L.Lorentzen and H.Waadeland: Continued Fractions and Applications, North-Holland 1992 pp.561-562

[44] H-O.Peitgen, H.Jürgens, D.Saupe: Chaos and Fractals, Springer 1992

[45] G.M.Phillips: Archimedes and the complex plane, Amer. Math. Monthly. (91) 1984 pp.108-114 [46] Hardy: Elliptic and Modular Functions, in: Ramanujan, Twelve Lectures on Subjects Suggested

by his Life and Work, Chelsea Publ. Co 1940

[47] F.L.Bauer: A Series from the Karanapaddhati, The Mathematical Intelligencer, (17) 1995 pp.3-4 [48] D.Gale: The Truth and Nothing But the Truth, The Mathematical Intelligencer, (11) 1989 pp.62-67 [49] M.Keith: Circle Digits. A Self Referential Story, The Mathematical Intelligencer, (8) 1986 pp.56-57 [50] F.Bellard: A new formula to compute the n’th binary digit of pi, January 20, 1997

    online at http://www-stud.enst.fr/ bellard/

[51] M.Wetherfield: The enhancement of Machin’s formula by Todd’s process, The Math. Gaz. 1997, pp.333-344

[52] R.W.Gosper: Acceleration of series, Memo no. 304, M.I.T. Artificial Intelligence Laboratory, Cambridge, Mass. 1974