Skip to main content

The Borwein Brothers, Pi and the AGM

  • Conference paper
  • First Online:
From Analysis to Visualization (JBCC 2017)

Part of the book series: Springer Proceedings in Mathematics & Statistics ((PROMS,volume 313))

Included in the following conference series:

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

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The formula (1) is listed in Bailey’s compendium [5], and is attributed to Madhava of Sangamagramma (c.1340–c.1425). It follows from the Taylor series for \(\arctan (1/\sqrt{3})\).

  2. 2.

    Attributed to Hero of Alexandria (c.10–70 A.D.), though also called the Babylonian method.

  3. 3.

    Here and elsewhere, \(\log \) denotes the natural logarithm.

  4. 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. 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. 6.

    Similarly, where we exchange the order of taking derivatives and limits elsewhere in this section, it is easy to justify.

  7. 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. 8.

    For example, the equivalence is not mentioned in [4], [15], [29], [30] or [33].

  9. 9.

    In fact, this is how Algorithm BB4 was discovered, by doubling Algorithm BB2 and then making some straightforward program optimisations.

  10. 10.

    Somewhat more general, but based on the same idea, is E. Karatsuba’s FEE method [34].

  11. 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. 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

  1. 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

  2. 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)

    Google Scholar 

  3. Askey, R.: Book review: Pi and the AGM. Am. Math. Mon. 95, 895–897 (1988)

    Google Scholar 

  4. Bailey, D.H.: The computation of \(\pi \) to 29,360,000 decimal digits using Borweins’ quartically convergent algorithm. Math. Comput. 50, 283–296 (1988)

    MathSciNet  MATH  Google Scholar 

  5. 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

  6. Bailey, D.H., Borwein, J.M.: Pi: The Next Generation. Springer, Berlin (2016)

    Book  Google Scholar 

  7. Baruah, N.D., Berndt, B.C., Chan, H.H.: Ramanujan’s series for \(1/\pi \): a survey. Am. Math. Mon. 116, 567–587 (2009)

    Article  MathSciNet  Google Scholar 

  8. Beeler, M., Gosper, R.W., Schroeppel, R.: HAKMEM, AI Memo 239, MIT AI Lab (1972). (Item 143 by E. Salamin.)

    Google Scholar 

  9. Berndt, B.C.: Book review: Pi and the AGM. Math. Comput. 50, 352–354 (1988)

    Article  Google Scholar 

  10. 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

  11. Borwein, J.M., Lectures and presentations. https://www.carma.newcastle.edu.au/jon/index-talks.shtml. Accessed 7 Aug 2018

  12. Borwein, J.M., Borwein, P.B.: The arithmetic-geometric mean and fast computation of elementary functions. SIAM Rev. 26, 351–365 (1984)

    Article  MathSciNet  Google Scholar 

  13. Borwein, J.M., Borwein, P.B.: More quadratically convergent algorithms for \(\pi \). Math. Comput. 46, 247–253 (1986)

    MATH  Google Scholar 

  14. 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)

    MATH  Google Scholar 

  15. 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)

    Article  MathSciNet  Google Scholar 

  16. Bosma, W., Cannon, J., Playoust, C.: The Magma algebra system. I. The user language, J. Symb. Comput. 24, 235–265 (1997)

    Google Scholar 

  17. Brent, R.P.: Some efficient algorithms for solving systems of nonlinear equations. SIAM J. Numer. Anal. 10, 327–344 (1973)

    Article  MathSciNet  Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Brent, R.P.: Fast multiple-precision evaluation of elementary functions. J. ACM 23, 242–251 (1976)

    Article  MathSciNet  Google Scholar 

  21. Brent, R.P.: Old and new algorithms for \(\pi \). Notices AMS 60, 7 (2013)

    Google Scholar 

  22. 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

  23. Brent, R.P., Zimmermann, P.: Modern Computer Arithmetic. Cambridge University Press, Cambridge (2010)

    Book  Google Scholar 

  24. Chudnovsky, D.V., Chudnovsky, G.V.: The computation of classical constants. Proc. Nat. Acad. Sci. USA 88(21), 8178–8182 (1989)

    Article  MathSciNet  Google Scholar 

  25. Cox, D.A.: The arithmetic-geometric mean of Gauss. L’Enseignement Mathématique 30, 275–330 (1984)

    MathSciNet  MATH  Google Scholar 

  26. 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)

    Google Scholar 

  27. Gauss, C.F.: Carl Friedrich Gauss Werke, Bd. 3, Göttingen, 1876, 362–403

    Google Scholar 

  28. Gourdon, X., Sebah, P.: Binary splitting method (2001). http://numbers.computation.free.fr/Constants/Algorithms/splitting.html. Accessed 7 Aug 2018

  29. Guillera, J.: Easy proofs of some Borwein algorithms for \(\pi \). Am. Math. Mon. 115, 850–854 (2008)

    Article  MathSciNet  Google Scholar 

  30. Guillera, J.: New proofs of Borwein-type algorithms for Pi. Integr. Transform. Spec. Funct. 27, 775–782 (2016)

    Article  MathSciNet  Google Scholar 

  31. Harvey, D., van der Hoeven, J., Lecerf, G.: Even faster integer multiplication. J. Complex. 36, 1–30 (2016)

    Article  MathSciNet  Google Scholar 

  32. Jacobi, C.G.J.: Fundamenta Nova Theoriae Functionum Ellipticarum, Königsberg, 1829. Reprinted in Gesammelte Mathematische Werke 1, 255–263 (1829)

    Google Scholar 

  33. Kanada, Y.: Vectorization of multiple-precision arithmetic program and 201,326,000 decimal digits of pi calculation. In Supercomputing 88. IEEE 117–128 (1988)

    Google Scholar 

  34. 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

  35. Knopp, K.: The Elementary Functions, §23 in Theory of Functions Parts I and II, pp. 96–98. Dover, New York (1996) l

    Google Scholar 

  36. Legendre, A.M.: Exercices de Calcul Integral, vol. 1, p. 61. Paris (1811)

    Google Scholar 

  37. 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)

    Google Scholar 

  38. 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

  39. Ostrowski, A.M.: Solution of Equations and Systems of Equations. Academic Press, New York (1960)

    MATH  Google Scholar 

  40. Ramanujan, S.: Modular equations and approximations to pi. Quart. J. Math. (Oxford) 45, 350–372 (1914)

    MATH  Google Scholar 

  41. Ritt, J.F.: Integration in Finite Terms. Columbia University Press, New York (1948)

    Book  Google Scholar 

  42. Salamin, E.: Computation of \(\pi \) using arithmetic-geometric mean. Math. Comput. 30, 565–570 (1976)

    MathSciNet  MATH  Google Scholar 

  43. Sasaki, T., Kanada, Y.: Practically fast multiple-precision evaluation of \(\log (x)\). J. Inf. Process. 5, 247–250 (1982)

    MATH  Google Scholar 

  44. Smith, D.M.: Efficient multiple-precision evaluation of elementary functions. Math. Comput. 52, 131–134 (1989)

    Article  MathSciNet  Google Scholar 

  45. Sturm, J.C.F.: Mémoire sur la résolution des équations numériques. Bulletin des Sciences de Férussac 11, 419–425 (1829)

    Google Scholar 

  46. Watson, G.N.: A Treatise on the Theory of Bessel Functions, 2nd edn. Cambridge (1966)

    Google Scholar 

  47. 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

  48. Wimp, J.: Pi and the AGM: a study in analytic number theory and computational complexity. Review in SIAM Rev. 30, 530–533 (1988)

    Article  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Richard P. Brent .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics