| Part of a series of articles on the |
| mathematical constant π |
 |
| Uses |
|
|
| Properties |
|
|
| Value |
|
|
| People |
|
|
| History |
|
|
| In culture |
|
|
| Related topics |
|
|
|
|
Ancient civilizations required fairly accurate computed values for
π for practical reasons. It was calculated to seven digits, using geometrical techniques, in
Chinese mathematics, and to about five digits in
Indian mathematics in the 5th century AD. The historically first exact formula for
π, based on
infinite series, was not available until a millennium later, when in the 14th century the
Madhava–Leibniz series was discovered in Indian mathematics.
[1][2] In the 20th and 21st centuries, mathematicians and
computer scientists discovered new approaches that, when combined with increasing computational power, extended the decimal representation of
π to many trillions of digits after the decimal point.
[3] Practically all scientific applications require no more than a few hundred digits of
π, and many substantially fewer, so the primary motivation for these computations is the quest to find more efficient algorithms for calculating lengthy numeric series, as well as the human desire to break records.
[4][5] The extensive calculations involved have also been used to test
supercomputers and high-precision multiplication
algorithms.
Because its definition relates to the circle,
π is found in many formulae in
trigonometry and
geometry, especially those concerning circles, ellipses, and spheres. Because of its special role as an
eigenvalue,
π appears in areas of mathematics and the sciences having little to do with the geometry of circles, such as
number theory and
statistics. It is also found in
cosmology,
thermodynamics,
mechanics, and
electromagnetism. The ubiquity of
π makes it one of the most widely known mathematical constants both inside and outside the scientific community; several books devoted to it have been published, the number is celebrated on
Pi Day, and record-setting calculations of the digits of
π often result in news headlines. Attempts to memorize the value of
π with increasing precision have led to records of over 70,000 digits.
Fundamentals
Name
The symbol used by mathematicians to represent the ratio of a circle's circumference to its diameter is the lowercase
Greek letter π, sometimes spelled out as
pi, and derived from the first letter of the Greek word
perimetros, meaning circumference.
[6] In English,
π is
pronounced as "pie" (
,
paɪ).
[7] In mathematical use, the lowercase letter
π (or π in
sans-serif font) is distinguished from its capitalized and enlarged counterpart
∏, which denotes a
product of a sequence, analogous to how
∑ denotes
summation.
Definition
The circumference of a circle is slightly more than three times as long as its diameter. The exact ratio is called
π.

The ratio
C/d is constant, regardless of the circle's size. For example, if a circle has twice the diameter of another circle it will also have twice the circumference, preserving the ratio
C/d. This definition of
π implicitly makes use of
flat (Euclidean) geometry; although the notion of a circle can be extended to any
curved (non-Euclidean) geometry, these new circles will no longer satisfy the formula
π = C/d.
[8]
Here, the circumference of a circle is the
arc length around the perimeter of the circle, a quantity which can be formally defined independently of geometry using
limits, a concept in
calculus.
[9] For example, one may compute directly the arc length of the top half of the unit circle given in
Cartesian coordinates by
x2 + y2 = 1, as the
integral:
[10]

An integral such as this was adopted as the definition of
π by
Karl Weierstrass, who defined it directly as an integral in 1841.
[11]
In a similar spirit,
π can be defined instead using properties of the
complex exponential,
exp(z), of a
complex variable
z. Like the cosine, the complex exponential can be defined in one of several ways. The set of complex numbers at which
exp(z) is equal to one is then an (imaginary) arithmetic progression of the form:

A circle encloses the largest area that can be attained within a given perimeter. Thus the number
π is also characterized as the best constant in the
isoperimetric inequality (times one-fourth). There are many other, closely related, ways in which
π appears as an
eigenvalue of some geometrical or physical process; see
below.
Irrationality and normality
The digits of
π have no apparent pattern and have passed tests for
statistical randomness, including tests for
normality; a number of infinite length is called normal when all possible sequences of digits (of any given length) appear equally often.
[21] The conjecture that
π is
normal has not been proven or disproven.
[21]
Since the advent of computers, a large number of digits of
π have been available on which to perform statistical analysis.
Yasumasa Kanada has performed detailed statistical analyses on the decimal digits of
π and found them consistent with normality; for example, the frequencies of the ten digits 0 to 9 were subjected to
statistical significance tests, and no evidence of a pattern was found.
[22] Any random sequence of digits contains arbitrarily long subsequences that appear non-random, by the
infinite monkey theorem. Thus, because the sequence of
π's digits passes statistical tests for randomness, it contains some sequences of digits that may appear non-random, such as a
sequence of six consecutive 9s that begins at the 762nd decimal place of the decimal representation of
π.
[23]
Transcendence
The transcendence of
π has two important consequences: First,
π cannot be expressed using any finite combination of rational numbers and square roots or
n-th roots such as
3√31 or
√10. Second, since no transcendental number can be
constructed with
compass and straightedge, it is not possible to "
square the circle". In other words, it is impossible to construct, using compass and straightedge alone, a square whose area is exactly equal to the area of a given circle.
[26] Squaring a circle was one of the important geometry problems of the
classical antiquity.
[27] Amateur mathematicians in modern times have sometimes attempted to square the circle and sometimes claim success despite the fact that it is mathematically impossible.
[28]
Continued fractions
Like all irrational numbers,
π cannot be represented as a
common fraction (also known as a
simple or
vulgar fraction), by the very definition of "irrational number" (i.e., "not a rational number"). But every irrational number, including
π, can be represented by an infinite series of nested fractions, called a
continued fraction:

