100% found this document useful (1 vote)
185 views40 pages

P. Borwein. Ramanujan, Modular Equations, and Approximations To Pi

This document discusses methods for computing digits of Pi using Ramanujan's work on modular equations and approximations. It introduces Ramanujan's formula for approximating Pi, as well as two algorithms (Algorithms 1 and 2) that were inspired by Ramanujan's analysis and converge to Pi quartically and quintically, respectively. Thirteen iterations of Algorithm 2 can provide over one billion digits of Pi. The document aims to explain the origin and mathematical beauty of these approaches, which involve subtle modular identities.

Uploaded by

raja5293
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
185 views40 pages

P. Borwein. Ramanujan, Modular Equations, and Approximations To Pi

This document discusses methods for computing digits of Pi using Ramanujan's work on modular equations and approximations. It introduces Ramanujan's formula for approximating Pi, as well as two algorithms (Algorithms 1 and 2) that were inspired by Ramanujan's analysis and converge to Pi quartically and quintically, respectively. Thirteen iterations of Algorithm 2 can provide over one billion digits of Pi. The document aims to explain the origin and mathematical beauty of these approaches, which involve subtle modular identities.

Uploaded by

raja5293
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Ramanujan, Modular Equations, and

Approximations to Pi or How to compute One


Billion Digits of Pi
D.H. Bailey
NASA Ames Research Center, Moett Field, CA 94035
J.M. Borwein and P.B. Borwein
Math Dept., Simon Fraser Univ., Burnaby, B.C, V5A 1S6 Canada
August 30, 1996

Contents
1 Introduction. 3
2 The State of Our Current Ignorance. 5
3 Matters Computational 7
4 Complexity Concerns 11
5 The Miracle of Theta Functions 14
6 Ramanujan's Solvable Modular Equations 18
7 Modular Equations and Pi 20
8 Ramanujan's sum 22
9 Sources 25
10 Appendix: One Hundred Billion Digits of Pi 28
Reprinted with permission from a version that appeared in the American Mathematical
Monthly Volume 96, (no. 3) 1989, 201-219.

1
11 Appendix: General Computational Update 29
11.1 BILLIONS : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 29
11.2 Kanada : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 30
11.3 October 12, 1995 : : : : : : : : : : : : : : : : : : : : : : : : : : : 31
12 Appendix: Landmarks 32
13 Appendix: Some Thoughts... 33
14 Appendix: Additional Discussion of Newton's Formula 33
15 Appendix: Frauds 34
15.1 Theorem : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 34
15.2 Excessive Fraud : : : : : : : : : : : : : : : : : : : : : : : : : : : : 34
15.3 Conjecture : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 35
16 Appendix: The Arithmetic-Geometric Mean Iteration 35
16.1 Equivalent Modular Parametrization : : : : : : : : : : : : : : : : 35
16.2 A Cubic Analogue of the AGM : : : : : : : : : : : : : : : : : : : 36
16.3 Equivalent Modular Parametrization : : : : : : : : : : : : : : : : 36
16.4 Some Explanations : : : : : : : : : : : : : : : : : : : : : : : : : : 37
16.5 The Quadratic s = 1=4 Iteration : : : : : : : : : : : : : : : : : : 38
16.6 Caveat Emptor: : : : : : : : : : : : : : : : : : : : : : : : : : : : : 38
17 Appendix: Ramanujan Type Series 38
Preface. The year 1987 was the centenary of Ramanujan's 1 birth. He died in
1920. Had he not died so young, his presence in modern mathematics might be
more immediately felt. Had he lived to have access to powerful algebraic manip-
ulation software, such as macsyma 2 , who knows how much more spectacular
his already astonishing career might have been.
This article will follow up one small thread of Ramanujan's work which has
found a modern computational context, namely, one of his approaches to ap-
proximating . Our experience has been that as we have come to understand
these pieces of Ramanujan's work, as they have become mathematically demys-
tied, and as we have come to realize the intrinsic complexity of these results, we
have come to realize how truly singular his abilities were. This article attempts
to present a considerable amount of material and, of necessity, little is presented
in detail. We have, however, given much more detail than Ramanujan provided.
Our intention is that the circle of ideas will become apparent and that the ner
points may be pursued through the indicated references.

1 Introduction.
There is a close and beautiful connection between the transformation theory for
elliptic integrals and the very rapid approximation of . This connection was
rst made explicit by Ramanujan in his 1914 paper \Modular Equations and
Approximations to "26]. We might emphasize that Algorithms 1 and 2 are
not to be found in Ramanujan's work, indeed no recursive approximation of 
is considered, but as we shall see they are intimately related to his analysis.
Three central examples are:
Sum 1. (Ramanujan)
p1 (4n)! 1103 + 26390n]
1= 8 X :
 9801 n=0 (n!)4 3964n
p p
Algorithm 1. Let 0 := 6 ; 4 2 and y0 := 2 ; 1. Let
yn+1 := 11 ; (1 ; yn4 )1=4
+ (1 ; yn4 )1=4
and
n+1 := (1 + yn+1 )4 n ; 22n+3 yn+1 (1 + yn+1 + yn2 +1 ):
1 See http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/ramanujan.
html for a scanned image of the bust of Ramanujan.
2 When this article was published Mathematica did not exist as a commercial product. Its
spectacular growth and that of Maple, Axiom and many other packages such as Matlab show
how quickly these tools have established themselves throughout the sciences.
Then
0 < n ; 1= < 16  4ne;24 
n

and n converges to 1= quartically (that is, with order four). Example 3
p
Algorithm 2. Let s0 := 5( 5 ; 2) and 0 := 1=2. Let
sn+1 := (z + x=z25+ 1)2s 
n
where
x := 5=sn ; 1 y := (x ; 1)2 + 7
and 1=5
 p 
z := 12 x y + y2 ; 4x3 :
Let  s2 ; 5 p 
n+1 := sn 2
n ; 5n n + sn (sn ; 2sn + 5) :
2
2
Then
0 < n ; 1 < 16  5n e;5 
n

and n converges to 1= quintically (that is, with order ve).


Each additional term in Sum 1 adds roughly eight digits, each additional
iteration of Algorithm 1 quadruples the number of correct digits, while each
additional iteration of Algorithm 2 quintuples the number of correct digits.
Thus a mere thirteen iterations of Algorithm 2 provide in excess of one billion
decimal digits of . In general, for us, pth-order convergence of a sequence fn )
to  means that n tends to  and that
jn+1 ; j  C jn ; jp
for some constant C > 0. Algorithm 1 is arguably 4 the most ecient algorithm
currently known for the extended precision calculation of . While the rates of
convergence are impressive, it is the subtle and thoroughly nontransparent na-
ture of these results and the beauty of the underlying mathematics that intrigue
us most.
Watson37], commenting on certain formulae of Ramanujan, talks of
a thrill which is indistinguishable from the thrill which I feel when I
enter the Sagrestia Nuovo of the Capella Medici and see before me
the austere beauty of the four statues representing \Day", \Night",
\Evening", and \Dawn" which Michelangelo has set over the tomb
of Giuliano de'Medici and Lorenzo de'Medici.
3 See Appendix - `One Hundred Billion Digits of Pi'
4 See Appendix - `General Computational Update'
Sum 1 is directly due to Ramanujan and appears in 26]. It rests on a
modular identity of order 58 and, like much of Ramanujan's work, appears
without proof and with only scanty motivation. The rst derivation we know of
appears in 11]. Algorithms 1 and 2 are based on modular identities of orders
4 and 5 respectively. The underlying quintic modular identity in Algorithm 2
(the relation for sn ) is also due to Ramanujan, though the rst proof is due to
Berndt and appears in 7].
One intention in writing this article is to explain the genesis of Sum 1 and
of Algorithms 1 and 2. It is not possible to give a short self-contained account
without assuming an unusual degree of familiarity with modular function theory.
Also, parts of the derivation involve considerable algebraic calculation and may
most easily be done with the aid of a symbolic manipulation package macsyma,
maple, reduce, etc.) 5 . We hope however to give a taste of methods involved.
The full details are available in 11].
A second intention is very briey to describe the role of these and related
approximations in the recent extended precision calculations of . In part this
entails a short discussion of the complexity and implementation of such calcu-
lations. This centers on a discussion of multiplication by fast Fourier transform
methods. Of considerable related interest is the fact that these algorithms for
 are provably close to the theoretical optimum.

2 The State of Our Current Ignorance.


 is almost certainly the most natural6 of the transcendental numbers, arising
