# Numerical approximations of π

﻿
Numerical approximations of π

This page is about the history of numerical approximations of the mathematical constant &pi;. There is a summarizing table at chronology of computation of &pi;. See also history of &pi; for other aspects of the evolution of our knowledge about mathematical properties of π.

Early history

Believed to be built during the Fourth Dynasty of Egypt's Old Kingdom, the Great Pyramid was constructed with an approximate ratio of height to circumference of the base of 2π. Each side is 440 cubits long, and the height is believed to have been 280 cubits tall at the time of its construction. This puts the value at approximately 3.142, or 0.04% above the exact value.

An Egyptian scribe named Ahmes wrote the oldest known text to give an approximate value for π. The Rhind Mathematical Papyrus dates from the Egyptian Second Intermediate Period — though Ahmes stated that he copied a Middle Kingdom papyrus (i.e. from before 1650 BC) — and describes the value in such a way that the result obtained comes out to frac|256|81, which is approximately 3.16, or 0.6% above the exact value.

As early as the 19th century BC, Babylonian mathematicians were using π ≈ frac|25|8, which is about 0.5% below the exact value.

The Indian astronomer Yajnavalkya gave astronomical calculations in the "Shatapatha Brahmana" (c. 9th century BC) that led to a fractional approximation of π ≈ frac|339|108 (which equals 3.13888…, which is correct to two decimal places when rounded, or 0.09% below the exact value).

In the third century BC, Archimedes proved the sharp inequalities frac|223|71 < π < frac|22|7, by means of regular 96-gons; these values are 0.02% and 0.04% off, respectively. (Differentiating the arctangent function leads to a simple modern proof that indeed frac|3|1|7 exceeds &pi;.) Later, in the second century AD, Ptolemy using a regular 360-gon obtained a value of 3.141666....Fact|date=June 2008 which is correct to three decimal places.

The Chinese mathematician Liu Hui in 263 AD computed π with to between 3.141024 and 3.142708 with inscribe 96-gon and 192-gon; the average of these two values = 3.141864, less than 0.01% off. However, he suggested that 3.14 was a good enough approximation for practical purpose. Later he obtained a more accurate result "&pi;" = 3927/1250 = 3.1416.

Middle ages

Until 1000, π was known to fewer than 10 decimal digits only.

The Indian mathematician and astronomer, Aryabhata, in the 5th century, gave an accurate approximation for π, and may have realized that π is irrational. He writes, in the second part of the Aryabhatiyam (gaṇitapāda 10):

meaning "Add four to one hundred, multiply by eight and then add sixty-two thousand. The result is approximately the circumference of a circle of diameter twenty thousand. By this rule the relation of the circumference to diameter is given."

In other words (4+100)&times;8 + 62000 is the circumference of a circle with diameter 20000. This provides a value of π ≈ frac|62832|20000 = 3.1416, correct to three decimal places. The commentator Nilakantha Somayaji, (Kerala school of astronomy and mathematics, 15th century) has argued that the word āsanna (approaching), appearing just before the last word, here means not only that this is an approximation, but that the value is incommensurable (or irrational). If this is correct, it is quite a sophisticated insight, for the irrationality of pi was proved in Europe only in 1761 (Lambert). See Proof that π is irrational for an elementary 20th-century proof.

The Chinese mathematician and astronomer, Zu Chongzhi, in the 5th century, computed π between 3.1415926 and 3.1415927, which was correct to 7 decimal places. He gave two other approximations of $pi approxeq frac\left\{22\right\}\left\{7\right\}$ and $pi approxeq frac\left\{355\right\}\left\{113\right\}$.