Truncating the continued fraction at any point yields a rational approximation for
π; the first four of these are 3, 22/7, 333/106, and 355/113. These numbers are among the most well-known and widely used historical approximations of the constant. Each approximation generated in this way is a best rational approximation; that is, each is closer to
π than any other fraction with the same or a smaller denominator.
[29] Because
π is known to be transcendental, it is by definition not
algebraic and so cannot be a
quadratic irrational. Therefore,
π cannot have a
periodic continued fraction. Although the simple continued fraction for
π (shown above) also does not exhibit any other obvious pattern,
[30] mathematicians have discovered several
generalized continued fractions that do, such as:
[31]

Approximate value
- Integers: 3
- Fractions: Approximate fractions include (in order of increasing accuracy) 22/7, 333/106, 355/113, 52163/16604, 103993/33102, and 245850922/78256779.[29] (List is selected terms from
A063674 and
A063673.)
- Decimal: The first 50 decimal digits are 3.14159265358979323846264338327950288419716939937510...[32] (see
A000796)
- Binary: The base 2 approximation to 48 digits is 11.001001000011111101101010100010001000010110100011... (see
A004601)
- Hexadecimal: The base 16 approximation to 20 digits is 3.243F6A8885A308D31319...[33] (see
A062964)
- Sexagesimal: A base 60 approximation to five sexagesimal digits is 3;8,29,44,0,47[34] (see
A060707)
Complex numbers and Euler's identity


where
the constant e is the base of the
natural logarithm. This formula establishes a correspondence between imaginary powers of
e and points on the
unit circle centered at the origin of the complex plane. Setting
φ =
π in Euler's formula results in
Euler's identity, celebrated by mathematicians because it contains the five most important mathematical constants:
[36][37]


Spectral characterizations
Many
of the appearances of
π in the formulas of mathematics and the sciences have to do with its close relationship with geometry. However,
π also appears in many natural situations having apparently nothing to do with geometry.
In many applications it plays a distinguished role as an
eigenvalue. For example, an idealized
vibrating string can be modelled as the graph of a function
f on the unit interval
[0,1], with
fixed ends f(0) = f(1) = 0. The modes of vibration of the string are solutions of the
differential equation f "(x) + λ2 f(x) = 0. Here
λ is an associated eigenvalue, which is constrained by
Sturm–Liouville theory to take on only certain specific values. The value
λ = π is one such eigenvalue, as the function
f(x) = sin(π x)satisfies the boundary conditions and the differential equation with
λ = π.
[39]
The value
π is in fact the
least such eigenvalue, and is associated with the
fundamental mode of vibration of the string. One way to obtain this is by estimating the
energy. The energy satisfies an inequality,
Wirtinger's inequality for functions,
[40] which states that if a function
f : [0, 1] → ℂ is given such that
f(0) = f(1) = 0 and
f and
f ' are both
square integrable, then the inequality holds:

and the case of equality holds precisely when
f is a multiple of
sin(π x). So
π appears as an optimal constant in Wirtinger's inequality, and from this it follows that it is the smallest such eigenvalue (by
Rayleigh quotient methods).
The number
π serves a similar role in higher-dimensional analysis, appearing as eigenvalues for other similar kinds of problems. As mentioned
above, it can be characterized via its role as the best constant in the
isoperimetric inequality: the area
A enclosed by a plane
Jordan curve of perimeter
P satisfies the inequality

and equality is clearly achieved for the circle, since in that case
A = πr2 and
P = 2πr.
[41]
An animation of a
geodesic in the Heisenberg group, showing the close connection between the Heisenberg group, isoperimetry, and the constant
π. The cumulative height of the geodesic is equal to the area of the shaded portion of the unit circle, while the arc length (in the
Carnot–Carathéodory metric) is equal to the circumference.
Ultimately as a consequence of the isoperimetric inequality, the constant
π is associated with best constants of the
Poincaré inequality.
[42] As a special case,
π appears as the optimal smallest
eigenvalue of the
Dirichlet energy, in dimensions 1 and 2, which thus characterizes the role of
π in many physical phenomena as well, for example those of classical
potential theory.
[43][44][45] The one-dimensional case is just Wirtinger's inequality.
The constant
π also appears as a critical spectral parameter in the
Fourier transform. This is the
integral transform, that takes a complex-valued integrable function
f on the real line to the function defined as:

There are several different conventions for the Fourier transform, all of which involve a factor of
π that is placed
somewhere. The appearance of
π is essential in these formulas, as there is there is no possibility to remove
π altogether from the Fourier transform and its inverse transform. The definition given above is the most canonical however, because it describes the unique unitary operator on
L2 that is also an algebra homomorphism of
L1 to
L∞.
[46]
The
Heisenberg uncertainty principle also contains the number
π. The uncertainty principle gives a sharp lower bound on the extent to which it is possible to localize a function both in space and in frequency: with our conventions for the Fourier transform,

Gaussian integrals
A graph of the
Gaussian functionƒ(x) = e−x2. The colored region between the function and the
x-axis has area
√π.