as the circumference of a circle of unit diameter. Thus, it is not surprising that
its properties have been studied for some twenty-ve hundred years. What is
surprising is how little we actually know.
We know that  is irrational, and have known this since Lambert's7 proof
of 1771 (see 5]). We have known that  is transcendental8 since Lindemann's9
proof of 1882 23]. We also know that  is not a Liouville number. Mahler
proved this in 1953. An irrational number  is Liouville if, for any n, there exist
integers p and q so that  
0 <  ; pq  < q1n :
5 See Footnote 2.
6 See Appendix - `Landmarks'
7 See http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/lambert.html
for a scanned image of Lambert's proof.
8 See http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/hilbert.html for
Hilbert's scanned proof
9 See
http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/lindemann. html for a
scanned image of Lindemann's proof
Liouville showed these numbers are all transcendental. In fact we know that
 p  1
 ;  > 14:65 (2:1)
q q
for p q integral with q suciently large. This irrationality estimate, due to
Chudnovsky and Chudnovsky 16] is certainly not the best possible 10 . It is likely
that 14.65 should be replaced by 2 +  for any  > 0. Almost all transcendental
numbers satisfy such an inequality. We know a few related results for the rate
of algebraic approximation. The results may be pursued in 4] and 11].
We know that e is transcendental. This follows by noting that e = (;1);i
and applying the Gelfond-Schneider theorem 4]. We know that  + log 2 +
p
2 log 3 is transcendental. This result is a consequence of the work that won
Baker a Fields Medal in 1970. And we know a few more than the rst two
hundred million digits of the decimal expansion for  (Kanada, see Section 3).
The state of our ignorance is more profound. We do not know whether such
basic constants as  + e, =e or log  are irrational, let alone transcendental. The
best we can say about these three particular constants is that they cannot satisfy
any polynomial of degree eight or less with integer coecients of average size
less than 109 3]. This is a consequence of some recent computations employing
the Ferguson-Forcade algorithm 17]. We don't know anything of consequence
about the simple continued fraction of , except (numerically) the rst 17 million
terms, which Gosper computed in 1985 using Sum 1. Likewise, apart from
listing the rst many millions of digits of , we know virtually nothing about
the decimal expansion of . It is possible, albeit not a good bet, that all but
nitely many of the decimal digits of  are in fact 0's and 1's. Carl Sagan's recent
novel Contact rests on a similar possibility. Questions concerning the normality
of or the distribution of digits of particular transcendentals such as  appear
completely beyond the scope of current mathematical techniques. The evidence
from analysis of the rst thirty million digits is that they are very uniformly
distributed 2]. The next one hundred and seventy million digits apparently
contain no surprises.
In part we perhaps settle for computing digits of  because there is little
else 11 we can currently do. We would be amiss, however, if we did not em-
phasize that the extended precision calculation of  has substantial application
as a test of the \global integrity" of a supercomputer. The extended precision
calculations described in Section 3 uncovered hardware errors which had to be
corrected before those calculations could successfully run. Such calculations,
10 This estimate has now been improved to
 p  1
 ; q  > q8:02
by M. Hata (Acta Arithmetica 63 (1993))
11 See Appendix - `Some Thoughts...'
implemented as in Section 4, are apparently now used routinely to check super-
computers before they leave the factory. A large-scale calculation of  is entirely
unforgiving 12 it soaks into all parts of the machine and a single bit awry leaves
detectable consequences.

3 Matters Computational
I am ashamed to tell you to how many gures I carried these calcu-
lations, having no other business at the time.
Isaac Newton
Newton's embarrassment at having computed 15 digits, which he did using
the arcsinlike formula13
p 1 1 
 = 3 4 3 + 24 12 ; 5  25 ; 28 1 27 ; 72 1 29 ;   
