Approximations of π

Further progress was not made until the 14th century, when Madhava of Sangamagrama developed approximations correct to eleven and then thirteen digits.

The record of manual approximation of π is held by William Shanks, who calculated 527 decimals correctly in 1853.

On June 28, 2024, the current record was established by the StorageReview Lab team with Alexander Yee's y-cruncher with 202 trillion (2.02×1014) digits.

Some Egyptologists[3] have claimed that the ancient Egyptians used an approximation of π as 22⁄7 = 3.142857 (about 0.04% too high) from as early as the Old Kingdom (c. 2700–2200 BC).

[5][6] Babylonian mathematics usually approximated π to 3, sufficient for the architectural projects of the time (notably also reflected in the description of Solomon's Temple in the Hebrew Bible).

[8][9][10][11] At about the same time, the Egyptian Rhind Mathematical Papyrus (dated to the Second Intermediate Period, c. 1600 BCE, although stated to be a copy of an older, Middle Kingdom text) implies an approximation of π as 256⁄81 ≈ 3.16 (accurate to 0.6 percent) by calculating the area of a circle via approximation with the octagon.

...In the 3rd century BCE, Archimedes proved the sharp inequalities 223⁄71 < π < 22⁄7, by means of regular 96-gons (accuracies of 2·10−4 and 4·10−4, respectively).

The Chinese mathematician Liu Hui in 263 CE computed π to between 3.141024 and 3.142708 by inscribing a 96-gon and 192-gon; the average of these two values is 3.141866 (accuracy 9·10−5).

He has also frequently been credited with a later and more accurate result, π ≈ 3927⁄1250 = 3.1416 (accuracy 2·10−6), although some scholars instead believe that this is due to the later (5th-century) Chinese mathematician Zu Chongzhi.

Zu Chongzhi's results surpass the accuracy reached in Hellenistic mathematics, and would remain without improvement for close to a millennium.

His 15th-century commentator Nilakantha Somayaji (Kerala school of astronomy and mathematics) has argued that the word means not only that this is an approximation, but that the value is incommensurable (irrational).

The German-Dutch mathematician Ludolph van Ceulen (circa 1600) computed the first 35 decimal places of π with a 262-gon.

In 1789, the Slovene mathematician Jurij Vega improved John Machin's formula to calculate the first 140 digits, of which the first 126 were correct.

The magnitude of such precision (152 decimal places) can be put into context by the fact that the circumference of the largest known object, the observable universe, can be calculated from its diameter (93 billion light-years) to a precision of less than one Planck length (at 1.6162×10−35 meters, the shortest unit of length expected to be directly measurable) using π expressed to just 62 decimal places.

[33] The English amateur mathematician William Shanks calculated π to 530 decimal places in January 1853, of which the first 527 were correct (the last few likely being incorrect due to round-off errors).

In 1944−45, 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.

[39]: 80–99  The authors outlined what would be needed to calculate π to 1 million decimal places and concluded that the task was beyond that day's technology, but would be possible in five to seven years.

In November 2002, Yasumasa Kanada and a team of 9 others used the Hitachi SR8000, a 64-node supercomputer with 1 terabyte of main memory, to calculate π to roughly 1.24 trillion digits in around 600 hours (25 days).

Heron reports in his Metrica (about 60 CE) that Archimedes continued the computation in a now lost book, but then attributes an incorrect value to him.

[67] Archimedes uses no trigonometry in this computation and the difficulty in applying the method lies in obtaining good approximations for the square roots that are involved.

Trigonometry, in the form of a table of chord lengths in a circle, was probably used by Claudius Ptolemy of Alexandria to obtain the value of π given in the Almagest (circa 150 CE).

[68] Advances in the approximation of π (when the methods are known) were made by increasing the number of sides of the polygons used in the computation.

[73][74] A former calculation record (December 2002) by Yasumasa Kanada of Tokyo University stood at 1.24 trillion 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).

[75] Properties like the potential normality of π will always depend on the infinite string of digits on the end, not on any finite computation.

Closer approximations can be produced by using larger values of r. Mathematically, this formula can be written: In other words, begin by choosing a value for r. Consider all cells (x, y) in which both x and y are integers between −r and r. Starting at 0, add 1 for each cell whose distance to the origin (0, 0) is less than or equal to r. When finished, divide the sum, representing the area of a circle of radius r, by r2 to find the approximation of π.

[80] Note that Madhava's correction term is The well-known values ⁠22/7⁠ and ⁠355/113⁠ are respectively the second and fourth continued fraction approximations to π.

Knowing that 4 arctan 1 = π, the formula can be simplified to get: with a convergence such that each additional 10 terms yields at least three more digits.

The algorithm requires virtually no memory for the storage of an array or matrix so the one-millionth digit of π can be computed using a pocket calculator.

In 1997, David H. Bailey, Peter Borwein and Simon Plouffe published a paper (Bailey, 1997) on a new formula for π as an infinite series: This formula permits one to fairly readily compute the kth binary or hexadecimal digit of π, without having to compute the preceding k − 1 digits.

They typically implement checkpointing and efficient disk swapping to facilitate extremely long-running and memory-expensive computations.

Graph showing the historical evolution of the record precision of numerical approximations to pi, measured in decimal places (depicted on a logarithmic scale; time before 1400 is not shown to scale)
Comparison of the convergence of two Madhava series (the one with 12 in dark blue) and several historical infinite series for π . S n is the approximation after taking n terms. Each subsequent subplot magnifies the shaded area horizontally by 10 times. (click for detail)
Numerical approximation of π : as points are randomly scattered inside the unit square, some fall within the unit circle. The fraction of points inside the circle approaches π/4 as points are added.
This circle as it would be drawn on a Cartesian coordinate graph. The cells (±3, ±4) and (±4, ±3) are labeled.