which says that the area under the basic
Bell curve in the figure is equal to the square root of
π.
The
central limit theorem explains the central role of normal distributions, and thus of
π, in probability and statistics. This theorem is ultimately connected with the
spectral characterization of
π as the eigenvalue associated with the Heisenberg uncertainty principle, and the fact that equality holds in the uncertainty principle only for the Gaussian function.
[50] Equivalently,
πis the unique constant making the Gaussian normal distribution
e-πx2 equal to its own Fourier transform.
[51] Indeed, according to
Howe (1980), the "whole business" of establishing the fundamental theorems of Fourier analysis reduces to the Gaussian integral.
History
Antiquity
The best known approximations to
π dating
before the Common Era were accurate to two decimal places; this was improved upon in
Chinese mathematics in particular by the mid first millennium, to an accuracy of seven decimal places. After this, no further progress was made until the late medieval period.
The earliest written approximations of
π are found in
Egypt and
Babylon, both within one percent of the true value. In Babylon, a
clay tablet dated 1900–1600 BC has a geometrical statement that, by implication, treats
π as
25/8 = 3.125.
[58] In Egypt, the
Rhind Papyrus, dated around 1650 BC but copied from a document dated to 1850 BC, has a formula for the area of a circle that treats
π as (
16/9)
2 ≈ 3.1605.
[58]
Astronomical calculations in the
Shatapatha Brahmana (ca. 4th century BC) use a fractional approximation of
339/108 ≈ 3.139 (an accuracy of 9×10
−4).
[59] Other Indian sources by about 150 BC treat
π as
√10 ≈ 3.1622.
[60]
Polygon approximation era
π can be estimated by computing the perimeters of circumscribed and inscribed polygons.
The first recorded algorithm for rigorously calculating the value of
π was a geometrical approach using polygons, devised around 250 BC by the Greek mathematician
Archimedes.
[61] This polygonal algorithm dominated for over 1,000 years, and as a result
π is sometimes referred to as "Archimedes' constant".
[62]Archimedes computed upper and lower bounds of
π by drawing a regular hexagon inside and outside a circle, and successively doubling the number of sides until he reached a 96-sided regular polygon. By calculating the perimeters of these polygons, he proved that
223/71 < π < 22/7 (that is
3.1408 < π < 3.1429).
[63]Archimedes' upper bound of
22/7 may have led to a widespread popular belief that
π is equal to
22/7.
[64]Around 150 AD, Greek-Roman scientist
Ptolemy, in his
Almagest, gave a value for
π of 3.1416, which he may have obtained from Archimedes or from
Apollonius of Perga.
[65] Mathematicians using polygonal algorithms reached 39 digits of
π in 1630, a record only broken in 1699 when infinite series were used to reach 71 digits.
[66]
Archimedes developed the polygonal approach to approximating
π.
In
ancient China, values for
π included 3.1547 (around 1 AD),
√10 (100 AD, approximately 3.1623), and
142/45 (3rd century, approximately 3.1556).
[67] Around 265 AD, the
Wei Kingdom mathematician
Liu Hui created a
polygon-based iterative algorithm and used it with a 3,072-sided polygon to obtain a value of
π of 3.1416.
[68][69] Liu later invented a faster method of calculating
π and obtained a value of 3.14 with a 96-sided polygon, by taking advantage of the fact that the differences in area of successive polygons form a geometric series with a factor of 4.
[68] The Chinese mathematician
Zu Chongzhi, around 480 AD, calculated that
π ≈ 355/113 (a fraction that goes by the name
Milü in Chinese), using
Liu Hui's algorithm applied to a 12,288-sided polygon. With a correct value for its seven first decimal digits, this value of 3.141592920... remained the most accurate approximation of
π available for the next 800 years.
[70]
The Indian astronomer
Aryabhata used a value of 3.1416 in his
Āryabhaṭīya (499 AD).
[71] Fibonacci in c. 1220 computed 3.1418 using a polygonal method, independent of Archimedes.
[72] Italian author
Dante apparently employed the value
3+√2/10 ≈ 3.14142.
[72]
The Persian astronomer
Jamshīd al-Kāshī produced 9 sexagesimal digits, roughly the equivalent of 16 decimal digits, in 1424 using a polygon with 3×2
28 sides,
[73][74] which stood as the world record for about 180 years.
[75] French mathematician
François Viète in 1579 achieved 9 digits with a polygon of 3×2
17 sides.
[75] Flemish mathematician
Adriaan van Roomen arrived at 15 decimal places in 1593.
[75]In 1596, Dutch mathematician
Ludolph van Ceulen reached 20 digits, a record he later increased to 35 digits (as a result,
π was called the "Ludolphian number" in Germany until the early 20th century).
[76] Dutch scientist
Willebrord Snellius reached 34 digits in 1621,
[77] and Austrian astronomer
Christoph Grienberger arrived at 38 digits in 1630 using 10
40 sides,
[78] which remains the most accurate approximation manually achieved using polygonal algorithms.
[77]
Infinite series
Comparison of the convergence of several historical infinite series for
π.
Sn is the approximation after taking
n terms. Each subsequent subplot magnifies the shaded area horizontally by 10 times.
(click for detail)
The calculation of
π was revolutionized by the development of
infinite series techniques in the 16th and 17th centuries. An infinite series is the sum of the terms of an infinite
sequence.
[79] Infinite series allowed mathematicians to compute
π with much greater precision than
Archimedes and others who used geometrical techniques.
[79] Although infinite series were exploited for
π most notably by European mathematicians such as
James Gregory and
Gottfried Wilhelm Leibniz, the approach was first discovered in
India sometime between 1400 and 1500 AD.
[80] The first written description of an infinite series that could be used to compute
π was laid out in Sanskrit verse by Indian astronomer
Nilakantha Somayaji in his
Tantrasamgraha, around 1500 AD.
[81] The series are presented without proof, but proofs are presented in a later Indian work,
Yuktibhāṣā, from around 1530 AD. Nilakantha attributes the series to an earlier Indian mathematician,
Madhava of Sangamagrama, who lived c. 1350 – c. 1425.
[81] Several infinite series are described, including series for sine, tangent, and cosine, which are now referred to as the
Madhava series or
Gregory–Leibniz series.
[81] Madhava used infinite series to estimate
π to 11 digits around 1400, but that value was improved on around 1430 by the Persian mathematician
Jamshīd al-Kāshī, using a polygonal algorithm.
[82]
Isaac Newton used
infinite series to compute
π to 15 digits, later writing "I am ashamed to tell you to how many figures I carried these computations".
[83]


