Borwein's algorithm

From HandWiki
Short description: Method for calculating pi

In mathematics, Borwein's algorithm is an algorithm devised by Jonathan and Peter Borwein to calculate the value of 1/π. They devised several other algorithms. They published the book Pi and the AGM – A Study in Analytic Number Theory and Computational Complexity.[1]

Ramanujan–Sato series

These two are examples of a Ramanujan–Sato series. The related Chudnovsky algorithm uses a discriminant with class number 1.

Class number 2 (1989)

Start by setting[2]

A=21217571091261+1657145277365B=1377398089267261+107578229802750C=(5280(236674+3030361))3

Then

1π=12n=0(1)n(6n)!(A+nB)(n!)3(3n)!Cn+12

Each additional term of the partial sum yields approximately 25 digits.

Class number 4 (1993)

Start by setting[3]

A=63365028312971999585426220+283377021408008420468256005+3845(10891728551171178200467436212395209160385656017+48709290865788102250773385345416887213512550405)12B=7849910453496627210289749000+35105866782609320289656064005+25159683110(6260208323789001636993322654444020882161+27996502730604442965772068907188251902355)12C=21477299506351224096049403338648032512965(10985234579463550323713318473+49127462536923627546073959125)12

Then

C3π=n=0(6n)!(3n)!(n!)3A+nBC3n

Each additional term of the series yields approximately 50 digits.

Iterative algorithms

Quadratic convergence (1984)

Start by setting[4]

a0=2b0=0p0=2+2

Then iterate

an+1=an+1an2bn+1=(1+bn)anan+bnpn+1=(1+an+1)pnbn+11+bn+1

Then pk converges quadratically to π; that is, each iteration approximately doubles the number of correct digits. The algorithm is not self-correcting; each iteration must be performed with the desired number of correct digits for π's final result.

Cubic convergence (1991)

Start by setting

a0=13s0=312

Then iterate

rk+1=31+2(1sk3)13sk+1=rk+112ak+1=rk+12ak3k(rk+121)

Then ak converges cubically to 1/π; that is, each iteration approximately triples the number of correct digits.

Quartic convergence (1985)

Start by setting[5]

a0=2(21)2y0=21

Then iterate

yk+1=1(1yk4)141+(1yk4)14ak+1=ak(1+yk+1)422k+3yk+1(1+yk+1+yk+12)

Then ak converges quartically against 1/π; that is, each iteration approximately quadruples the number of correct digits. The algorithm is not self-correcting; each iteration must be performed with the desired number of correct digits for π's final result.

One iteration of this algorithm is equivalent to two iterations of the Gauss–Legendre algorithm. A proof of these algorithms can be found here:[6]

Quintic convergence

Start by setting

a0=12s0=5(52)=5ϕ3

where ϕ=1+52 is the golden ratio. Then iterate

xn+1=5sn1yn+1=(xn+11)2+7zn+1=(12xn+1(yn+1+yn+124xn+13))15an+1=sn2an5n(sn252+sn(sn22sn+5))sn+1=25(zn+1+xn+1zn+1+1)2sn

Then ak converges quintically to 1/π (that is, each iteration approximately quintuples the number of correct digits), and the following condition holds:

0<an1π<165ne5nπ

Nonic convergence

Start by setting

a0=13r0=312s0=(1r03)13

Then iterate

tn+1=1+2rnun+1=(9rn(1+rn+rn2))13vn+1=tn+12+tn+1un+1+un+12wn+1=27(1+sn+sn2)vn+1an+1=wn+1an+32n1(1wn+1)sn+1=(1rn)3(tn+1+2un+1)vn+1rn+1=(1sn+13)13

Then ak converges nonically to 1/π; that is, each iteration approximately multiplies the number of correct digits by nine.[7]

See also

References

  1. Jonathan M. Borwein, Peter B. Borwein, Pi and the AGM – A Study in Analytic Number Theory and Computational Complexity, Wiley, New York, 1987. Many of their results are available in: Jorg Arndt, Christoph Haenel, Pi Unleashed, Springer, Berlin, 2001, ISBN:3-540-66572-2
  2. Bailey, David H (2023-04-01). "Peter Borwein: A Visionary Mathematician". Notices of the American Mathematical Society 70 (04): 610-613. doi:10.1090/noti2675. ISSN 0002-9920. 
  3. Borwein, J.M.; Borwein, P.B. (1993). "Class number three Ramanujan type series for 1/π". Journal of Computational and Applied Mathematics 46 (1-2): 281–290. doi:10.1016/0377-0427(93)90302-R. 
  4. Arndt, Jörg; Haenel, Christoph (1998). π Unleashed. Springer-Verlag. p. 236. ISBN 3-540-66572-2. 
  5. Mak, Ronald (2003). The Java Programmers Guide to Numerical Computation. Pearson Educational. p. 353. ISBN 0-13-046041-9. 
  6. Milla, Lorenz (2019), Easy Proof of Three Recursive π-Algorithms 
  7. Henrik Vestermark (4 November 2016). "Practical implementation of π Algorithms". http://www.hvks.com/Numerical/Downloads/HVE%20Practical%20implementation%20of%20PI%20Algorithms.pdf.