3
p
3 Z 14 p
= 4 + 24 x ; x2 dx
0
12 Every large calculation of digits of that we have been involved in has uncovered some
hard ware or soft ware bug. Some of these were important, like parallel processors not com-
municating with each other. Of course the best known example of large scal number theoretic
computations uncovering bugs is the Pentium story.
1:90216054::: = (1=3 + 1=5) + (1=5 + 1=7) + (1=11 + 1=13) + :::
The recent debacle concerning Intel's faulty Pentium chip surfaced because of computations
on Brun's constant performed by Thomas Nicely of Lynchburg College in Virginia. The
Pentium had a hardware aw in its oating point arithmetic that causes certain divisions
involving long strings on ones to give incorrect answers that will surface once in every billion
or so calculations of reciprocals. (This one in a billion error cost Intel about a billion dollars.)
Nicely was estimating Brun's constant, named after the Norwegian Mathematician Viggo Brun
who investigated some of its properties in 1909. This number is the sum of the reciprocals of
prime pairs. That is
The current estimate of Brun's Constant (1.90216054...) is based on a computation of all
primes up to 100 Billion and of the 224,376,048 pairs of twin primes that occur among them.
This was due to Richard Brent of the Australian National University. Prime pairs are quite
mysterious and little is known about them. It is not known, for example whether there are
innitely many though it is conjectured that this is true.
In order to extend the estimates Nicely performed all his calculations twice by dierent
algorithms. (One using the Pentium chips oating point arithmetic and the other avoiding
it.) This is quite standard since there is a long history of bugs showing up in these kinds
of very extensive computations. Previously paging errors in the Cray supercomputers had
shown up in large scale computations of Pi and now Cray uses such calculations as pert of
its testing procedures. The two answers Nicely got diered after the tenth digit and this put
a red ag. Eventually after considerable detective work Nicely discovered that the Pentium
chip was giving incorrect reciprocals for the twin primes 824,633,702,441 and 824,633,702,443
and the rest, as they say, is history.
13 See Appendix - `Additional Discussion of Newton's Formula'
is indicative both of the spirit in which people calculate digits and the fact that
a surprising number of people have succumbed to the temptation 5].
The history of eorts to determine an accurate value for the constant we
now know as  is almost as long as the history of civilization itself. By 2000
B.C. both the Babylonians and the Egyptians knew  to nearly two decimal
places. The Babylonians used, among others, the value 31=8 and the Egyptians
used 313=81. Not all ancient societies were as accurate, however | nearly 1500
years later the Hebrews were perhaps still content to use the value 3 14 , as the
following quote suggests.
Also, he made a molten sea of ten cubits from brim to brim, round
in compass, and ve cubits the height thereof and a line of thirty
cubits did compass it round about.
old Testament, 1 Kings 7:23
Despite the long pedigree of the problem, all nonempirical calculations have
employed, up to minor variations, only three techniques.
i) Archimedes Method The rst technique due to Archimedes 15 of Syra-
cuse (287{212 B.C.) is, recursively, to calculate the length of circumscribed and
inscribed regular 6  2n -gons about a circle
p of diameter 1. Call these quantities
an and bn . respectively. Then a0 := 2 3, b0 := 3 and, as Gauss's teacher Pfa
discovered in 1800,
14 Bill No. 246, 1897. State of Indiana:
Be it enacted by the General Assembly of the State of Indiana: It has been found
that the circular area is to the quadrant of the circumference, as the area of an
equilateral rectangle is to the square on one side.
In further proof of the value of the author's (E.J. Goodman, M.D.) proposed
contribution to education, and oered as a gift to the State of Indiana, is the
fact of his solutions of the trisection of the angle, duplication of the cube and
quadrature of the circle having been already accepted as contributions to science
by the American Mathematical Monthly, the leading exponent of mathematical
thought in this country.
The above is part of Bill No. 246, 1897, of the State of Indiana. It passed three readings in
the Indiana House in 1897. (Introduced by the House Committee on Swamp Lands.) It also
passed rst reading in the Indiana Senate, 1897. (Introduced by the Senate Committee on
Temperance.) The bill was viewed as having nancial value:
The case is perfectly simple. If we pass this bill which establishes a new and
correct value of , the author oers our state without cost the use of this discovery
and its free publication in our school textbooks, while everyone else must pay
him a royalty.
By chance Professor C.A. Waldo of Purdue was in the Senate for a reading of the bill. He
convinced Senators that the bill was nonsense and it was tabled. (Presumably it is still tabled.)
15 See http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/archimedes.
html for a scanned image of Archimedes' Page
p
an+1 := a2a+n bbn and bn+1 := an+1 bn :
n n
Archimedes, with n = 4, obtained
71 <  < 37 :
310 1

While hardly better than estimates one could get with a ruler, this is the rst
method that can be used to generate an arbitrary number of digits, and to
a nonnumerical mathematician perhaps the problem ends here. Variations on
this theme provided the basis for virtually all calculations of  for the next 1800
years, culminating with a 34 digit calculation due to Ludolph van Ceulen (1540{
1610). This demands polygons with about 260 sides and so is extraordinarily
time consuming.
ii) Calculus Based Methods Calculus provides the basis for the second
technique. The underlying method relies on Gregory's series of 1671 16
Zx
arctan x = 1 +dtt2 = x ; x3 + x5 ;    jxj  1
3 5

coupled with a formula which allows small x to be used, like


 
 = 4 arctan 1 ; arctan 1 :
 
4 5 239
This particular formula is due to Machin 17 and was employed by him to compute
100 digits of  in 1706. Variations on this second theme are the basis of all the
16 See Appendix - `Frauds'
17 Machin Variations: For positive integral u, v , and k and integral m and n,
() m arctan( u1 ) + n arctan( v1 ) = k4
if and only if (1 ; i)k (u + i)m (v + i)n is real. Thus
1 1
4 = 4 arctan( 5 ) ; arctan( 239 ) (Machin 1706)
1 1
4 = arctan( 2 ) + arctan( 3 ) (Euler 1738)
= 2 arctan( 1 ) ; arctan( 1 ) (Hermann 1706)
4 2 7
1 1
4 = 2 arctan( 3 ) + arctan( 7 ) (Hutton 1776)
These are, in fact, all the nontrivial solutions of (*). This was a problem of Grave's solved
by Stormer in 1897. The problem can be reduced to nding integral solutions of 1 + x2 = 2y n
or 1 + x2 = y n , n  3, n odd.
calculations done until the 1970's including William Shanks' 18 monumental
hand-calculation of 527 digits. In the introduction to his book 32], which
presents this calculation, Shanks writes:
Towards the close of the year 1850 the Author rst formed the de-
sign of rectifying the circle upwards of 300 places of decimals. He
was fully aware at that time, that the accomplishment of his purpose
would add little or nothing to his fame as a Mathematician though
it might as a Computer: nor would it be productive of anything in
the shape of pecuniary recompense.
Shanks actually attempted to hand-calculate 707 digits but a mistake crept
in at the 527th digit. This went unnoticed until 1945, when D. Ferguson, in one
of the last \nondigital" calculations, computed 530 digits. Even with machine
calculations mistakes occur, so most record-setting calculations are done twice
| by suciently dierent methods.
The advent of computers has greatly increased the scope and decreased the
toil of such calculations. Metropolis, Reitwieser, and von Neumann computed
and analyzed 2037 digits using Machin's formula on ENIAC in 1949. In 1961,
Dan Shanks and Wrench calculated 100,000 digits on an IBM 7090 31]. By 1973,
still using Machin-like arctan expansions, the million digit mark was passed by
Guilloud and Bouyer on a CDC 7600.
iii) Transformation Methods The third technique, based on the transfor-
mation theory of elliptic integrals, provides the algorithms for the most recent
set of computations. The most recent records are due separately to Gosper,
Bailey, and Kanada. Gosper in 1985 calculated over 17 million digits (in fact
over 17 million terms of the continued fraction) using a carefully orchestrated
evaluation of Sum 1.
Bailey in January 1986 computed over 29 million digits using Algorithm 1 on
a Cray 2 2]. Kanada, using a related quadratic algorithm (due in basis to Gauss
and made explicit by Brent 12] and Salamin 27]) and using Algorithm 1 for
a check, veried 33,554,000 digits. This employed a HITACHI S{810/20, took
roughly eight hours and was completed in September of 1986. In January 1987
Kanada extended his computation to 227 decimal places of  and the hundred
million digit mark had been passed. The calculation took roughly a day and
a half on a NEC SX2 machine. Kanada's most recent feat (Jan. 1988) was
to compute 201,326,000 digits, which required only six hours on a new Hitachi
S-820 supercomputer. Within the next few years 19 many hundreds of millions
20 of digits will no doubt have been similarly computed. Further discussion of
the history of the computation of  may be found in 5] and 9].
18 See http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/shanks.html for
scanned images of Shanks' pages.
19 See Appendix - `General Computational Update'
20 How Big is Ten Billion?:
4 Complexity Concerns
One of the interesting morals from theoretical computer science is that many
familiar algorithms are far from optimal. In order to be more precise we intro-
duce the notion of bit complexity. Bit complexity counts the number of single
operations required to complete an algorithm. The single-digit operations are
+, ;, . (We could, if we wished, introduce storage and logical comparison into
the count. This, however, doesn't aect the order of growth of the algorithms
in which we are interested.) This is a good measure of time on a serial machine.
Thus, addition of two n-digit integers by the usual method has bit complexity
O(n), straightforward uniqueness considerations show this to be asymptotically
best possible.
Multiplication is a dierent story. Usual multiplication of two n-digit inte-
gers has bit complexity O(n2) and no better. However, it is possible to multiply
two n-digit integers with complexity O(n(log n)(log log n)). This result is due
to Schonhage and Strassen and dates from 1971 29]. It provides the best bound
known for multiplication. No multiplication can have speed better than O(n).
Unhappily, more exact results aren't available.
The original observation that a faster than O(n2) multiplication is possible
was due to Karatsuba in 1962. Observe that
(a + b10n)(c + d10n ) = ac ; (a ; b)(c ; d) ; ac ; bd]10n + bd102n
and thus multiplication of two 2n-digit integers can be reduced to three multipli-
cations of n-digit integers and a few extra additions. (Of course multiplication
by 10n is just a shift of the decimal point.) If one now proceeds recursively one
produces a multiplication with bit complexity
O(nlog2 3 ):
Note that log2 3 = 1:58    < 2.
We denote by M (n) the bit complexity of multiplying two n-digit integers
together by any method that is at least as fast as usual multiplication.
The trick to implementing high precision arithmetic is to get the multipli-
cation right. Division and root extraction piggyback o multiplication using
Newton's method. One may use the iteration
xk+1 = 2xk ; x2k y
to compute 1=y and the iteration
 
xk+1 = 21 xk + xy
k
 10 billion (12pt) digits stretch from Halifax to Vancouver three times.
 10 billion (12pt) digits ll fourteen football elds.
 10 billion digits read o at 1 digit/second takes three centuries.
 10 billion digits ll roughly 2400 Bibles.
to compute py. One may also compute 1=py from

xk+1 = xk (3 ;2 yxk )
2

and so avoid divisions in the computation of py. Not only do these iterations
converge quadratically but, because Newton's method is self-correcting (a slight
perturbation in xk does not change the limit), it is possible at the kth stage to
work only to precision 2k . If division and root extraction are so implemented,
they both have bit complexity O(m(n)), in the sense that n-digit input produces
n-digit accuracy in a time bounded by a constant times the speed of multiplica-
tion. This extends in the obvious way to the solution of any algebraic equation,
with the startling conclusion that every algebraic number can be computed p (to
n-digit
p accuracy) with bit complexity O ( M ( n )). Writing down n digits of 2
or 3 7 is (up to a constant) no more complicated than multiplication.
The Schonhage-Strassen multiplication is hard to implement. However, a
multiplication with complexity O((log n)2+ n) based on an ordinary complex
(oating point) fast Fourier transform is reasonably straightforward. This is
Kanada's approach, and the recent records all rely critically on some variations
of this technique.
To see how the fast Fourier transform may be used to accelerate multi-
plication, let x := (x0 x1  x2      xn;1 ) and y := (y0 y1  y2      yn;1 ) be the
representations of two high-precision numbers in some radix b. The radix b
is usually selected to be some power of 2 or 10 whose square is less than the
largest integer exactly representable as an ordinary oating-point number on
the computer being used. Then, except for releasing each \carry", the product
z := (z0 z1  z2      zn;1 ) of x and y may be written as

z0 = x0 y0
z1 = x0 y1 + x1y0
z2 = x0 y2 + x1y1 + x2y0
..
.
zn;1 = x0 yn;1 + x1 yn;2 +    + xn;1y0
..
.
z2n;3 = xn;1 yn;2 + xn;2 yn;1
z2n;2 = xn;1 yn;1
z2n;1 = 0:
Now consider x and y to have n zeros appended, so that x, y, and z all have
length N = 2n. Then a key observation may be made: the product sequence z
is precisely the discrete convolution C (x y):
;1
NX
zk = Ck(x y) = xj yk;j 
j =0
where the subscript k ; j is to be interpreted as k ; j + N if k ; j is negative.
Now a well-known result of Fourier analysis may be applied. Let F (x) denote
the discrete Fourier transform of the sequence x, and let F ;1(x) denote the
inverse discrete Fourier transform of x:
;1
NX
Fk (x) := xj e;2ijk=N
j =0
1 NX ;1
Fk;1(x) := N xj e;2ijk=N :
j =0

Then the \convolution theorem", whose proof is a straightforward exercise,


states that
F C (x y)] = F (x)F (y)
or, expressed another way,
C (x y) = F ;1F (x)F (y)]:
Thus the entire multiplication pyramid z can be obtained by performing two
forward discrete Fourier transforms, one vector complex multiplication and one
inverse transform, each of length N = 2n. Once the real parts of the resulting
complex numbers have been rounded to the nearest integer, the nal mutipreci-
sion product may be obtained by merely releasing the carries modulo b. This
may be done by starting at the end of the z vector and working backward, as in
elementary school arithmetic, or by applying other schemes suitable for vector
processing on more sophisticated computers.
A straightforward implementation of the above procedure would not result
in any computational savings | in fact, it would be several times more costly
than the usual \schoolperson" scheme. The reason this scheme is used is that
the discrete Fourier transform may be computed much more rapidly using some
variation of the well-known \fast Fourier transform" (FFT) algorithm 13]. In
particular, if N = 2m, then the discrete Fourier transform may be evaluated
in only 5m2m arithmetic operations using an FFT. Direct application of the
denition of the discrete Fourier transform would require 22m+3 oating-point
arithmetic operations, even if it is assumed that all powers of e;2i=N have been
precalculated.
This is the basic scheme for high-speed multiprecision multiplication. Many
details of ecient implementations have been omitted. For example, it is pos-
sible to take advantage of the fact that the input sequences x and y and the
output sequence z are all purely real numbers, and thereby sharply reduce the
operation count. Also, it is possible to dispense with complex numbers alto-
gether in favor of performing computations in elds of integers modulo large
prime numbers. Interested readers are referred to 2], 8], 13], and 22].
When the costs of all the constituent operations, using the best known tech-
niques, are totalled both Algorithms 1 and 2 compute n digits of  with bit
complexity O(M (n) log n), and use O(log n) full precision operations.
The bit complexity for Sum 1, or for  using any of the arctan expansions,
is between O((log n)2M (n)) and O(nM (n)) depending on implementation. In
each case, one is required to sum O(n) terms of the appropriate series. Done
naively, one obtains the latter bound. If the calculation is carefully orchestrated
so that the terms are grouped to grow evenly in size (as rational numbers) then
one can achieve the former bound, but with no corresponding reduction in the
number of operations.
The Archimedean iteration of section 2 converges like 1=4n so in excess of n
iterations are needed for n-digit accuracy, and the bit complexity is O(nM (n)).
Almost any familiar transcendental number such as e, ,
(3), or Catalan's
constant (presuming the last three to be nonalgebraic) can be computed with
bit complexity O((log n)M (n)) or O((log n)2 M (n)). None of these numbers is
known to be computable essentially any faster than this. In light of the previ-
ous observation that algebraic numbers are all computable with bit complexity
O(M (n)), a proof that  cannot be computed with this speed would imply the
transcendence of . It would, in fact, imply more, as there are transcendental
numbers which have complexity O(M (n)). An example is 0:10100100001   .
It is also reasonable to speculate that computing the nth digit of  is not
very much easier than computing all the rst n digits. We think it very probable
that computing the nth digit of  cannot be o(n).

5 The Miracle of Theta Functions


When I was a student, abelian functions were, as an eect of the
Jacobian tradition, considered the uncontested summit of mathemat-
ics, and each of us was ambitious to make progress in this eld. And
now? The younger generation hardly knows abelian functions.
Felix Klein 21]
Felix Klein's lament from a hundred years ago has an uncomfortable time-
lessness to it. Sadly, it is now possible never to see what Bochner referred to
as \the miracle of the theta functions" in an entire university mathematics pro-
gram. A small piece of this miracle is required here 6], 11], 28]. First some
standard notations. The complete elliptic integrals of the rst and second kind,
respectively, Z
K (k) :=
2
p dt2 (5:1)
0 1 ; k sin2 t
and Z p 2
E (k) := 1 ; k2 sin2 t dt (5:2)
0
The second integral arises in the rectication of the ellipse, hence the name
elliptic integrals. The complementary modulus is
p
k0 := 1 ; k2
and the complementary integrals K 0 and E 0 are dened by
K 0 (k) := K (k0) and E 0 (k) := E (k0):
The rst remarkable identity is Legendre's relation 21 namely
E (k)K 0(k) + E 0(k)K (k) ; K (k)K 0(k) = 2 (5:3)
(for 0 < k < 1), which is pivotal in relating these quantities to . We also need
to dene two Jacobian theta functions
1
X
!2 (q) := q(n+1=2)2 (5:4)
n=;1
and 1
X
!3 (q) := qn2 (5:5)
n=;1
These are in fact specializations with (t = 0) of the general theta functions.
More generally
X1 2
!3(t q) := qn eint (im t > 0)
n=;1
with similar extensions of !2 . In Jacobi's approach these general theta functions
provide the basic building blocks for elliptic functions, as functions of t (see 11],
39]).
21 LEGENDRE'S IDENTITY: A nice proof of this follows by
(i) dierentiating both sides one gets zero and then
(ii) taking the limit at r ! 0.
It is interesting to note that Legendre's faith in and knowledge
p of limits precluded his
developing this proof. Instead he evaluated all quantities at ( 3 ; 1)=2 (the third singular
modulus) a considerable tour de force!
The complete elliptic integrals and the special theta functions are related as
follows. For jqj < 1
K (k) = 2 !33 (q) (5:6)
and 
E (k) = (k0)2 K (k) + k dKdk(k)  (5:7)
where
!22 (q)  k0 := k0(q) = !23 (;q)
k := k(q) = ! (5:8)
2 (q ) !2(q)
3 3
and
q = e;K (k)=K (k):
0
(5:9)
The modular function is dened by
4
! 2 (q )
(t) := (q) := k (q) := ! (q) 
2
(5:10)
3

where
q := eit:
We wish to make a few comments about modular functions in general before
restricting our attention to the particular modular function . Modular func-
tions are functions which are meromorphic in H , the upper half of the complex
plane, and which are invariant under a group of linear fractional transforma-
tions, G, in the sense that
f (g(z)) = f (z) 8g 2 G:
Additional growth conditions on f at certain points of the associated funda-
mental region (see below) are also demanded.] We restrict G to be a subgroup
of the modular group ; where ; is the set of all transformations w of the form
w(t) = at +b
ct + d 
with a b c d integers and ad ; bc = 1. Observe that ; is a group under com-
position. A fundamental region 22 FG is a set in H with the property that any
element in H is uniquely the image of some element in FG under the action
of G. Thus the behaviour of a modular function is uniquely determined by its
behaviour on a fundamental region.
Modular functions are, in a sense, an extension of elliptic (or doubly periodic)
functions | functions such as sn which are invariant under linear transforma-
tions and which arise naturally in the inversion of elliptic integrals.
22 See http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/emodular.html
on Elliptic Modular Functions
The denitions we have given above are not complete. We will be more
precise in our discussion of . One might bear in mind that much of the theory
for holds in considerably greater generality.
The fundamental region F we associate with is the set of complex numbers
F := fim t  0g \ fjre tj < 1 and
j2t  1j > 1g fre t = ;1g fj2t + 1j = 1g]:
The -group (or theta-subgroup) is the set of linear fractional transformations
w satisfying
w(t) := at +b
ct + d 
where a b c d are integers and ad ; bc = 1, while in addition a and d are odd
and b and c are even. Thus the corresponding matrices are unimodular. What
makes a -modular function is the fact that is meromorphic in fim t > 0g
and that
(w(t)) := (t)
for all w in the -group, plus the fact that tends to a denite limit (possi-
bly innite) as t tend to a vertex of the fundamental region (one of the three
points (0 ;1) (0 0) (i 1)). Here we only allow convergence from within the
fundamental region.
Now some of the miracle of modular functions can be described. Largely
because every point in the upper half plane is the image of a point in F under
an element of the -group, one can deduce that any -modular function that is
bounded on F is constant. Slightly further into the theory, but relying on the
above, is the result that any two modular functions are algebraically related,
and resting on this, but further again into the eld, is the following remarkable
result. Recall that q is given by (5.9).
Theorem 1 Let z be a primitive pth root of unity for p an odd prime. Consider
the pth order modular equation for as dened by
Wp (x ) := (x ; 0 )(x ; 1 )    (x ; p): (5:11)
where
i := (zi q1=p) i < p
and
p := (qp):
Then the function Wp is a polynomial in x and (independent of q), which
has integer coecients and is of degree p + 1 in both x and .
The modular equation for usually has a simpler form in the associated
variables u := x1=8 and v := 1=8 . In this form the 5th-order modular equation
is given by
# (u v) := u6 ; v6 + 5u2 v2(u2 ; v2 ) + 4uv(1 ; u4v4 ): (5:12)
In particular
!2 (qp) = v2 and !2(q) = u2
!3 (qp) !3(q)
are related by an algebraic equation of degree p + 1.
The miracle is not over. The pth-order multiplier (for ) is dened by
p  p 2
Mp(k(q) k(qp)) := KK((kk((qq)))) = !!3 ((qq)) (5:13)
3

and turns out to be a rational function of k(qp) and k(q).


One isi now in possession of a pth-order algorithm for K=, namely: Let
ki := k(qp ). Then
2K (k0) = M ;1 (k  k )M ;1(k  k )M ;1(k  k )    :
 p 0 1 p 1 2 p 2 3
This is an entirely algebraic algorithm. One needs to know the pth-order mod-
ular equation for to compute ki+1 from ki and one needs to know the rational
multiplier Mp. The speed of convergence (O(cpi ), for some c < 1) is easily
deduced from (5.13) and (5.9).
The function (t) is 1 ; 1 on F and has a well-dened inverse, ;1 , with
branch points only at 0 1 and 1. This can be used to provide a one line proof
of the \big" Picard theorem that a nonconstant entire function misses at most
one value (as does exp). Indeed, suppose g is an entire function and that it is
never zero or one then exp( ;1 (g(z))) is a bounded entire function and is hence
constant.
Littlewood suggested that, at the right point in history, the above would
have been a strong candidate for a `one line doctoral thesis'.