The discovery of
calculus, by English scientist
Isaac Newton and German mathematician
Gottfried Wilhelm Leibniz in the 1660s, led to the development of many infinite series for approximating
π. Newton himself used an arcsin series to compute a 15 digit approximation of
π in 1665 or 1666, later writing "I am ashamed to tell you to how many figures I carried these computations, having no other business at the time."
[83]
In Europe, Madhava's formula was rediscovered by Scottish mathematician
James Gregory in 1671, and by Leibniz in 1674:
[86][87]

This formula, the Gregory–Leibniz series, equals
π/4 when evaluated with
z = 1.
[87] In 1699, English mathematician
Abraham Sharp used the Gregory–Leibniz series for

to compute
π to 71 digits, breaking the previous record of 39 digits, which was set with a polygonal algorithm.
[88] The Gregory–Leibniz for

series is simple, but
converges very slowly (that is, approaches the answer gradually), so it is not used in modern
π calculations.
[89]
In 1706
John Machin used the Gregory–Leibniz series to produce an algorithm that converged much faster:
[90]

Machin reached 100 digits of
π with this formula.
[91] Other mathematicians created variants, now known as
Machin-like formulae, that were used to set several successive records for calculating digits of
π.
[91] Machin-like formulae remained the best-known method for calculating
π well into the age of computers, and were used to set records for 250 years, culminating in a 620-digit approximation in 1946 by Daniel Ferguson – the best approximation achieved without the aid of a calculating device.
[92]
A record was set by the calculating prodigy
Zacharias Dase, who in 1844 employed a Machin-like formula to calculate 200 decimals of
π in his head at the behest of German mathematician
Carl Friedrich Gauss.
[93] British mathematician
William Shanks famously took 15 years to calculate
π to 707 digits, but made a mistake in the 528th digit, rendering all subsequent digits incorrect.
[93]
Rate of convergence
Some infinite series for
π converge faster than others. Given the choice of two infinite series for
π, mathematicians will generally use the one that converges more rapidly because faster convergence reduces the amount of computation needed to calculate
π to any given accuracy.
[94] A simple infinite series for
π is the
Gregory–Leibniz series:
[95]

As individual terms of this infinite series are added to the sum, the total gradually gets closer to
π, and – with a sufficient number of terms – can get as close to
π as desired. It converges quite slowly, though – after 500,000 terms, it produces only five correct decimal digits of
π.
[96]
An infinite series for
π (published by Nilakantha in the 15th century) that converges more rapidly than the Gregory–Leibniz series is:
[97]

The following table compares the convergence rates of these two series:
| Infinite series for π | After 1st term | After 2nd term | After 3rd term | After 4th term | After 5th term | Converges to: |
 | 4.0000 | 2.6666... | 3.4666... | 2.8952... | 3.3396... | π = 3.1415... |
 | 3.0000 | 3.1666... | 3.1333... | 3.1452... | 3.1396... |
After five terms, the sum of the Gregory–Leibniz series is within 0.2 of the correct value of
π, whereas the sum of Nilakantha's series is within 0.002 of the correct value of
π. Nilakantha's series converges faster and is more useful for computing digits of
π. Series that converge even faster include
Machin's series and
Chudnovsky's series, the latter producing 14 correct decimal digits per term.
[94]
Irrationality and transcendence
Not all mathematical advances relating to
π were aimed at increasing the accuracy of approximations. When Euler solved the
Basel problem in 1735, finding the exact value of the sum of the reciprocal squares, he established a connection between
π and the
prime numbers that later contributed to the development and study of the
Riemann zeta function:
[98]

