"There is no scorn more profound, or on the whole more justifiable, than that of the men who make for the men who explain. Exposition, criticism, appreciation, is work for second-rate minds." G.H. Hardy, A Mathematician's Apology (1941)

How to calculate π

How would you calculate ? I remember being sent as a boy of ten into the schoolyard to find circular objects to measure. Our attempts to wrap a tape around a dustbin lid clearly did not represent the optimal method.

Perhaps you know a few digits of . Starting from scratch, how would you find more? We know is irrational, so it cannot be expressed as the ratio of two numbers. Worse, is transcendental, so it is not the solution of any polynomial equation with integer coefficients.

There is a passage of the Bible (1 Kings 7:23) which refers to “a molten sea” which is “ten cubits from the one brim to the other” and “a line of thirty cubits did compass it about”. This figure of did not represent the state of the art, with more accurate values being recorded much earlier in Egypt and Mesopotamia.

A famous approximation is attributed to Archimedes (287-212 BC), who worked using only geometric methods. Archimedes took a circle and inscribed within it a polygon. The perimeter of the polygon, which is contained within the circle, is smaller than the circumference of the circle itself. Then he superscribed a polygon outside the circle. The perimeter of this second, larger polygon is larger than the circumference of the circle itself. If you think about increasing the number of sides on a polygon you will notice that the more sides a polygon has, the closer it gets to the shape of a circle. By increasing the number of sides on his two polygons and considering their perimeters, Archimedes could define two series, one increasing and one decreasing, both of which have in their limit.

Archimedes took this as far as polygons of 96 sides and came up with an upper limit for of and a lower limit of . Because these coincide in the first three digits, we can conclude that begins

Others, following the method of Archimedes or developing it independently, extended to polygons with greater numbers of sides. This method culminated with Ludolph Van Ceulen who, around 1600, produced an approximation for to 35 decimal places. Those 35 digits were inscribed on Van Ceulen’s tombstone.

More modern approximations involve calculating the terms of an infinite series involving , which can be rearranged to find an approximation for . For example, the following was discovered by James Gregory:

Using such a formula, one can generate to as many decimal places as necessary by taking more terms. However, this series converges very slowly. For example, 10,000 terms are needed to get just four decimal places. John Machin found a series that converges much more quickly to :

which uses a more general James Gregory result:

Machin used this formula to calculate one hundred digits of in 1706, the year William Jones introduced the modern use of the Greek letter π.

Computers enter the story in 1947 when D. F. Ferguson of the Royal Naval College in England calculated to 710 digits with a desk calculator. In 1950 George W. Reitwiesner published more than 2000 digits of in the journal Mathematics of Computation. These digits were calculated on the ENIAC computer at the suggestion of John von Neumann, who was interested to obtain a statistical measure of the randomness of the distribution of the digits (whether digits occur equally often in remains an open question). Reitwiesner and his team used the same formula as Machin and ran ENIAC for around 70 hours, including the time taken to handle the punch cards.

More recently, series are used which operate on similar principles but converge even more quickly. The latest computer record used the 1989 Chudnovsky algorithm, which is based on the series:

In 2011 Shigeru Kondo set this record on a custom-built home computer using y-cruncher, a program written by Alexander Yee, to calculate to ten trillion digits.

6 Comments

“More modern approximations involve calculating the terms of an infinite series involving , which can be rearranged to find an approximation for . For example, the following was discovered by James Gregory…”