6 Ramanujan's Solvable Modular Equations


Hardy 19] commenting on Ramanujan's work on elliptic and modular functions
says
It is here that both the profundity and limitations of Ramanujan's
knowledge stand out most sharply.
We present only one of Ramanujan's modular equations.
Theorem 2
5!3 (q25) = 1 + r1=5 + r1=5 (6:1)
!3 (q) 1 2

where for i = 1 and 2  p 


ri := 21 x y  y2 ; 4x3
with
3 (q )
x := 5!
5

! (q) ; 1 and y := (x ; 1) + 7:
2
3

This slightly rewritten form of entry 12(iii) of Chapter 19 of Ramanujan's


Second Notebook (see 7], where Berndt's proofs may be studied). One can think
of Ramanujan's quintic modular equation as an equation in the multiplier Mp
of (5.13). The initial surprise is that it is solvable. The quintic modular relation
for , W5 , and the related equation for 1=8  #5 , are both nonsolvable. The
Galois group of the sixth-degree equation #5 (see (5.12)) over Q(v) is A5 and is
nonsolvable. Indeed both Hermite and Kronecker showed, in the middle of the
last century, that the solution of a general quintic may be eected in terms of
the solution of the 5th-order modular equation (5.12) and the roots may thus
be given in terms of the theta functions.
In fact, in general, the Galois group for Wp of (5.11) has order p(p +1)(p ; 1)
and is never solvable for p  5. The group is quite easy to compute, it is
generated by two permutations. If
q := eit  then ! + 2 and ! (2 + 1)
are both elements of the -group and induce permutations on the i of Theorem
1. For any xed p, one can use the q-expansion of (5.10) to compute the eect
of these transformations on the i , and can thus easily write down the Galois
group. While Wp is not solvable over Q( ), it is solvable over Q(  0 ). Note
that 0 is a root of Wp . It is of degree p +1 because Wp is irreducible. Thus the
Galois group for Wp over Q(  0 ) has order p(p ; 1). For p = 5 7, and 11 this
gives groups of order 20, 42, and 110, respectively, which are obviously solvable
and, in fact, for general primes, the construction always produces a solvable
group.
From (5.8) and (5.10) one sees that Ramanujan's modular equation can be
rewritten to give 5 solvable in terms of 0 and . Thus, we can hope to nd
an explicit solvable relation for p in terms of and 0 . For p = 3, Wp is of
degree 4 and is, of course, solvable. For p = 7, Ramanujan again helps us out,
by providing a solvable seventh-order modular identity for the closely related
eta function dened by
1
Y
(q) := q 121 (1 ; q2n):
n=1
The rst interesting prime for which an explicit solvable form is not known
is the \endecadic" (p = 11) case. We consider only prime values because for
nonprime values the modular equation factors.
This leads to the interesting problem of mechanically constructing these
equations. In principle, and to some extent in practice, this is a purely compu-
tational problem. Modular equations can be computed fairly easily from (5.11)
and even more easily in the associated variables u and v. Because one knows
a priori bounds on the size of the (integer) coecients of the equations one
can perform these calculations exactly. The coecients of the equation, in the
variables u and v, grow at most like 2n. (See 11].) Computing the solvable
forms and the associated computational problems are a little more intricate |
though still in principle entirely mechanical. A word of caution however: in the
variables u and v the endecadic modular equation has largest coecient 165, a
three digit integer. The endecadic modular equation for the intimately related
function J Klein's absolute invariant) has coecients as large as
27090964785531389931563200281035226311929052227303  292 319520 11253:
It is, therefore, one thing to solve these equations, it is entirely another matter
to present them with the economy of Ramanujan.
The paucity of Ramanujan's background in complex analysis and group the-
ory leaves open to speculation Ramanujan's methods. The proofs given by
Berndt are dicult. In the seventh-order case, Berndt was aided by macsyma
| a sophisticated algebraic manipulation package. Berndt comments after giv-
ing the proof of various seventh-order modular identities:
Of course, the proof that we have given is quite unsatisfactory be-
cause it is a verication that could not have been achieved without
knowledge of the result. Ramanujan obviously possessed a more nat-
ural, transparent, and ingenious proof.