Adoption of the symbol π
Leonhard Euler popularized the use of the Greek letter
π in works he published in 1736 and 1748.
The earliest known use of the Greek letter
π to represent the ratio of a circle's circumference to its diameter was by Welsh mathematician
William Jones in his 1706 work
Synopsis Palmariorum Matheseos; or, a New Introduction to the Mathematics.
[103] The Greek letter first appears there in the phrase "1/2 Periphery (
π)" in the discussion of a circle with radius one. Jones may have chosen
πbecause it was the first letter in the Greek spelling of the word
periphery.
[104] However, he writes that his equations for
π are from the "ready pen of the truly ingenious Mr. John Machin", leading to speculation that
Machin may have employed the Greek letter before Jones.
[105] It had indeed been used earlier for geometric concepts.
[105] William Oughtred used
π and δ, the Greek letter equivalents of p and d, to express ratios of periphery and diameter in the 1647 and later editions of
Clavis Mathematicae.
[106]
After Jones introduced the Greek letter in 1706, it was not adopted by other mathematicians until
Euler started using it, beginning with his 1736 work
Mechanica. Before then, mathematicians sometimes used letters such as
c or
p instead.
[105] Because Euler corresponded heavily with other mathematicians in Europe, the use of the Greek letter spread rapidly.
[105] In 1748, Euler used
π in his widely read work
Introductio in analysin infinitorum (he wrote: "for the sake of brevity we will write this number as
π; thus
π is equal to half the circumference of a circle of radius 1") and the practice was universally adopted thereafter in the
Western world.
[105]
Modern quest for more digits
Computer era and iterative algorithms
The development of computers in the mid-20th century again revolutionized the hunt for digits of
π. American mathematicians
John Wrench and Levi Smith reached 1,120 digits in 1949 using a desk calculator.
[107] Using an
inverse tangent (arctan) infinite series, a team led by George Reitwiesner and
John von Neumann that same year achieved 2,037 digits with a calculation that took 70 hours of computer time on the
ENIAC computer.
[108] The record, always relying on an arctan series, was broken repeatedly (7,480 digits in 1957; 10,000 digits in 1958; 100,000 digits in 1961) until 1 million digits were reached in 1973.
[109]
The iterative algorithms were independently published in 1975–1976 by American physicist
Eugene Salamin and Australian scientist
Richard Brent.
[113] These avoid reliance on infinite series. An iterative algorithm repeats a specific calculation, each iteration using the outputs from prior steps as its inputs, and produces a result in each step that converges to the desired value. The approach was actually invented over 160 years earlier by
Carl Friedrich Gauss, in what is now termed the
arithmetic–geometric mean method (AGM method) or
Gauss–Legendre algorithm.
[113] As modified by Salamin and Brent, it is also referred to as the Brent–Salamin algorithm.
The iterative algorithms were widely used after 1980 because they are faster than infinite series algorithms: whereas infinite series typically increase the number of correct digits additively in successive terms, iterative algorithms generally
multiply the number of correct digits at each step. For example, the Brent-Salamin algorithm doubles the number of digits in each iteration. In 1984, the Canadian brothers
John and
Peter Borwein produced an iterative algorithm that quadruples the number of digits in each step; and in 1987, one that increases the number of digits five times in each step.
[114] Iterative methods were used by Japanese mathematician
Yasumasa Kanada to set several records for computing
π between 1995 and 2002.
[115] This rapid convergence comes at a price: the iterative algorithms require significantly more memory than infinite series.
[115]
Motivations for computing π
As mathematicians discovered new algorithms, and computers became available, the number of known decimal digits of
π increased dramatically. Note that the vertical scale is
logarithmic.
For most numerical calculations involving
π, a handful of digits provide sufficient precision. According to Jörg Arndt and Christoph Haenel, thirty-nine digits are sufficient to perform most
cosmological calculations, because that is the accuracy necessary to calculate the circumference of the
observable universe with a precision of one atom.
[116] Despite this, people have worked strenuously to compute
π to thousands and millions of digits.
[117] This effort may be partly ascribed to the human compulsion to break records, and such achievements with
π often make headlines around the world.
[118][119] They also have practical benefits, such as testing
supercomputers, testing numerical analysis algorithms (including
high-precision multiplication algorithms); and within pure mathematics itself, providing data for evaluating the randomness of the digits of
π.
[120]
Rapidly convergent series
Srinivasa Ramanujan, working in isolation in India, produced many innovative series for computing
π.
Modern
π calculators do not use iterative algorithms exclusively. New infinite series were discovered in the 1980s and 1990s that are as fast as iterative algorithms, yet are simpler and less memory intensive.
[115] The fast iterative algorithms were anticipated in 1914, when the Indian mathematician
Srinivasa Ramanujan published dozens of innovative new formulae for
π, remarkable for their elegance, mathematical depth, and rapid convergence.
[121] One of his formulae, based on
modular equations, is

This series converges much more rapidly than most arctan series, including Machin's formula.
[122] Bill Gosper was the first to use it for advances in the calculation of
π, setting a record of 17 million digits in 1985.
[123] Ramanujan's formulae anticipated the modern algorithms developed by the Borwein brothers and the
Chudnovsky brothers.
[124] The
Chudnovsky formula developed in 1987 is

It produces about 14 digits of
π per term,
[125] and has been used for several record-setting
π calculations, including the first to surpass 1 billion (10
9) digits in 1989 by the Chudnovsky brothers, 2.7 trillion (2.7×10
12) digits by
Fabrice Bellard in 2009, and 10 trillion (10
13) digits in 2011 by Alexander Yee and Shigeru Kondo.
[126][127] For similar formulas, see also the
Ramanujan–Sato series.

where
q is
eπ (Gelfond's constant),
k is an
odd number, and
a, b, c are certain rational numbers that Plouffe computed.
[129]
Monte Carlo methods
Random dots are placed on the quadrant of a square with a circle inscribed in it.
Monte Carlo methods, which evaluate the results of multiple random trials, can be used to create approximations of
π.
[130] Buffon's needle is one such technique: If a needle of length
ℓ is dropped
n times on a surface on which parallel lines are drawn
t units apart, and if
x of those times it comes to rest crossing a line (
x > 0), then one may approximate
πbased on the counts:
[131]

Another Monte Carlo method for computing
π is to draw a circle inscribed in a square, and randomly place dots in the square. The ratio of dots inside the circle to the total number of dots will approximately equal
π/4.
[132]
Five random walks with 200 steps. The sample mean of
| W200 | is
μ = 56/5, and so
2(200)μ−2 ≈ 3.19 is within
0.05 of
π
Another way to calculate
π using probability is to start with a
random walk, generated by a sequence of (fair) coin tosses: independent
random variables Xk such that
Xk ∈ {−1,1} with equal probabilities. The associated random walk is

![{\displaystyle \pi =\lim _{n\to \infty }{\frac {2n}{E[|W_{n}|]^{2}}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a691be63815c6b7d9fe15070ae98039d9c1d0384)
This Monte Carlo method is independent of any relation to circles, and is a consequence of the
central limit theorem, discussed
above.
These Monte Carlo methods for approximating
π are very slow compared to other methods, and do not provide any information on the exact number of digits that are obtained. Thus they are never used to approximate
π when speed or accuracy is desired.
[134]
Spigot algorithms
Two algorithms were discovered in 1995 that opened up new avenues of research into
π. They are called
spigot algorithms because, like water dripping from a
spigot, they produce single digits of
π that are not reused after they are calculated.
[135][136] This is in contrast to infinite series or iterative algorithms, which retain and use all intermediate digits until the final result is produced.
[135]
American mathematicians
Stan Wagon and Stanley Rabinowitz produced a simple spigot algorithm in 1995.
[136][137][138] Its speed is comparable to arctan algorithms, but not as fast as iterative algorithms.
[137]

This formula, unlike others before it, can produce any individual
hexadecimal digit of
π without calculating all the preceding digits.
[139] Individual binary digits may be extracted from individual hexadecimal digits, and
octal digits can be extracted from one or two hexadecimal digits. Variations of the algorithm have been discovered, but no digit extraction algorithm has yet been found that rapidly produces decimal digits.
[141] An important application of digit extraction algorithms is to validate new claims of record
π computations: After a new record is claimed, the decimal result is converted to hexadecimal, and then a digit extraction algorithm is used to calculate several random hexadecimal digits near the end; if they match, this provides a measure of confidence that the entire computation is correct.
[127]
Between 1998 and 2000, the
distributed computing project
PiHex used
Bellard's formula (a modification of the BBP algorithm) to compute the quadrillionth (10
15th) bit of
π, which turned out to be 0.
[142] In September 2010, a
Yahoo! employee used the company's
Hadoop application on one thousand computers over a 23-day period to compute 256
bits of
π at the two-quadrillionth (2×10
15th) bit, which also happens to be zero.
[143]
Use
Because
π is closely related to the circle, it is found in
many formulae from the fields of geometry and trigonometry, particularly those concerning circles, spheres, or ellipses. Other branches of science, such as statistics, physics, Fourier analysis, and number theory, also include
π in some of their important formulae.
Geometry and trigonometry
The area of the circle equals
π times the shaded area.
π appears in formulae for areas and volumes of geometrical shapes based on circles, such as
ellipses,
spheres,
cones, and
tori. Below are some of the more common formulae that involve
π.
[144]
- The circumference of a circle with radius r is 2πr.
- The area of a circle with radius r is πr2.
- The volume of a sphere with radius r is 4/3πr3.
- The surface area of a sphere with radius r is 4πr2.
Definite integrals that describe circumference, area, or volume of shapes generated by circles typically have values that involve
π. For example, an integral that specifies half the area of a circle of radius one is given by:
[145]

In that integral the function
√1 − x2 represents the top half of a circle (the
square root is a consequence of the
Pythagorean theorem), and the integral
∫1
−1 computes the area between that half of a circle and the
x axis.
The
trigonometric functions rely on angles, and mathematicians generally use radians as units of measurement.
π plays an important role in angles measured in
radians, which are defined so that a complete circle spans an angle of 2
π radians.
[146] The angle measure of 180° is equal to
π radians, and 1° =
π/180 radians.
[146]
Common trigonometric functions have periods that are multiples of
π; for example, sine and cosine have period 2
π,
[147] so for any angle
θ and any integer
k,
[147]
Topology

where
χ(Σ) is the
Euler characteristic, which is an integer.
[148] An example is the surface area of a sphere
S of curvature 1 (so that its
radius of curvature, which coincides with its radius, is also 1.) The Euler characteristic of a sphere can be computed from its
homology groups, and is found to be equal to two. Thus we have

reproducing the formula for the surface area of a sphere of radius 1.
Vector calculus
The techniques of vector calculus can be understood in terms of decompositions into
spherical harmonics (shown)

which represents the
potential energy of a unit mass (or charge) placed a distance
| x | from the source, and
k is a dimensional constant. The field, denoted here by
E, which may be the (Newtonian)
gravitational field or the (Coulomb)
electric field, is the negative
gradient of the potential:



It is standard to absorb this factor of
4π into the constant
k, but this argument shows why it must appear
somewhere. Furthermore,
4π is the surface area of the unit sphere, but we have not assumed that
S is the sphere. However, as a consequence of the
divergence theorem, because the region away from the origin is vacuum (source-free) it is only the
homology class of the surface
S in
R3\{0} that matters in computing the integral, so it can be replaced by any convenient surface in the same homology class, in particular a sphere, where spherical coordinates can be used to calculate the integral.


where ρ is the distribution function.
Einstein's equation states that the curvature of space-time is produced by the matter-energy content.

Cauchy's integral formula
Complex analytic functions can be visualized as a collection of streamlines and equipotentials, systems of curves intersecting at right angles. Here illustrated is the complex logarithm of the Gamma function.

Although the curve
γ is not a circle, and hence does not have any obvious connection to the constant
π, a standard proof of this result uses
Morera's theorem, which implies that the integral is invariant under
homotopy of the curve, so that it can be deformed to a circle and then integrated explicitly in polar coordinates. More generally, it is true that if a rectifiable closed curve
γ does not contain
z0, then the above integral is
2πi times the
winding number of the curve.
The general form of Cauchy's integral formula establishes the relationship between the values of a
complex analytic functionf(z) on the Jordan curve
γ and the value of
f(z) at any interior point
z0 of
γ:
[153][154]

provided
f(z) is analytic in the region enclosed by
γ and extends continuously to
γ. Cauchy's integral formula is a special case of the
residue theorem, that if
g(z) is a
meromorphic function the region enclosed by
γ and is continuous in a neighborhood of
γ, then

The gamma function and Stirling's approximation
The factorial function
n! is the product of all of the positive integers through
n. The
gamma function extends the concept of
factorial (normally defined only for non-negative integers) to all complex numbers, except the negative real integers. When the gamma function is evaluated at half-integers, the result contains
π; for example

and

.
[155]




The gamma function can be used to create a simple approximation to the factorial function
n! for large
n:

which is known as
Stirling's approximation.
[158] Equivalently,

As a geometrical application of Stirling's approximation, let
Δn denote the
standard simplex in
n-dimensional Euclidean space, and
(n+1)Δn denote the simplex having all of its sides scaled up by a factor of
n+1. Then

Number theory and Riemann zeta function
Each prime has an associated
Prüfer group, which are arithmetic localizations of the circle. The
L-functions of analytic number theory are also localized in each prime
p.
Solution of the Basel problem using the
Weil conjecture: the value of

is the
hyperbolic area of a fundamental domain of the
modular group, times

The
Riemann zeta function ζ(s) is used in many areas of mathematics. When evaluated at
s = 2 it can be written as

Finding a
simple solution for this infinite series was a famous problem in mathematics called the
Basel problem.
Leonhard Euler solved it in 1735 when he showed it was equal to
π2/6.
[98] Euler's result leads to the
number theory result that the probability of two random numbers being
relatively prime (that is, having no shared factors) is equal to
6/π2.
[160][161] This probability is based on the observation that the probability that any number is
divisible by a prime
p is
1/p (for example, every 7th integer is divisible by 7.) Hence the probability that two numbers are both divisible by this prime is
1/p2, and the probability that at least one of them is not is
1 − 1/p2. For distinct primes, these divisibility events are mutually independent; so the probability that two numbers are relatively prime is given by a product over all primes:
[162]

The solution to the Basel problem implies that the geometrically derived quantity
π is connected in a deep way to the distribution of prime numbers. This is a special case of
Weil's conjecture on Tamagawa numbers, which asserts the equality of similar such infinite products of
arithmetic quantities, localized at each prime
p, and a
geometrical quantity: the reciprocal of the volume of a certain
locally symmetric space. In the case of the Basel problem, it is the
hyperbolic 3-manifold SL2(R)/SL2(Z).
[164]
The zeta function also satisfies Riemann's functional equation, which involves π as well as the gamma function:

Furthermore, the derivative of the zeta function satisfies

Fourier series
The constant
π also appears naturally in
Fourier series of
periodic functions. Periodic functions are functions on the group
T =R/Z of fractional parts of real numbers. The Fourier decomposition shows that a complex-valued function
f on
T can be written as an infinite linear superposition of
unitary characters of
T. That is, continuous
group homomorphisms from
T to the
circle group U(1) of unit modulus complex numbers. It is a theorem that every character of
T is one of the complex exponentials

.
There is a unique character on
T, up to complex conjugation, that is a group isomorphism. Using the
Haar measure on the circle group, the constant
π is half the magnitude of the
Radon–Nikodym derivative of this character. The other characters have derivatives whose magnitudes are positive integral multiples of 2
π.
[18] As a result, the constant
π is the unique number such that the group
T, equipped with its Haar measure, is
Pontrjagin dual to the
lattice of integral multiples of 2
π.
[168] This is a version of the one-dimensional
Poisson summation formula.
Modular forms and theta functions
Theta functions transform under the
lattice of periods of an elliptic curve.

which is a kind of modular form called a
Jacobi form.
[169] This is sometimes written in terms of the
nome 
.
The constant
π is the unique constant making the Jacobi theta function an
automorphic form, which means that it transforms in a specific way. Certain identities hold for all automorphic forms. An example is

Cauchy distribution and potential theory


The
Shannon entropy of the Cauchy distribution is equal to
log(4π), which also involves
π.

The constant
π is the unique (positive) normalizing factor such that
H defines a
linear complex structure on the Hilbert space of square-integrable real-valued functions on the real line.
[171] The Hilbert transform, like the Fourier transform, can be characterized purely in terms of its transformation properties on the Hilbert space
L2(R): up to a normalization factor, it is the unique bounded linear operator that commutes with positive dilations and anticommutes with all reflections of the real line.
[172] The constant
π is the unique normalizing factor that makes this transformation unitary.
Complex dynamics
π can be computed from the
Mandelbrot set, by counting the number of iterations required before point (−0.75, ε) diverges.
An occurrence of
π in the
Mandelbrot set fractal was discovered by David Boll in 1991.
[173] He examined the behavior of the Mandelbrot set near the "neck" at (−0.75, 0). If points with coordinates (−0.75, ε) are considered, as ε tends to zero, the number of iterations until divergence for the point multiplied by ε converges to
π. The point (0.25, ε) at the cusp of the large "valley" on the right side of the Mandelbrot set behaves similarly: the number of iterations until divergence multiplied by the square root of ε tends to
π.
[173][174]
Outside mathematics
Describing physical phenomena



where m is the mass of the electron.


Under ideal conditions (uniform gentle slope on an homogeneously erodible substrate), the
sinuosity of a
meandering river approaches
π. The sinuosity is the ratio between the actual length and the straight-line distance from source to mouth. Faster currents along the outside edges of a river's bends cause more erosion than along the inside edges, thus pushing the bends even farther out, and increasing the overall loopiness of the river. However, that loopiness eventually causes the river to double back on itself in places and "short-circuit", creating an
ox-bow lake in the process. The balance between these two opposing factors leads to an average ratio of
π between the actual length and the direct distance between source and mouth.
[180][181]
Memorizing digits
Piphilology is the practice of memorizing large numbers of digits of
π,
[182] and world-records are kept by the
Guinness World Records. The record for memorizing digits of
π, certified by Guinness World Records, is 70,000 digits, recited in India by Rajveer Meena in 9 hours and 27 minutes on 21 March 2015.
[183] In 2006,
Akira Haraguchi, a retired Japanese engineer, claimed to have recited 100,000 decimal places, but the claim was not verified by Guinness World Records.
[184]
One common technique is to memorize a story or poem in which the word lengths represent the digits of
π: The first word has three letters, the second word has one, the third has four, the fourth has one, the fifth has five, and so on. An early example of a memorization aid, originally devised by English scientist
James Jeans, is "How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics."
[182] When a poem is used, it is sometimes referred to as a
piem. Poems for memorizing
π have been composed in several languages in addition to English.
[182] Record-setting
π memorizers typically do not rely on poems, but instead use methods such as remembering number patterns and the
method of loci.
[185]
A few authors have used the digits of
π to establish a new form of
constrained writing, where the word lengths are required to represent the digits of
π. The
Cadaeic Cadenza contains the first 3835 digits of
π in this manner,
[186] and the full-length book
Not a Wake contains 10,000 words, each representing one digit of
π.
[187]
In popular culture
A pi pie. The circular shape of
pie makes it a frequent subject of pi
puns.
Perhaps because of the simplicity of its definition and its ubiquitous presence in formulae,
π has been represented in popular culture more than other mathematical constructs.
[188]
In the
Palais de la Découverte (a science museum in Paris) there is a circular room known as the
pi room. On its wall are inscribed 707 digits of
π. The digits are large wooden characters attached to the dome-like ceiling. The digits were based on an 1853 calculation by English mathematician
William Shanks, which included an error beginning at the 528th digit. The error was detected in 1946 and corrected in 1949.
[190]
In
Carl Sagan's novel
Contact it is suggested that the creator of the universe buried a message deep within the digits of
π.
[191]The digits of
π have also been incorporated into the lyrics of the song "Pi" from the album
Aerial by
Kate Bush.
[192]
In the United States,
Pi Day falls on 14 March (written 3/14 in the US style), and is popular among students.
[193] π and its digital representation are often used by self-described "math
geeks" for
inside jokes among mathematically and technologically minded groups. Several college
cheers at the
Massachusetts Institute of Technology include "3.14159".
[194] Pi Day in 2015 was particularly significant because the date and time 3/14/15 9:26:53 reflected many more digits of pi.
[195]
During the 2011 auction for
Nortel's portfolio of valuable technology patents,
Google made a series of unusually specific bids based on mathematical and scientific constants, including
π.
[196]
In 1958
Albert Eagle proposed replacing
π by
τ (
tau), where
τ =
π/2, to simplify formulas.
[197] However, no other authors are known to use
τ in this way. Some people use a different value,
τ = 6.283185... = 2
π,
[198] arguing that
τ, as the number of radians in one
turn or as the ratio of a circle's circumference to its radius rather than its diameter, is more natural than
π and simplifies many formulas.
[199][200] Celebrations of this number, because it approximately equals 6.28, by making 28 June "Tau Day" and eating "twice the pie",
[201] have been reported in the media. However, this use of
τ has not made its way into mainstream mathematics.
[202]
In 1897, an amateur American mathematician attempted to persuade the
Indiana legislature to pass the
Indiana Pi Bill, which described a method to
square the circle and contained text that implied various incorrect values for
π, including 3.2. The bill is notorious as an attempt to establish a value of scientific constant by legislative fiat. The bill was passed by the Indiana House of Representatives, but rejected by the Senate.
[203]
In computer culture