# A Slice of π

# BLOG: Heidelberg Laureate Forum

Last month, mathematicians marked π day, named after the mathematical constant pi, whose value (to two decimal places) is 3.14. Pi Day is observed on March 14th (in the American calendar, 3/14) and gives mathematicians everywhere an excuse to celebrate the circle constant and share their favourite things about it.

One way to celebrate π is to try to calculate it, and with modern computers this can be done to a staggering level of precision. On π day this year, it was announced that a team of computer engineers had calculated 105 trillion digits – beating the previous record of 100 trillion digits, and taking a computer around 75 days to crunch through the calculations.

Calculations of π have been attempted throughout the ages – Wikipedia’s thorough and informative Chronology of Computation of Pi starts way back in 2000 BCE (estimated) with the Ancient Egyptian approximation of \(4 \times \big(\frac{8}{9}\big)^2\), through biblical references to π being equal to 3, all the way through to modern computational records.

These approximations suddenly get significantly more accurate when mechanical and electronic calculation devices join the fight, making it much easier to get accurate values. But the really hard-core mathematicians would much prefer to calculate π the old-fashioned way: by hand. If we check the records for the largest calculation performed prior to the invention of the desk calculator, that prize goes to a mathematician called William Shanks.

Shanks achieved a calculation of 527 digits, which he completed in 1853 – by hand, on his own, and over the course of a few decades. In order to approximate π by hand, Shanks used a formula introduced by John Machin in 1706, which states that:

\[ \frac{\pi}{4} = 4 \tan^{-1}\left(\frac{1}{5}\right)-\tan^{-1}\left(\frac{1}{239}\right) \]

The inverse tan function, sometimes also called arctan, might seem too difficult to compute by hand. But thanks to a formula first discovered in the 14th century by Indian mathematician Mādhava of Sangamagrāma, we can do this:

\[ \arctan(x) = x\ – \frac{x^3}{3} + \frac{x^5}{5}\ – \frac{x^7}{7} + \cdots \]

This means that each of the two arctans in Machin’s formula can be replaced with an infinite series of terms involving increasing powers of \(x\). Since in the formula we are using \(x\) is a fraction with 1 on the top, raising it to higher powers will just make it smaller and smaller.

So as we move along this sequence of fractions, the values will get smaller – at some point, they will be so small that they do not affect the earlier digits of π at all – so if we want to calculate, say, the first ten digits of π, we just need enough terms of this sequence to get us past the point where we are adding terms which affect those digits.

In practice, since each term has a power of the same value, this process largely involves dividing by the same value each time – the step from \(\big(\frac{1}{5}\big)^3\) to \(\big(\frac{1}{5}\big)^5\) is just division by 25, as is the step from \(\big(\frac{1}{5}\big)^5\) to \(\big(\frac{1}{5}\big)^7\). Calculating using this formula involves a lot of long division!

Machin himself used his formula, along with this arctan expansion, to compute π to 100 decimal places, but it was taken further by Shanks, who kept going to 527 digits. (He also later continued his calculations to 707 digits, but unfortunately he made a small error right at the start, meaning all of these new digits were incorrect).

More recently, Stand-up Mathematician Matt Parker has been attempting to calculate π by hand for his YouTube channel, where he posts a video every two years involving an increasingly elaborate method of calculation. Starting 11 years ago with an attempt to calculate π using pies, he has since calculated it using an out-of-control car, a pendulum, and even by counting molecules.

Two years ago, Matt attempted a hand calculation, using the same formula as William Shanks, in the town where Shanks himself performed his own calculation. This year, Matt wanted to take things one step further and attempt to beat Shanks’ record. This time, rather than using the two-term arctan formula of Machin, he employed a different one from the same mathematical family.

The term ‘Machin-like formula’ is used to describe formulae for π which have a similar form – a sum of arctan terms, with coefficients in front, which add to \(\frac{\pi}{4}\). There are hundreds of possible formulae for π in this form, including this one, attributed to Carl Størmer in 1895:

\[ \frac{\pi}{4} = 4\arctan\left(\frac1{5}\right)-\arctan\left(\frac1{70}\right) + \arctan\left(\frac1{100}\right) \]

\[ + \arctan\left(\frac1{5000}\right)-\arctan\left(\frac1{10101}\right) \]

As well as:

\[\frac{\pi}{4} = 322\arctan\left(\frac1{577}\right) +76\arctan\left(\frac1{682}\right) + 139\arctan\left(\frac1{1393}\right) \]