In the 14th century, the Indian mathematician and astronomer Madhava of Sangamagrama, founder of the Kerala school of astronomy and mathematics, discovered the infinite series for π, now known as the Madhava-Leibniz series, [citation|title=Special Functions|last=George E. Andrews, Richard Askey|first=Ranjan Roy|publisher=Cambridge University Press|year=1999|isbn=0521789885|page=58] [citation|first=R. C.|last=Gupta|title=On the remainder term in the Madhava-Leibniz's series|journal=Ganita Bharati|volume=14|issue=1-4|year=1992|pages=68-71] and gave two methods for computing the value of π. One of these methods is to obtain a rapidly converging series by transforming the original infinite series of π. By doing so, he obtained the infinite series

::$pi = sqrt\left\{12\right\}left\left(1-\left\{1over 3cdot3\right\}+\left\{1over5cdot 3^2\right\}-\left\{1over7cdot 3^3\right\}+cdots ight\right)$

and used the first 21 terms to compute an approximation of π correct to 11 decimal places as 3.14159265359.

The other method he used was to add a remainder term to the original series of π. He used the remainder term

::$frac\left\{n^2 + 1\right\}\left\{4n^3 + 5n\right\}$

in the infinite series expansion of frac|π|4 to improve the approximation of π to 13 decimal places of accuracy when "n" = 75.

The Persian mathematician and astronomer, Ghyath ad-din Jamshid Kashani (1380–1429), correctly computed 2π to 9 sexagesimal digits. ["Al-Kashi", author: Adolf P. Youschkevitch, chief editor: Boris A. Rosenfeld, p. 256] This figure is equivalent to 16 decimal digits as

::$2pi = 6.2831853071795865$

which equates to

::$pi = 3.14159265358979325.$

He achieved this level of accuracy by calculating the perimeter of a regular polygon with 3 × 2e|18 sides.Fact|date=February 2007

16th to 19th centuries

The German mathematician Ludolph van Ceulen ("circa" 1600) computed the first 35 decimal places of π. He was so proud of this accomplishment that he had them inscribed on his tombstone.

The Slovene mathematician Jurij Vega in 1789 calculated the first 140 decimal places for π of which the first 126 were correct [http://www.southernct.edu/~sandifer/Ed/History/Preprints/Talks/Jurij%20Vega/Vega%20math%20script.pdf] and held the world record for 52 years until 1841, when William Rutherford calculated 208 decimal places of which the first 152 were correct. Vega improved John Machin's formula from 1706 and his method is still mentioned today.

The English amateur mathematician William Shanks, a man of independent means, spent over 20 years calculating π to 707 decimal places (accomplished in 1873). His routine was as follows: he would calculate new digits all morning; and then he would spend all afternoon checking his morning's work. His work was made possible by the recent invention of the logarithm and its tables by Napier and Briggs. This was the longest expansion of π until the advent of the electronic digital computer a century later.

The Gauss-Legendre algorithm is used for calculating digits of π.

20th century

In 1910, the Indian mathematician Srinivasa Ramanujan found several rapidly converging infinite series of π, including

:$frac\left\{1\right\}\left\{pi\right\} = frac\left\{2sqrt\left\{2\left\{9801\right\} sum^infty_\left\{k=0\right\} frac\left\{\left(4k\right)!\left(1103+26390k\right)\right\}\left\{\left(k!\right)^4 396^\left\{4k$

which computes a further 8 decimal places of π with each term in the series. His series are now the basis for the fastest algorithms currently used to calculate π.

From the mid-20th century onwards, all calculations of &pi; were done with the help of calculators or computers.

In 1944, D. F. Ferguson, with the aid of a mechanical desk calculator, found that William Shanks had made a mistake in the 528th decimal place, and that all succeeding digits were incorrect.

In the early years of the computer, an expansion of π to 100,265 decimal placesRp|78 was computed by Maryland mathematician Dr. Daniel Shanks and his team at the United States Naval Research Laboratory (N.R.L.) in Washington, D.C. (Dr. Shanks's son Oliver Shanks, also a mathematician, states that there is no connection to William Shanks, and the family's roots are in Central EuropeFact|date=June 2008).

In 1961, Daniel Shanks and his team used two different power series for calculating the digital of π. For one it was known that any error would produce a value slightly high, and for the other, it was known that any error would produce a value slightly low. And hence, as long as the two series produced the same digits, there was a very high confidence that they were correct. The first 100,000 digits of π were published by the N.R.L.citation|first1=D.|last1=Shanks|first2=J. W.|last2=Wrench, Jr.|title=Calculation of pi to 100,000 decimals|journal=Mathematics of Computation|volume=16|year=1962|pages=76-99.] Rp|80–99 The authors outlined what would be needed to calculate π to 1,000,000 decimal places and concluded that the task was beyond that day's technology, but would be possible in 5 to 7 years. Rp|78

In 1989, the Chudnovsky brothers correctly computed π to over a billion decimal places on the supercomputer IBM 3090 using the following variation of Ramanujan's infinite series of π:

:$frac\left\{1\right\}\left\{pi\right\} = 12 sum^infty_\left\{k=0\right\} frac\left\{\left(-1\right)^k \left(6k\right)! \left(13591409 + 545140134k\right)\right\}\left\{\left(3k\right)!\left(k!\right)^3 640320^\left\{3k + 3/2.$

In 1999, Yasumasa Kanada and his team at the University of Tokyo correctly computed π to over 200 billion decimal places on the supercomputer HITACHI SR8000/MPP (128 nodes) using another variation of Ramanujan's infinite series of π. In October 2005 they claimed to have calculated it to 1.24 trillion places. [ [http://www.super-computing.org/pi_current.html Announcement] at the Kanada lab web site.]

Less accurate approximations

Some approximations which have been given for π are notable in that they were less precise than previously known values.

Biblical value

It is often claimed that the Bible states that π is exactly 3, based on a passage in 1 Kings 7:23 (ca. 971-852 BCE) and 2 Chronicles 4:2 giving measurements for the round basin located in front of the Temple in Jerusalem as having a diameter of 10 cubits and a circumference of 30 cubits. Rabbi Nehemiah explained this in his "Mishnat ha-Middot" (the earliest known Hebrew text on geometry, ca. 150 CE) by saying that the diameter was measured from the "outside" of the brim while the circumference was measured along the "inner" rim. The stated dimensions would be exact if measured this way on a brim about four inches wide.

This is disputed, however, and other explanations have been offered, including that the measurements are given in round numbers (as the Hebrews tended to round off measurements to whole numbers), that cubits were not exact units, or that the basin may not have been exactly circular, or that the brim was wider than the bowl itself. Many reconstructions of the basin show a wider brim extending outward from the bowl itself by several inches. [ [http://mathforum.org/library/drmath/view/52573.html Math Forum - Ask Dr. Math ] ]

The Indiana bill

The "Indiana Pi Bill" of 1897, which never passed out of committee, has been claimed to imply a number of different values for π, although the closest it comes to explicitly asserting one is the wording "the ratio of the diameter and circumference is as five-fourths to four", which would make π = frac|16|5 = 3.2.

Development of efficient formula

Machin-like formulae

For fast calculations, one may use formulæ such as Machin's:

: $frac\left\{pi\right\}\left\{4\right\} = 4 arctanfrac\left\{1\right\}\left\{5\right\} - arctanfrac\left\{1\right\}\left\{239\right\}$

together with the Taylor series expansion of the function arctan("x"). This formula is most easily verified using polar coordinates of complex numbers, starting with

:$\left(5+i\right)^4cdot\left(-239+i\right)=-114244-114244i.$

Another example is:: $frac\left\{pi\right\}\left\{4\right\} = arctanfrac\left\{1\right\}\left\{2\right\} + arctanfrac\left\{1\right\}\left\{3\right\}$

Formulæ of this kind are known as "Machin-like formulae".

Other classical formulae

Other formulæ that have been used to compute estimates of π include:: :Liu Hui

:$pi = sqrt\left\{12\right\}left\left(1-\left\{1over 3cdot3\right\}+\left\{1over5cdot 3^2\right\}-\left\{1over7cdot 3^3\right\}+cdots ight\right)$:Madhava.

:$\left\{pi\right\} = 20 arctanfrac\left\{1\right\}\left\{7\right\} + 8 arctanfrac\left\{3\right\}\left\{79\right\}$:Euler.

:$frac\left\{pi\right\}\left\{2\right\}=sum_\left\{k=0\right\}^inftyfrac\left\{k!\right\}\left\{\left(2k+1\right)!!\right\}=1+frac\left\{1\right\}\left\{3\right\}left\left(1+frac\left\{2\right\}\left\{5\right\}left\left(1+frac\left\{3\right\}\left\{7\right\}left\left(1+frac\left\{4\right\}\left\{9\right\}\left(1+cdots\right) ight\right) ight\right) ight\right)$:Newton.

:$frac\left\{1\right\}\left\{pi\right\} = frac\left\{2sqrt\left\{2\left\{9801\right\} sum^infty_\left\{k=0\right\} frac\left\{\left(4k\right)!\left(1103+26390k\right)\right\}\left\{\left(k!\right)^4 396^\left\{4k$:Ramanujan.

This converges extraordinarily rapidly. Ramanujan's work is the basis for the Chudnovsky algorithm, the fastest algorithms used, as of the turn of the millennium, to calculate π; it is based on:

:$frac\left\{1\right\}\left\{pi\right\} = 12 sum^infty_\left\{k=0\right\} frac\left\{\left(-1\right)^k \left(6k\right)! \left(13591409 + 545140134k\right)\right\}\left\{\left(3k\right)!\left(k!\right)^3 640320^\left\{3k + 3/2$:David Chudnovsky and Gregory Chudnovsky.

Many other expressions for π were developed and published by the incredibly intuitive Indian mathematician Srinivasa Ramanujan. He worked with mathematician G. H. Hardy in England for a number of years.

Modern algorithms

Extremely long decimal expansions of π are typically computed with iterative formulae like the Gauss–Legendre algorithm and Borwein's algorithm. The Salamin–Brent algorithm which was invented in 1976 is an example of the former.

Borwein's algorithm, found in 1985 by Jonathan and Peter Borwein, converges extremely fast:For $y_0=sqrt2-1, a_0=6-4sqrt2$ and:$y_\left\{k+1\right\}=\left(1-f\left(y_k\right)\right)/\left(1+f\left(y_k\right)\right) ~,~ a_\left\{k+1\right\} = a_k\left(1+y_\left\{k+1\right\}\right)^4 - 2^\left\{2k+3\right\} y_\left\{k+1\right\}\left(1+y_\left\{k+1\right\}+y_\left\{k+1\right\}^2\right)$where $f\left(y\right)=\left(1-y^4\right)^\left\{1/4\right\}$, the sequence $1/a_k$ converges quartically to π, giving about 100 digits in three steps and over a trillion digits after 20 steps.

The first one million digits of π and frac|1|π are available from Project Gutenberg (see external links below). The current record (December 2002) by Yasumasa Kanada of Tokyo University stands at 1,241,100,000,000 digits, which were computed in September 2002 on a 64-node Hitachi supercomputer with 1 terabyte of main memory, which carries out 2 trillion operations per second, nearly twice as many as the computer used for the previous record (206 billion digits). The following Machin-like formulæ were used for this:

:$frac\left\{pi\right\}\left\{4\right\} = 12 arctanfrac\left\{1\right\}\left\{49\right\} + 32 arctanfrac\left\{1\right\}\left\{57\right\} - 5 arctanfrac\left\{1\right\}\left\{239\right\} + 12 arctanfrac\left\{1\right\}\left\{110443\right\}$:K. Takano (1982).

: $frac\left\{pi\right\}\left\{4\right\} = 44 arctanfrac\left\{1\right\}\left\{57\right\} + 7 arctanfrac\left\{1\right\}\left\{239\right\} - 12 arctanfrac\left\{1\right\}\left\{682\right\} + 24 arctanfrac\left\{1\right\}\left\{12943\right\}$ (F. C. W. Störmer (1896)).

These approximations have so many digits that they are no longer of any practical use, except for testing new supercomputers. (Normality of π will always depend on the infinite string of digits on the end, not on any finite computation.)

Formulae for binary digits

In 1997, David H. Bailey, Peter Borwein and Simon Plouffe published a paper (Bailey, 1997) on a new formula for π as an infinite series:

: $pi = sum_\left\{k = 0\right\}^\left\{infty\right\} frac\left\{1\right\}\left\{16^k\right\}left\left( frac\left\{4\right\}\left\{8k + 1\right\} - frac\left\{2\right\}\left\{8k + 4\right\} - frac\left\{1\right\}\left\{8k + 5\right\} - frac\left\{1\right\}\left\{8k + 6\right\} ight\right).$

This formula permits one to easily compute the "k"th binary or hexadecimal digit of π, without having to compute the preceding "k" − 1 digits. [http://www.nersc.gov/~dhbailey/ Bailey's website] contains the derivation as well as implementations in various programming languages. The PiHex project computed 64-bits around the quadrillionth bit of π (which turns out to be 0).

"&pi;" and a fractal

A feature of the Mandelbrot set recently reported [cite web|url=https://home.comcast.net/~davejanelle/mandel.pdf|title=π in the Mandelbrot set] gives a means to calculate an approximate value of "&pi;" to any chosen accuracy, without seeking the limit of an infinite series. One applies the iteration

:$z mapsto z^2 + c$

where the complex number

:$c = -0.75 + i e$

where $e$ is the non-zero precision required, and counts the number "N" of iterations until

:$\left(Re\left(z\right)^2 + Im\left(z\right)^2\right) geqq 4 ,$

i.e. stop when an iteration hits the circle radius 2 in the complex plane. The result is simply the approximation

:$pi = N e pm e ,$

In the graphical view one starts iterating from a point just above the bottom of the "seahorse valley" of the Mandelbrot set at (−0.75, 0).

Miscellaneous formulæ

Historically, for a long time the base 60 was used for calculations. In this base, π can be approximated to eight (decimal!) significant figures as

:$3 + frac\left\{8\right\}\left\{60\right\} + frac\left\{29\right\}\left\{60^2\right\} + frac\left\{44\right\}\left\{60^3\right\}$

(The next sexagesimal digit is 0, causing truncation here to yield a relatively good approximation.)

In addition, the following expressions can be used to estimate π:

* accurate to 9 digits:::$frac\left\{63\right\}\left\{25\right\} imes frac\left\{17 + 15sqrt\left\{5\left\{7 + 15sqrt\left\{5$

*accurate to 9 places::: $sqrt \left[4\right] \left\{frac\left\{2143\right\}\left\{22$: This is from Ramanujan, who claimed the goddess Namagiri appeared to him in a dream and told him the true value of &pi;.Fact|date=February 2007

*Another approximation by Ramanujan is the following:::$frac\left\{9\right\}\left\{5\right\}+sqrt\left\{frac\left\{9\right\}\left\{5$

* accurate to 4 digits:::$sqrt \left[3\right] \left\{31\right\}$

* accurate to 3 digits:::$sqrt\left\{7+sqrt\left\{6+sqrt\left\{5\right\}$ [A nested radical approximation for pi. [http://www.mschneider.cc/papers/pi.pdf] ]

* accurate to 3 digits::: $sqrt\left\{2\right\} + sqrt\left\{3\right\}$: Karl Popper conjectured that Plato knew this expression, that he believed it to be exactly &pi;, and that this is responsible for some of Plato's confidence in the omnicompetence of mathematical geometry &mdash; and Plato's repeated discussion of special right triangles that are either isosceles or halves of equilateral triangles.

* accurate to 7 decimal places:::$frac\left\{54648\right\}\left\{17395\right\}$

* accurate to 10 decimal places:::$frac\left\{833009\right\}\left\{265155\right\}$

* The continued fraction representation of π can be used to generate successive best rational approximations. These approximations are the best possible rational approximations of π relative to the size of their denominators. Here is a list of the first of these, punctuated at significant steps:
*:$frac\left\{3\right\}\left\{1\right\},quad frac\left\{13\right\}\left\{4\right\},frac\left\{16\right\}\left\{5\right\},frac\left\{19\right\}\left\{6\right\},frac\left\{22\right\}\left\{7\right\},quad frac\left\{179\right\}\left\{57\right\},frac\left\{201\right\}\left\{64\right\},frac\left\{223\right\}\left\{71\right\},frac\left\{245\right\}\left\{78\right\},frac\left\{267\right\}\left\{85\right\},frac\left\{289\right\}\left\{92\right\},frac\left\{311\right\}\left\{99\right\},frac\left\{333\right\}\left\{106\right\},quad frac\left\{355\right\}\left\{113\right\},quad frac\left\{52163\right\}\left\{16604\right\}$

ee also

* List of formulae involving π

Notes

References

* cite journal
author = Bailey, David H., Borwein, Peter B., and Plouffe, Simon
year =1997 | month = April
title = On the Rapid Computation of Various Polylogarithmic Constants
journal = Mathematics of Computation
volume = 66 | issue = 218 | pages = 903–913
url = http://crd.lbl.gov/~dhbailey/dhbpapers/digits.pdf
doi = 10.1090/S0025-5718-97-00856-9

* cite book
author = Joseph, George G.
year =2000
title = The Crest of the Peacock: Non-European Roots of Mathematics
edition=New ed., London : Penguin
id=ISBN 0-14-027778-1

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Numerical integration — consists of finding numerical approximations for the value S In numerical analysis, numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral, and by extension, the term is also… …   Wikipedia

• Numerical ordinary differential equations — Illustration of numerical integration for the differential equation y = y,y(0) = 1. Blue: the Euler method, green: the midpoint method, red: the exact solution, y = et. The step size is h = 1.0 …   Wikipedia

• Numerical continuation — is a method of computing approximate solutions of a system of parameterized nonlinear equations, The parameter λ is usually a real scalar, and the solution an n vector. For a fixed parameter value λ,, maps Euclidean n space into itself. Often the …   Wikipedia

• Numerical differentiation — is a technique of numerical analysis to produce an estimate of the derivative of a mathematical function or function subroutine using values from the function and perhaps other knowledge about the function. Contents 1 Finite difference formulae 1 …   Wikipedia

• Numerical relativity — is one of the branches of general relativity that uses numerical methods and algorithms to solve and analyze problems. To this end, supercomputers are often employed to study black holes, gravitational waves, neutron stars and many other… …   Wikipedia

• Numerical diffusion — is a difficulty with computer simulations of continua (such as fluids) wherein the simulated medium exhibits a higher diffusivity than the true medium. This phenomenon can be particularly egregious when the system should not be diffusive at all,… …   Wikipedia

• numerical analysis — the branch of mathematics dealing with methods for obtaining approximate numerical solutions of mathematical problems. [1925 30] * * * Branch of applied mathematics that studies methods for solving complicated equations using arithmetic… …   Universalium

• Approximations of π — Timeline of approximations for pi …   Wikipedia

• Numerical model of the Solar System — A numerical model of the Solar System is a set of mathematical equations, which, when solved, give the approximate positions of the planets as a function of time. Attempts to create such a model established the more general field of celestial… …   Wikipedia

• Numerical analysis — Babylonian clay tablet BC 7289 (c. 1800–1600 BC) with annotations. The approximation of the square root of 2 is four sexagesimal figures, which is about six decimal figures. 1 + 24/60 + 51/602 + 10/603 = 1.41421296...[1] Numerical analysis is the …   Wikipedia