7 Modular Equations and Pi


We wish to connect the modular equations 23 of Theorem 1 to . This we
contrive via the function alpha 24 dened by:
0
(r) := EK ((kk)) ; (2K(k))2  (7:1)
23 See http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/ramnotebook.
htmlon Ramanujan's Modular Equations
p24(r)It;is(r)very easy to compute  for r > 0. One uses the functional equation (1=r) =
r for r < 1 and a truncation of theta expansion 7.3]. Two terms suce to obtain
10 digits on r > 1.
where p
k := k(q) and q := e; r :
This allows one to rewrite Legendre's equation (5.3) in a one-sided form without
the conjugate variable as
 = K prE ; (pr ; (r))K
: (7:2)
4
We have suppressed, and will continue to suppress, the k variable. With (5.6)
and (5.7) at hand we can write a q-expansion for , namely,
P n (;q)n
1
2 2
p n
 ; r4 P
1 =;1

(;q)n
1
2
n
(r) = 1
P 4 =;1
(7:3)
q n2
n=;1
p
and we can see that as r tends to innity q = e; r tends to zero and (r)
tends to 1=. In fact
p  p
(r) ; 1 8 r ; 1 e; r : (7:4)
The key now is iteratively to calculate . This is the content of the next theorem.
Theorem 3 Let k0 := k(q), k1 := k(qp) and Mp := Mp(k0 k1 ) as in (5.13).
Then " 2 02 _ #
 ( r ) p k pk 1 k1 Mp
(p r) =
2
; r
Mp2
0
; pk +
2
Mp2 1 
Mp
where _ represents the full derivative of Mp with respect to k0 . In particular, 
is algebraic for rational arguments.
We know that K (k1) is related via Mp to K (k) and we know that E (k) is
related via dierentiation to K . (See (5.7) and (5.13).) Note that q ! qp corre-
sponds to r ! p2 r. Thus from (7.17) some relation like that of the above theo-
rem must exist. The actual derivation requires some careful algebraic manipu-
lation. (See 11]), where it has also been made entirely explicit for p := 2 3 4 5
and 7, and where numerous algebraic values are determined for Examples 25
(r).) In the case p := 5 we can specialize with some considerable knowledge
of quintic modular equations to get:
25 See http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/local/etable.html for
some examples
Theorem 4 Let s := 1=M5(k0 k1 ). Then
p 2 p 
(25r) = s2(r) ; r (s ; 5) + s(s2 ; 2s + 5) :
2
This couples with Ramanujan's quintic modular equation to provide a derivation
of Algorithm 2.
Algorithm 2 results from specializing Theorem 3 with p := 4 and coupling it
with a quartic modular equation. The quartic equation in question is just two
steps of the corresponding quadratic equation which is Legendre's form of the
arithmetic geometric mean iteration 26
In 1799, Gauss observed this purely numerically and wrote that this result
"will surely open a whole new eld of analysis." , namely:
p
k1 = 12+kk :
An algebraic p-th order algorithm for  is derived from coupling Theorem 3
with a pth-order modular equation. The substantial details which are skirted
here are available in 11].

8 Ramanujan's sum
This amazing sum,
p 1 (4n)! 1103 + 26390n]
1= 8 X
 9801 n=0 (n!)4 3964n
is a specialization (N = 58) of the following result, which gives reciprocal series
for  in terms of our function alpha and related modular quantities27.
Theorem 5 1 ; 1  ; 1  ; 3  d (N )
1 =X 4 n 2 n 4 n n
x2n;1  (8:1)
 n=0 (n!)3 N

where,
0 2  12 ;12 1
xN := 4(1kN+(kkN2 ))2 := gN +2 gN :
N
with " ;N1 N ;12p #
p  gN12 ; gN;12 
( N ) x
dn (N ) = 1 + k2 ; 4 gN + n N
N 2
26 See Appendix - `The Arithmetic-Geometric Mean Iteration'
27 See Appendix - `Ramanujan type series'
and p
kN := k(e; N ) gN12 = (kN0 )2=(2kN ):
Here cn is the rising factorial: cn := c(c + 1)(c + 2)    (c + n ; 1):
Some of the ingredients for the proof of Theorem 5, which are detailed in
11], are the following. Our rst step is to write (7.2) as a sum after replacing
the E by K and dK=dk using (5.7). One then uses an identity of Clausen's
which allows one to write the square of a hypergeometric function 2 F1 in terms
of a generalized hypergeometric 3 F2, namely, for all k one has
2   2 !
(1 + k2) 2K(k) = F
3 2
1 3 1 2
4  4  2  1 1 g12 + g;12
 2
1 ;1 ;3 ;1
X 2
g12 +g;12 n
4 n 4 n 2 n
= (1)n(1)n n! :
n=0
Here g is related to k by

4k(k0)2 = g12 + g;12 ;1

(1 + k2 )2 2
as required in Theorem 5. We have actually done more than just use Clausen's
identity, we have also transformed it once using a standard hypergeometric
substitution due to Kummer. Incidentally, Clausen was a nineteenth-century
mathematician who, among other things, computed 250 digits of  in 1847
using Machin's formula. The desired formula (8.1) is obtained on combining
these pieces.
Even with Theorem 5, our work is not complete. We still have to compute
p58
k58 := k(e; ) and 58 := (58):
In fact p !
g = 292+ 5
2
58

is a well known invariant related to the fundamental solution to Pell's equation