\[+\ 156\arctan\left(\frac1{12943}\right) + 132\arctan\left(\frac1{32807}\right) + 44\arctan\left(\frac1{1049433}\right)\]

And, if you do not mind your fractions having a non-integer on the bottom:

\[\frac{\pi}{4} = 83\arctan\left(\frac1{107}\right) +17\arctan\left(\frac1{1710}\right) +22\arctan\left(\frac1{103697}\right)\]

\[-\ 12\arctan\left(\frac1{1256744.5}\right) -22\arctan\left(\frac1{9140003941.5}\right) \]

Each of these can still be calculated using the arctan expansion, and depending on the number of arctan terms and the size of the denominators, different numbers of individual calculations will be needed. The larger the denominator, the more quickly the sequence will produce π – but the more individual calculation steps will be needed per division (long division by the square of a 10-digit number is quite a headache!)

For his own calculation, Matt chose one with seven arctan terms, which he hoped would allow him to delegate parts of the work, or “parallelise” the computation more efficiently – allowing more of the 400+ volunteers he had collected to join in and help. He picked a formula that would converge to the value of π as quickly as possible, while keeping the calculations as simple as possible. After multiplying through by 4, the formula used was:

\[\pi = 1587\arctan\left(\frac1{2852}\right) + 295\arctan\left(\frac1{4193}\right) + 593\arctan\left(\frac1{4246}\right) \]

\[+\ 359\arctan\left(\frac1{39307}\right) + 481\arctan\left(\frac1{55603}\right) \]

\[+\ 625\arctan\left(\frac1{211050}\right)\ – 708\arctan\left(\frac1{390112}\right) \]

If you would like to see the results of the attempt, Matt’s video about the 2024 calculation tells the whole story (and you may see me pop up a few times, as I was involved in the organisation).

An easy unusual way to determine Pi…

Although the one or other “peculiarity” has been known for centuries, no deeper understanding has yet been developed in terms of models. Buffon’s needle problem, which experimentally determines the circle number π*, is very remarkable. This is particularly interesting in view of the fact that the question of probability and the conception of the experiment, in which “line objects” (needles) “touch” parallel distances, do not represent an obvious connection to the circle and the experiment as such provides the result without a well-founded mathematical calculation, insofar as one simply expresses the ratio of line-touching needles (l) to the total number (n) of needles (n) “thrown” in the experiment: l/n ≈ 2/ π.

*Specifically, a (further) analytical ability is required here to establish a connection to π, since the experimentally determined probability of needles touching at least one parallel line gives the value 2/π. Historical details on Louis Leclerc de Buffon (1707 – 1788) by Ehrhard Behrends(German)

In my humble opinion, π is one of the ugliest numbers ever. As a number itself, It does not reveal any patterns.

Just compare simply the continued fraction representations of Euler’s number e, which is closely related to π, with that of π.

Similarly, the formula

π/4 = 4 ArcTan[1/5] – ArcTan[1/239]

does not look particularly aesthetic. It would be astonishing how you achieve the numbers 5 and 239. Are there similar approaches for the number e?

As far as Buffon’s needle experiment is concerned, it is completely unsuitable for practical calculations. This is not even due to the large number of casts required, but simply to the finite line thickness of the grid used. This drastically reduces the achievable accuracy to a very finite level.

It remains the theoretical aspect, which is not so surprising, as the needle can assume a “circular” position in relation to the grid lines, which has something to do with the number. remains

“

In my humble opinion, π is one of the ugliest numbers ever.”Emotion and lack of knowledge are not mathematically relevant aspects.“

As a number itself, It does not reveal any patterns.”By all means, since pi decisively describes the only isotropic geometric state (circle, sphere)*, pi is “the one and only”, so to speak “round” number in the context of the formal description of matter/nature associated with it. In relation to the spatial distance from the center in 2 dimensions and in relation to 3 dimensions, pi is inherently uniquely linked to this isotropy.* To understand isotropy: For example, in a square or cuboid, the distances from the center to the object outlines are not all equal. The shortest distance corresponds to half the size of the object, the longest distance corresponds to the square root of 2.

You don’t know, to whom you compare.

What are you writing about geometry regarding π is more or less trivial.

I would like pie, not π.

There are people who enjoy reciting π to 100 decimal places. That would be a nice number for the circus (sic! circular reference!), but is scientifically rather insignificant.

Apart from the fact that π is a transcendental number, it is also comparatively difficult to prove this, compared to the Euler number e.

In series expansions of π, the odd numbers series appear very often.

π/4 = 1-1/3+1/5-1/7+1/9 … and many others.

And as the term “odd” suggests, this is quite weird yet.

π