Abstract
We consider some of Jonathan and Peter Borweins’ contributions to the high-precision computation of \(\pi \) and the elementary functions, with particular reference to their book Pi and the AGM (Wiley, 1987). Here “AGM” is the arithmetic–geometric mean of Gauss and Legendre. Because the AGM converges quadratically, it can be combined with fast multiplication algorithms to give fast algorithms for the n-bit computation of \(\pi \), and more generally the elementary functions. These algorithms run in “almost linear” time \(O(M(n)\log n)\), where M(n) is the time for n-bit multiplication. We outline some of the results and algorithms given in Pi and the AGM, and present some related (but new) results. In particular, we improve the published error bounds for some quadratically and quartically convergent algorithms for \(\pi \), such as the Gauss–Legendre algorithm. We show that an iteration of the Borwein-Borwein quartic algorithm for \(\pi \) is equivalent to two iterations of the Gauss–Legendre quadratic algorithm for \(\pi \), in the sense that they produce exactly the same sequence of approximations to \(\pi \) if performed using exact arithmetic.
In fond memory of Jonathan M. Borwein 1951–2016
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
Attributed to Hero of Alexandria (c.10–70 A.D.), though also called the Babylonian method.
- 3.
Here and elsewhere, \(\log \) denotes the natural logarithm.
- 4.
Salamin [42] defines \(c_n\) using the relation \(c_n^2 = a_n^2-b_n^2\). This has the advantage that \(c_0\) is defined naturally, and for \(n > 0\) it is equivalent to our definition. However, it is computationally more expensive to compute \((a_n^2-b_n^2)^{1/2}\) than \(a_n-a_{n+1}\).
- 5.
In [10, §10], Jon Borwein says “It [Algorithm GL] is based on the arithmetic–geometric mean iteration (AGM) and some other ideas due to Gauss and Legendre around 1800, although neither Gauss, nor many after him, ever directly saw the connection to effectively computing \(\pi \)”.
- 6.
Similarly, where we exchange the order of taking derivatives and limits elsewhere in this section, it is easy to justify.
- 7.
For example, one might compute \(x^{1/4}\) using two inverse square roots, i.e. \((x^{-1/2})^{-1/2}\), which is possibly faster than two square roots, i.e. \((x^{1/2})^{1/2}\), see [23, §4.2.3].
- 8.
- 9.
In fact, this is how Algorithm BB4 was discovered, by doubling Algorithm BB2 and then making some straightforward program optimisations.
- 10.
Somewhat more general, but based on the same idea, is E. Karatsuba’s FEE method [34].
- 11.
Alternatively, we could drop the simplifying assumption that \(a_0, b_0 \in \mathcal {H}\) and use the “right choice” of Cox [25, pg. 284] to implement the AGM correctly.
- 12.
Mahler’s result is sufficient for the usual elementary functions, whose zeros are rational multiples of \(\pi \), but it is not applicable to the problem of computing combinations of these functions, e.g. \(\exp (\sin x) + \cos (\log x)\), with small relative accuracy. In general, we do not know enough about the rational approximation of the zeros of such functions to guarantee a small relative error. However, the result that we stated for computing elementary functions with a small absolute error extends to finite combinations of elementary functions under the operations of addition, multiplication, composition, etc. Indeed, the set of elementary functions is usually considered to include such finite combinations, although precise definitions vary. See, for example, §7.3 of Pi and the AGM, Knopp [35, pp. 96–98], Liouville [37], Ritt [41], and Watson [46, pg. 111].
References
Abramowitz, M., Stegun, I.A.: Handbook of Mathematical Functions. Dover, New York (1965). Online version at http://people.math.sfu.ca/~cbm/aands/. Accessed 7 Aug 2018
Andrews, G.E.: Pi and the AGM: a study in analytic number theory and computational complexity. Book review in Bull. (NS) AMS 22, 198–201 (1990)
Askey, R.: Book review: Pi and the AGM. Am. Math. Mon. 95, 895–897 (1988)
Bailey, D.H.: The computation of \(\pi \) to 29,360,000 decimal digits using Borweins’ quartically convergent algorithm. Math. Comput. 50, 283–296 (1988)
Bailey, D.H.: A collection of mathematical formulas involving \(\pi \), Feb. 6 (2018). http://www.davidhbailey.com/dhbpapers/pi-formulas.pdf. Aaccessed 7 Aug 2018
Bailey, D.H., Borwein, J.M.: Pi: The Next Generation. Springer, Berlin (2016)
Baruah, N.D., Berndt, B.C., Chan, H.H.: Ramanujan’s series for \(1/\pi \): a survey. Am. Math. Mon. 116, 567–587 (2009)
Beeler, M., Gosper, R.W., Schroeppel, R.: HAKMEM, AI Memo 239, MIT AI Lab (1972). (Item 143 by E. Salamin.)
Berndt, B.C.: Book review: Pi and the AGM. Math. Comput. 50, 352–354 (1988)
Borwein, J.M.: The life of pi: from Archimedes to Eniac and beyond, prepared for Berggren Festschrift (2012). https://www.carma.newcastle.edu.au/jon/pi-2012.pdf. Accessed 7 Aug 2018
Borwein, J.M., Lectures and presentations. https://www.carma.newcastle.edu.au/jon/index-talks.shtml. Accessed 7 Aug 2018
Borwein, J.M., Borwein, P.B.: The arithmetic-geometric mean and fast computation of elementary functions. SIAM Rev. 26, 351–365 (1984)
Borwein, J.M., Borwein, P.B.: More quadratically convergent algorithms for \(\pi \). Math. Comput. 46, 247–253 (1986)
Borwein, J.M., Borwein, P.B.: Pi and the AGM: A Study in Analytic Number Theory and Computational Complexity. Monographies et Études de la Société Mathématique du Canada. Wiley, Toronto (1987)
Borwein, J.M., Borwein, P.B., Bailey, D.H.: Ramanujan, modular equations, and approximations to pi or how to compute one billion digits of pi. Am. Math. Mon. 96, 201–219 (1989)
Bosma, W., Cannon, J., Playoust, C.: The Magma algebra system. I. The user language, J. Symb. Comput. 24, 235–265 (1997)
Brent, R.P.: Some efficient algorithms for solving systems of nonlinear equations. SIAM J. Numer. Anal. 10, 327–344 (1973)
Brent, R.P.: Multiple-precision zero-finding methods and the complexity of elementary function evaluation. In: Traub, J.F. (ed.) Analytic Computational Complexity, pp. 151–176. Academic, New York (1975)
Brent, R.P.: The complexity of multiple-precision arithmetic. In: Anderssen, R.S., Brent, R.P. (eds.) The Complexity of Computational Problem Solving, pp. 126–165. University of Queensland Press, Brisbane (1976)
Brent, R.P.: Fast multiple-precision evaluation of elementary functions. J. ACM 23, 242–251 (1976)
Brent, R.P.: Old and new algorithms for \(\pi \). Notices AMS 60, 7 (2013)
Brent, R.P.: Jonathan Borwein, Pi and the AGM, Keynote Talk at the Jonathan Borwein Commemorative Conference, Newcastle, NSW (2017). http://maths-people.anu.edu.au/~brent/talks.html. Accessed 7 Aug 2018
Brent, R.P., Zimmermann, P.: Modern Computer Arithmetic. Cambridge University Press, Cambridge (2010)
Chudnovsky, D.V., Chudnovsky, G.V.: The computation of classical constants. Proc. Nat. Acad. Sci. USA 88(21), 8178–8182 (1989)
Cox, D.A.: The arithmetic-geometric mean of Gauss. L’Enseignement Mathématique 30, 275–330 (1984)
Gauss, C.F.: Unpublished Notebook Entry of May 1809, Reproduced in J. Arndt and C. Haenel, Pi: Algorithmen, Computer, Arithmetik, Chap. 7, p. 99. Springer, Berlin (1998)
Gauss, C.F.: Carl Friedrich Gauss Werke, Bd. 3, Göttingen, 1876, 362–403
Gourdon, X., Sebah, P.: Binary splitting method (2001). http://numbers.computation.free.fr/Constants/Algorithms/splitting.html. Accessed 7 Aug 2018
Guillera, J.: Easy proofs of some Borwein algorithms for \(\pi \). Am. Math. Mon. 115, 850–854 (2008)
Guillera, J.: New proofs of Borwein-type algorithms for Pi. Integr. Transform. Spec. Funct. 27, 775–782 (2016)
Harvey, D., van der Hoeven, J., Lecerf, G.: Even faster integer multiplication. J. Complex. 36, 1–30 (2016)
Jacobi, C.G.J.: Fundamenta Nova Theoriae Functionum Ellipticarum, Königsberg, 1829. Reprinted in Gesammelte Mathematische Werke 1, 255–263 (1829)
Kanada, Y.: Vectorization of multiple-precision arithmetic program and 201,326,000 decimal digits of pi calculation. In Supercomputing 88. IEEE 117–128 (1988)
Karatsuba, E.A.: Fast evaluations of transcendental functions. Probl. Peredachi Informat. 27, 4 (1991). Also https://en.wikipedia.org/wiki/FEE_method. Accessed 7 Aug 2018
Knopp, K.: The Elementary Functions, §23 in Theory of Functions Parts I and II, pp. 96–98. Dover, New York (1996) l
Legendre, A.M.: Exercices de Calcul Integral, vol. 1, p. 61. Paris (1811)
Liouville, J.: Sur la classification des Transcendantes et sur l’impossibilité d’exprimer les racines des certaines équations en fonction finie explicite des coefficients. Part 1. J. Math. Pure Appl. 2, 56–105 (1837). Also Part 2, ibid 3, 523–547 (1838)
Mahler, K.: On the approximation of \(\pi \). Proc. Kon. Nederlandsche Akad. v. Wetenschappen Ser. A 56, 30–42 (1953) \(=\) Indag. Math. 15, 30–42 (1953). Also https://carma.newcastle.edu.au/mahler/docs/119.pdf. Accessed 7 Aug 2018
Ostrowski, A.M.: Solution of Equations and Systems of Equations. Academic Press, New York (1960)
Ramanujan, S.: Modular equations and approximations to pi. Quart. J. Math. (Oxford) 45, 350–372 (1914)
Ritt, J.F.: Integration in Finite Terms. Columbia University Press, New York (1948)
Salamin, E.: Computation of \(\pi \) using arithmetic-geometric mean. Math. Comput. 30, 565–570 (1976)
Sasaki, T., Kanada, Y.: Practically fast multiple-precision evaluation of \(\log (x)\). J. Inf. Process. 5, 247–250 (1982)
Smith, D.M.: Efficient multiple-precision evaluation of elementary functions. Math. Comput. 52, 131–134 (1989)
Sturm, J.C.F.: Mémoire sur la résolution des équations numériques. Bulletin des Sciences de Férussac 11, 419–425 (1829)
Watson, G.N.: A Treatise on the Theory of Bessel Functions, 2nd edn. Cambridge (1966)
Whittaker, E.T., Watson, G.N.: A Course of Modern Analysis, 3rd edn. Cambridge (1920). Also http://archive.org/details/cu31924001549660. Accessed 7 Aug 2018
Wimp, J.: Pi and the AGM: a study in analytic number theory and computational complexity. Review in SIAM Rev. 30, 530–533 (1988)
Acknowledgements
I am grateful to Jon and Peter Borwein for becoming sufficiently interested in this subject to write their book Pi and the AGM only a few years after the publication of [18,19,20, 42]. Reading a copy of Pi and the AGM was my first introduction to the Borwein brothers, and was the start of my realisation that we shared many common interests, despite living in different hemispheres. Much later, after Jon and his family moved to Newcastle (NSW), I followed him, bringing our common interests closer together, and benefitting from frequent interaction with him.
Thanks are also due to David H. Bailey for his assistance, and to the Magma group for their excellent software [16].
The author was supported in part by an Australian Research Council grant DP140101417. Jon Borwein was the Principal Investigator on this grant, which was held by Borwein, Brent and Bailey.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Brent, R.P. (2020). The Borwein Brothers, Pi and the AGM. In: Bailey, D., et al. From Analysis to Visualization. JBCC 2017. Springer Proceedings in Mathematics & Statistics, vol 313. Springer, Cham. https://doi.org/10.1007/978-3-030-36568-4_21
Download citation
DOI: https://doi.org/10.1007/978-3-030-36568-4_21
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-36567-7
Online ISBN: 978-3-030-36568-4
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)