for 29 and it turns out that
p !6 p p p
58 = 29 + 5 (99 29 ; 444)(99 2 ; 70 ; 13 (29)):
2
One can, in principle, and for N := 58, probably in practice, solve for kN by
directly solving the N th-order equation
WN (kN2  1 ; kN2 ) = 0:
For N = 58 given that Ramanujan 26] and Weber 38] have calculated g58
for us, verication by this method is somewhat easier though it still requires
a tractable form of W58 . Actually, more sophisticated number-theoretic tech-
niques exist for computing kN (these numbers are called singular moduli). A
description of such techniques, including a reconstruction of how Ramanujan
might have computed the various singular moduli he presents in 26] is pre-
sented by Watson in a long series of papers commencing with 36] and some
more recent derivations are given in 11] and 30]. An inspection of Theorem
5 shows that all constants in Series 1 are determined from g58 . Knowing  is
equivalent to determining that the number 1103 is correct.
It is less clear how one explicitly calculates 58 in algebraic form, except
by brute force, and a considerable amount of brute force is required but a
numerical calculation to any reasonable accuracy is easily obtained from (7.3)
and 1103 appears! The reader is encouraged to try this to, say, 16 digits. This
presumably is what Ramanujan observed. Ironically, when Gosper computed
17 million digits of  using Sum 1, he had no mathematical proof that Sum 1
actually converged to 1=. He compared ten million digits of the calculation to
a previous calculation of Kanada et al. This verication that Sum 1 is correct to
ten million places also provided the rst complete proof that 58 is as advertised
above. A nice touch | that the calculation of the sum should prove itself as it
goes.
Roughly this works as follows. One knows enough about the exact algebraic
nature of the components of dn(N ) and xN to know that if the purported sum
(of positive terms) were incorrect, then before one reached 3 million digits,
this sum must have ceased to agree with 1=. Notice that the components of
Sum 1 are related to the solution of an equation of degree 58, but virtually no
irrationality remains in the nal packaging. Once again, there are very good
number-theoretic reasons, presumably unknown to Ramanujan, why this must
be so (58 is at least a good candidate number for such a reduction). Ramanujan's
insight into this marvelous simplication remains obscure.
Ramanujan 26] gives 14 other series for 1=, some others almost as spectac-
ular as Sum 1 | and one can indeed derive some even more spectacular related
series.
Many related series due to Borwein and Borwein and to Chudnovsky and
Chudnovsky appear in papers in Ramanujan Revisited, Academic Press, 198828.
He almost gives no explanation as to their genesis, saying only that there are
\corresponding theories" so the standard theory (as sketched in section 5) from
which they follow. Hardy, quoting Mordell, observed that \it is unfortunate
that Ramanujan has not developed the corresponding theories". By methods
analogous to those used above, all his series can be derived from the classical
theory 11]. Again it is unclear what passage Ramanujan took to them, but it
must in some part have diverged from ours.
28 See Appendix - `Ramanujan type series'.
We conclude by writing down another extraordinary series29of Ramanujan's,
which also derives from the same general body of theory.
1 =X

1 2n 3 42n + 5 
 n=0 n 212n+4 :
This series is composed of fractions whose numerators grow like 26n and whose
denominators are exactly 16  212n . In particular this can be used to calculate
the second block of n binary digits of  without calculating the rst n binary
digits. This beautiful observation, due to Holloway, results, disappointingly, in
no intrinsic reduction in complexity.

9 Sources
References 7], 11], 19], 26], 36], and 37] relate directly to Ramanujan's work.
References 2], 8], 9], 10], 12], 22], 24], 27], 29], and 31] discuss the com-
putational concerns of the paper.
Material on modular functions and special functions may be pursued in 1],
6], 9], 14], 15], 18], 20], 28], 34], 38], and 39]. Some of the number-theoretic
concerns are touched on in 3], 6], 9], 11], 16], 23], and 35].
Finally, details of all derivations are given in 11].

References
1] M. Abramowitz and I. Stegun, Handbook of Mathematical Functions,
Dover, New York, 1964.
2] D.H. Bailey, The computation of  to 29,360,000 decimal digits us-
ing Borweins' quartically convergent algorithm, Math. Comput., 50
(1988) 283{96.
29 Computation: Series Algorithms
1 = X
1
;2n3 42n + 5
n 212n+4 (Ramanujan)
n=0

1 = X
N ; 3
2n 42n + 5 aN
n=0
n 212n+4 + "N = bN + "N
where bN = 212N +4 is an exact power of two. aN is an integer of roughly the same size.
 The algorithm can be restarted if aN and bN are stored. (So a few extra digits is easy.)
 Complexity is O((log n)2 M (n)), but in practice it's good. (Still needs an FFT.)
 Error checking by congruences.
3] |, Numerical results on the transcendence of constants involving ,
e, and Euler's constant, Math. Comput., 50 (1988) 275{81.
4] A. Baker, Transcendental Number Theory, Cambridge Univ. Press,
London, 1975.
5] P. Beckmann, A History of Pi, 4th ed., Golem Press, Boulder, CO,
1977.
6] R. Bellman, A Brief Introduction to Theta Functions, Holt, Reinhart
and Winston, New York, 1961.
7] B.C. Berndt, Modular Equations of Degrees 3, 5, and 7 and Associ-
ated Theta Functions Identities, chapter 19 of Ramanujan's Second
Notebook, Springer | Ramanujan's Notebooks, Part III, Springer-
Verlag, New York, 1991.
8] A. Borodin and I. Munro, The Computational Complexity of Alge-
braic and Numeric Problems, American Elsevier, New York, 1975.
9] J.M. Borwein and P. B. Borwein, The arithmetic-geometric mean and
fast computation of elementary functions, SIAM Rev., 26 (1984) 351{
365.
10] |, An explicit cubic iteration for , BIT, 26 (1986) 123{126.
11] |, Pi and the AGM | A Study in Analytic Number Theory and
Computational Complexity, Wiley, N.Y., 1987.
12] R.P. Brent, Fast multiple-precision evaluation of elementary func-
tions, J. ACM 23 (1976) 242{251.
13] E.O. Brigham, The Fast Fourier Transform, Prentice-Hall, Englewood
Clis, N.J., 1974.
14] A. Cayley, An elementary Treatise on Elliptic Functions, Bell and
Sons, 1885 reprint Dover, 1961.
15] |, A memoir on the transformation of elliptic functions, Phil. Trans.
T., 164 (1874) 397{456.
16] D.V. Chudnovsky and G.V. Chudnovsky, Pad&e and Rational Approx-
imation to Systems of Functions and Their Arithmetic Applications,
Lecture Notes in Mathematics 1052, Springer, Berlin, 1984.
17] H.R.P. Ferguson and R.W. Forcade,Generalization of the Euclidean
algorithm for real numbers to all dimensions higher than two, Bull.
AMS, 1 (1979) 912{914.
18] C. F. Gauss, Werke, Gottingen 1866{1933, Be 3, pp. 361{403.
19] G.H. Hardy, Ramanujan, Cambridge Univ. Press, London,1940.
20] L.V. King, On The Direct Numerical Calculation of Elliptic Functions
and Integrals, Cambridge University Press, 1924.
21] F. Klein, Development of Mathematics in the 19th Century, 1928,
TRans. Math. Sci. Press, R. Hermann ed., Brookline, MA, 1979.
22] D. Knuth, The Art of Computer Programming, Vol. 2: Seminumerical
Algorithms, Addison-Wesley, Reading, MA, 1981.
23] F. Lindemann, Uber die Zahl , Math. Ann., 20 (1882) 213{225.
24] G. Miel, On calculations past and present: the Archimedean algo-
rithm, Amer. Math. Monthly, 90 (1983) 17{35.
25] D.J. Newman, Rational Approximation Versus Fast Computer Meth-
ods, in Lectures on Approximation and Value Distribution, Presses
de l'Universit&e de Montreal, 1982, pp. 149{174.
26] S. Ramanujan. Modular equations and approximations to . Quart.
J. Math. 45 (1914) 350{72.
27] E. Salamin. Computation of  using arithmetic-geometric mean.
Math. Comput. 30 (1976) 565{570.
28] B. Schoenberg, Elliptic Modular Functions, Springer, Berlin, 1976.
29] A. Schonhage and V. Strassen, Schnelle Multiplikation Grosser
Zahlen, Computing, 7 (1971) 281{292.
30] D. Shanks, Dihedral quartic approximations and series for , J. Num-
ber Theory, 14 (1982) 394{423.
31] D. Shanks and J.W. Wrench, Calculation of  to 100,000 decimals,
Math. Comput., 16 (1962) 76{79.
32] W. Shanks, Contributions to Mathematics Comprising Chiey of the
Rectication of the Circle to 607 Places of Decimals, G. Bell, London,
1853.
33] Y. Tamura and Y. Kanada, Calculation of  to 4,196,393, decimals
based on Gauss-Legendre algorithm, preprint (1983).
34] J. Tannery and J. Molk, Fonctions Elliptiques, vols 1 and 2, 1893
reprint Chelsea, New York, 1972.
35] S. Wagon, Is  normal?, The Math. Intelligencer, 7 (1985) 65{67.
36] G.N. Watson, Some singular moduli (1), Quart. J. Math., 3 (1932)
81{98.
37] |, The nal problem: an account of the mock theta functions, J.
London Math. Soc., 11 (1936) 55{80.
38] H. Weber, Lehrbuch der Algebra, Vol. 3, 1908: reprint Chelsea, New
York, 1980.
39] E.T. Whittaker and G.N. Watson, A Course of Modern Analysis, 4th
ed., Cambridge Univ. Press, London, 1927.

10 Appendix: One Hundred Billion Digits of


Pi
An Explicit Symbolic Representation of More Than 100 ,000 ,000 ,000
Digits pof  p
y0 = 2 ;p1 a0=6 ; 4 2
;
y1 = 11+; p4 11;;yy00 4 a1 = (1 + y1 )4 a0 ; 23 y1 1 + y1 + y1 2
4 4 
p4 4 ; 
y2 = 11+; p4 11;;yy11 4 a2 = (1 + y2 )4 a1 ; 25 y2 1 + y2 + y2 2
p
1; 4 1;y2 4 ; 
y3 = 1+ p4 1;y2 4 a3 = (1 + y3 )4 a2 ; 27 y3 1 + y3 + y3 2
p4 4 ; 
y4 = 11+; p4 11;;yy33 4 a4 = (1 + y4 )4 a3 ; 29 y4 1 + y4 + y4 2
p4 4 ; 
y5 = 11+; p4 11;;yy44 4 a5 = (1 + y5 )4 a4 ; 211 y5 1 + y5 + y5 2
p4 4 ; 
y6 = 11+; p4 11;;yy55 4 a6 = (1 + y6 )4 a5 ; 213 y6 1 + y6 + y6 2
p
1; 4 1;y6 4 ; 
y7 = 1+ p4 1;y6 4 a7 = (1 + y7 )4 a6 ; 215 y7 1 + y7 + y7 2
p4 4 ; 
y8 = 11+; p4 11;;yy77 4 a8 = (1 + y8 )4 a7 ; 217 y8 1 + y8 + y8 2
p4 4 ; 
y9 = 11+; p4 11;;yy88 4 a9 = (1 + y9 )4 a8 ; 219 y9 1 + y9 + y9 2
p
p4 1;y 4 a10 = (1 + y10 )4 a9 ; 221y10 ;1 + y10 + y10 2 
1; 4 1;y9 4
y10 = 1+
p 9

p4 1;y 4 a11 = (1 + y11 )4 a10 ; 223 y11 ;1 + y11 + y11 2 


1; 1;y10 4
4
y11 = 1+ 10
p4 ; 
y12 = 11+; p4 11;;yy11114 a12 = (1 + y12 )4 a11 ; 225 y12 1 + y12 + y12 2
4

p4 ; 
y13 = 11+; p4 11;;yy12124 a13 = (1 + y13 )4 a12 ; 227 y13 1 + y13 + y13 2
4

p4 ; 
y14 = 11+; p4 11;;yy13134 a14 = (1 + y14 )4 a13 ; 229 y14 1 + y14 + y14 2
4

; p ;y 4 ; 
y15 = p ;y14144
1 4 1
1+ 4 1
a15 = (1 + y15 )4 a14 ; 231 y15 1 + y15 + y15 2
p4 ; 
y16 = 11+; p4 11;;yy15154 a16 = (1 + y16 )4 a15 ; 233 y16 1 + y16 + y16 2
4

p4 ; 
y17 = 11+; p4 11;;yy16164 a17 = (1 + y17 )4 a16 ; 235 y17 1 + y17 + y17 2
4

p4 ; 
y18 = 11+; p4 11;;yy17174 a18 = (1 + y18 )4 a17 ; 237 y18 1 + y18 + y18 2
4

 a18 ;1

11 Appendix: General Computational Update


Since the publication of our article our predictions have been matched and more.
All these calculations have been performed using methods described within the
paper. We detail the most interesting:
11.1 BILLIONS
In 1989, The Chudnovsky Brothers computed 1,011,196,961 digits of pi using
1
1 =12X ( ;1)n (6n)! 13591409+ n545140134 :
 n=0 (n!)3 (3n)! (6403203)n+1=2
This used an IBM3090/VF for 120hrs and a CRAY2 for 28hrs) In short order
Kanada then computed 1,073,741,799 digits (230 ; 25) with a verication run
in under 161 hours. He used the quartic algorithm] and the related Gauss-
Salamin-Brent algorithm 11] . In 1991 the Chudnovskys then computed in
excess of 2.16 billion digits (Many details of their largely home -built computer
are given in The Mountains of pi, ref. New Yorker). Early in 1995, Kanada
computed in excess of 3 billion digits after which the Chudnovskys reported
(personal communication) that in 1994 they had passed the 4 billion mark:
Thank you very much for your message.
If it really matters, the "latest" round of calculations of pi was con-
ducted last year as a part of testing of an upgrade to our machine.
The actual end computation date was May 18, 1994 (as tapes and
le dates indicate). The method used was still our favorite identity
(from h(-163)=1). The core of bignum codes was the combinations
of several "fast" convolution algorithms, applied depending on the
length. The number of decimal digits of pi computed in that calcu-
lations was over 4,044,000,000.
We will send you a reprint from Grosswald volume that touches on
some techniques in our approach. Among amusing issues in this com-
putations was the break of 32-bit addressing limit in le/array sizes.
All computations were run instead in 64-bit (virtual) address space
(and that required some tinkering with storage and tape devices).
We would be happy to get preprints of your projects.
With best wishes, David and Gregory

11.2 Kanada
The two most recent record computations were performed by Yasumasa Kanada
and his colleagues during 1995. It is worth emphasizing that each of his com-
putations eectively performs the equivalent of a few hundred full precision
multiplications. A single such multiplication performed on the same machine
but without using FFT ideas would take several years.
The details follow. More is available at the pi site including more analysis
of the digits.
232 Digits: Two independent calculations based on two dierent algorithms
generated 4,294,967,296 (= 232) decimal digits of pi and the two generated se-
quences matched 4,294,967,286 decimal digits, e.g., 10 decimal digits dierence.
Then we are declaring 4,294,960,000 decimal digits as the new world record.
Main program run :
Job start (1 ; st) : 28thJuly199522 : 59
Job end (1 ; st) : 31stJuly199507 : 42
Elapsed time (1 ; st) : 56 : 44 : 24
Vector CPU (1 ; st) : 67 : 33 : 04
Job start (2 ; nd) : 04thAug:199520 : 38
Job end (2 ; nd) : 07stAug:199505 : 35
Elapsed time (2 ; nd) : 56 : 57 : 11
Vector CPU (2 ; nd) : 66 : 15 : 37
Main memory : 1792:75MB
ES memory : 25120MB
Disk storage : 2GB  2 = 4GB (as for the intermediate data storage)
Algorithm : Borweins0 4 ; th order convergent algorithm
Verication program run :
Job start (1 ; st) : 11thAug:199521 : 31
Job end (1 ; st) : 14stAug:199515 : 54
Elapsedtime (1 ; st) : 66 : 23 : 29
VectorCPU (1 ; st) : 77 : 14 : 59
Job start (2 ; nd) : 25thAug:199523 : 12
Job end (2 ; nd) : 28stAug:199515 : 09
Elapsed time (2 ; nd) : 63 : 57 : 22
Vector CPU (2 ; nd) : 75 : 10 : 29
Main memory : 1792:75 MB
ES memory : 26152 MB
Disk storage : 2GB  3 = 6GB (as for the intermediate data storage)
Algorithm : Gauss ; Legendre algorithm

11.3 October 12, 1995


And then:
3  231 : Our latest record was established as follows:
Declared record:
6,442,450,000 decimal digits. Two independent calculations based on two
dierent algorithms generated 6,442,450,944 (= 3  231) decimal digits of pi and
the two generated sequences matched to 6,442,450,938 decimal digits, e.g., 6
decimal digits dierence. Then we are declaring 6,442,450,000 decimal digits as
the new world record.
Main program run :
Job start : 19th September 1995 20 : 54
Job end : 24th September 1995 17 : 32
Elapsed time : 116 : 38 : 12
Vector CPU : 112 : 36 : 06
Main memory : 1856:75 MB
ES memory : 32764 MB
Algorithm : Borwein0s 4 ; th order convergent algorithm
4,000,000,000-th digits of  and 1=: Note :Not updated because of disk
storage problem.
 : 94375 34306 22684 47216 (4 000 000 000 ; th digit)
1= : 71480 70425 69013 58924 (4 000 000 000 ; th digit)
Note: First digit '3' for  or '0' for 1= is not included in the above count.
Frequency distribution for  ; 3 up to 6,000,000,000 decimal places:
000 : 599963005 0 10 : 600033260 020 : 599999169 0 30 : 600000243
040 : 599957439 0 50 : 600017176 060 : 600016588 0 70 : 600009044
080 : 599987038 0 90 : 600017038 Chisquare = 9:00
Frequency distribution for 1= up to 6,000,000,000 decimal places:
000 : 599978305 0 10 : 600024329 020 : 600007880 0 30 : 600006529
040 : 599976720 0 50 : 599986534 060 : 600012285 0 70 : 600023761
080 : 599975659 0 90 : 600007998 Chisquare = 5:44
4,294,960,000-th digits of  and 1= Note: Not updated because of disk
storage problem.
 : 55675 13149 35865 45528(4 294 960 000 ; th digit)
1= : 96350 29339 14953 51156(4 294 960 000 ; th digit)
Note :First digit '3' for  or '0' for 1= is not included in the above count.
Programs were written by Mr. Daisuke TAKAHASHI, a member of Kanada
Lab. CPU used was HITAC S-3800/480 at the Computer Centre, University of
Tokyo. Two CPUs were denitely used through single job parallel processing
for a total of four programs run.
Yasumasa KANADA Computer Centre, University of Tokyo Bunkyo-ku
Yayoi 2-11-16 Tokyo 113 Japan Fax : +81-3-3814-7231 (oce)
E-mail: [email protected]

12 Appendix: Landmarks
Francois Viete (1540{1603)
r s r v
u s r
2 = 1 1 + 1 1u
t1 + 1 1 + 1 1 
 2 2 2 2 2 2 2 2 2
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; (1593)
John Wallis (1616{1703)
 = 2  2  4  4  6  6  8  8
2 1  3  3  5  5  7  7  9
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; (1655)
William Brouncker (1620{1684)
= 4
1 + 2+ 1 925
2+ 2+
James Gregory (1638{1675), Gottfried Wilhelm Leibnitz (1646{1716)
 = 1 ; 1 + 1 ; 1 + 
4 3 5 7
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; (1671)

13 Appendix: Some Thoughts...


a certain impression I had of mathematicians was ... that they spent
immoderate amounts of time declaring each other's work trivial.
(Richard Preston)
It's about as interesting as going to the beach and counting sand. I
wouldn't be caught dead doing that kind of work.
(***********)
The universe contains at most 1051 grains of sand.
(Archimedes)

14 Appendix: Additional Discussion of New-


ton's Formula
p R p
It is possible to show the expression  = 3 4 3 + 24 04 x ; x2dx in a rather
1

informal way with the help of theRdiagram


1 p
above.
Claim : The denite
p integral 0
4 x ; x2 dx represents the blue area in the
above cirle. Let y = x ; x2 , then
y2 = x ; x2 (1)x2 ; x + y2 = 0 (2)(x ; 21 )62 + y2 = ( 21 62 (3)
which is the locus of the above circle with radius r = 12 unit and center at
( 2  0). It follows that the denite integral from x = 0 to x = 41 ofp the function
1

is equal to the blue area in the circle shown above. Claim: 241  3 4 3 is the area
of the red triangle within the circle.
Areaoftriangle = 12 :base:height (14.2)
(4) = 12 : 21 cos( 6 ): 12 sin( 6 ) (14.3)
p
(5) = 24 1 :(3 3 ) (6) (14.4)
4
Observation : The blue area + the read area is one sixth the area of the
circle.
Deduction:
1 : 3 3 + Z 14 px ; x2dx (7)
p
( 21 )2
6 = 24 4 (14.5)
0

3 3
p Z 41 p
 = 4 + 24 x ; x2dx (8) (14.6)
0

15 Appendix: Frauds
Gregory's series for , truncated at 500,000 terms gives to forty places
X (;1)k;1
500000
4 2k ; 1
k=1
= 3:141590653589793240462643383269502884197:
Only the underlined digits are wrong. This is explained by the following
Theorem.
15.1 Theorem
For integer N divisible by 4 the following asymptotic expansion holds:
 ; 2 X (;1)k;1 X E2m
N=2 1

2 k=1
2k ; 1 m=0
N 2m+1
= N1 ; N13 + N55 ; N617 +   

where the coecients are the even Euler numbers 1, -1, 5, -61, 1385, -50521.
Gregory's series requires more terms than there are particles in the universe
to compute 100 digits of .
However, with N = 200,000 and correcting using the rst thousand even
Euler numbers gives over 5,000 digits of .
See Pi, Euler numbers and asymptotic expansions by J. Borwein, P. Borwein
K. Dilcher in the MAA Monthly 96 (1989) 681-687.
15.2 Excessive Fraud
Sum. (correct to over 42 billion digits)
0 12
@ 51 X ;
1
n
A =: : 2

10 e 1010
n=;1
The sum arises from an application of Poisson summation or equivalently as a
modular transformation of a theta function.

15.3 Conjecture
No one will ever know the 101000th digit of  (or the 1051th).

16 Appendix: The Arithmetic-Geometric Mean


Iteration
an+1 := an +bn a0 := 1
2
If and pa b p
bn+1 := n n b0 := 2 (or x):
Then
lim a = lim b =2
n!1 n n!1 n
= Z 1
p1dt;t4
0 0
1
B CC
= B
B@ Z =2
=2
CA
p1;(1;dx2 )sin2 
0

In 1799, Gauss observed this purely numerically and wrote that this result
will surely open a whole new eld of analysis.

16.1 Equivalent Modular Parametrization


This is equivalent to the identities
3(q2 ) = 3 (q) +2 4 (q)
and p
4 (q2) = 3 (q)4(q)

P1 qn2
3 (q ) =
where
4 (q) = 1
P;1(;q)n2
;1
These are modular forms. So for example
p ;   
s 3 e;s = 3 e;=s
16.2 A Cubic Analogue of the AGM
an+1 := an +2bn a0 := 1
3
Let q
bn+1 := 3 bn (a2n +a3n bn +b2n ) b0 := x
then the common limit is
F (x) = 1 = ;  11 1 ; x3
X1

(3n)!
F 1 2
2 1 3 3
(n!)3 33n (1 ; x3)n
n=0
The convergence is cubic.
Proof: The proof is opaque. It works because 2 F1(1=3 2=3 1 x) satises
1 1 
y + x + x ; 1 y0 ; 9x(14; x) y = 0
00

In the above notation.


!1 an
3 nlim 2
=
X n+1 ;
1

1; 3 a2n ; a2n+1
n=0
p
where an is, as above, with, b0 := 32; 1 : Taking k + 1 terms of the sum
and limit gives a cubically convergent algorithm. Twenty one terms gives three
billion digits. The underlying cubic transformation is beautiful:
1 2 
F
2 1
3  3  1 x
3

  3!
= 1 +3 2x 2F1 13  32  1 11+;2xx

16.3 Equivalent Modular Parametrization


If 1
X
L(q) = qm2+mn+n2
;1
and
M (q) = 3L(q )2; L(q) :
3
Then
L(q3) = L(q) +32M (q)
and r
M (q ) = M (q) (L (q) + L(3q)M (q) + M (q))
3
2 2
3

Note that if R(q) := M (q)=L(q)then


(R(q3))3 = 9R(q)(11++R2(Rq()q+) R(q )) :
2

This is a cubic modular equation for R.


See Some cubic modular identities of Ramanujan by J. Borwein, P. Borwein
F. Garvan in Trans. A.M.S. 343 (1994) 35-47.
16.4 Some Explanations
1 (a) (b) xn
X n n
2 F1 (a b c x) :=
n=0 (c)n n! 
where (a)n := a(a + 1)    (a + n ; 1):.
Let
Fs (x) := 2 F1( 12 ; s 12 + s 1 x2 )

Gs(x) := 2F1 (; 21 ; s 12 + s 1 x2 ):
Then
p p
Gs(x)Fs( 1 ; x2) + Fs(x)Gs( 1 ; x2)
p 
cos(s)

;Fs (x)Fs( 1 ; x ) = 1 2(1
2
+ 2s)
and
Gs(x) = (1 ; x2 )Fs(x) + x(1 ; x ) d Fs(x)2

1 + 2s d x
p
With x := 1= 2 we get
p
2 F (1=p2)F 0(1=p2) = 1
cos(s) s s 
If we can compute Fs iteratively we can compute Fs0 and i= by a second
iteration. These are four particularly interesting cases.
s=0 Gaussian AGM.
s = 1=6 Cubic AGM.
s = 1=3 The absolute invariant J.
s = 1=4 Borchardt
p type iteration
Inverting the ratios Fs(x)=Fs( 1 ; x2) gives elliptic modular nctions. Which
reduces much of this to an algebraic theory. Finding and proving these iterations
can ( at least in principal) be eected entirely computationally.

16.5 The Quadratic s = 1=4 Iteration


an+1 := an +3
4
bn  a0 := 1
Let and q
bn+1 := bn (an2+bn ) b0 := x:
Then the common limit is
1
F 2 (1=4 3=4 1 1 ; x2 )
2 1

16.6 Caveat Emptor:


Let and
an+1 := an +7
8
bn  a0 := 1
p
bn+1 := an bn4 +3bn b0 := x:
Then the common limit g(x) is not dierentially algebraic.

17 Appendix: Ramanujan Type Series


Ramanujan's remarkable series for 1= include
p 1 (4n)! 1103 + 26390n]
1=2 2X
 9801 n=0 (n!)4 (4  99)4n :
This series adds roughly eight digits per term. Gosper in 1985 computed 17
million terms of the continued fraction for  using this.
Such series exist because various modular invariants are rational (which is
more-or-less equivalent to identifying those imaginary quadratic elds of class
number 1).
The Chudnovskys' series with d = ;163 is
1
1 =12X n (6n)! 13591409+ n545140134
 n=0(;1) (n!)3(3n)! (6403203)n+1=2 :
Quadratic versions correspond to class number two imaginary quadratic
elds. The largest example has d = ;427 and
1 = 12 X1 (;1)n(6n)! (A + nB )
 n=0 (n!) (3n)! C
3 n+1=2

where
p
A := 212175710912 61p + 1657145277365
B := 13773980892672 61 +p107578229802750
C := 5280(236674 + 30303 61)]3:

This series adds roughly 25 digits per term. These series are of the form
X1 (6 n )! 1
p;j (t)
(a(t) + nb(t)) (3n)!(n!)3 (j (t))n = 
n=0
where
p
b(t) = t(1728 ; j (t))
  
a(t) = b(6t) 1 ; E 4 (t) 6
E6 (t) E2 (t) ; pt
j (t) = E 31728 E43(t)
4 (t) ; E6 (t)
2

X1 n
E2(q) = 1 ; 24 1 nq
n=1 ; q
n
1 n3 q n
X
E4(q) = 1 + 240
n=1 1 ; q
n

X1 n5 q n
E6(q) = 1 ; 540 1 ; qn
n=1
p
q = ;e; t:
Here t is the appropriate discriminant, j is the \absolute invariant", and E2 ,
E4 and E6 are Eisenstein series. There is an unlimited number of such series
with increasingly more rapid convergence. The price is that one must deal with
more complicated algebraic irrationalities.
A class number p eld will involve pth degree algebraic integers as the con-
stants A = a(t), B = b(t) and C = c(t) in the series.
The largest class number three example with d = ;907 gives 37 or 38 digits
per term.
The largest class number four example with d = ;1555 is
p 1 (6n)! A + nB
;C 3 = X
 n=0 (3n)!(n!)
3 C 3n
where

C = ;214772995063512240 ; 96049403338648032  51=2


; 1296  51=2 (10985234579463550323713318473
+ 4912746253692362754607395912  51=2)1=2
A = 63365028312971999585426220 + 28337702140800842046825600  51=2
+ 384  51=2(10891728551171178200467436212395209160385656017
+ 4870929086578810225077338534541688721351255040  51=2)1=2
B = 7849910453496627210289749000 + 3510586678260932028965606400  51=2
+ 2515968  31101=2 (6260208323789001636993322654444020882161
+ 2799650273060444296577206890718825190235  51=2)1=2

This gives 50 additional digits per term.


This is discussed in Class number three Ramanujan type series for 1/Pi in
J. Comp. and Applied Math. 46 (1993) 281-290.
Deriving the Series
 The absolute invariant, and so the coecients A, B, and C satisfy poly-
nomial equations of known degree and height.
 Thus the problem of determining the coecients of each series reduces to
algebra and can be entirely automated.
 From the expressions for j (t), a(t), b(t) it is easy to compute their values
to several hundred digits.
 The lattice basis reduction algorithm now provides the minimal polyno-
mials for each quantity.
 In addition, a higher precision calculation actually provides a proof of the
claimed identity.
 This last step requires knowing a priori bounds on the degrees and heights.

You might also like