How do they calculate pi?

How do they calculate the value of pi?

In the past several years mathematicians have been trying to calculate the
value of pi to the extreme. How do they calculate the value of pi though?
Pi is of course the ratio of the circumference of a circle to its
diameter.
But in school I was never taught the proof. I know that if we have a
circle
1 unit in diameter, the circumference is 3.1415926… actually, the
circumference is the same value as pi. It’s indeterminate. We don’t have
an real value to use in the formula pi = c/d. We have two unknowns. Is
there some other mathematical proof that requires more advanced math? Or
have mathematicians never actually proven that pi is the ratio of the
circumference of a circle to its diameter?
And sorry if this was discussed before but the search engine won’t allow the word “pi.”

Pi is defined as the ratio of the circumference to its diameter; you don’t have to prove a definition. Pi merely stands for that ratio.

You can’t really “prove” the value of pi, either, though there have been many attempts through the ages at determining its exact value. (There’s a book out, called “Pi,” that documents them).
It started out as trial and error and practicality: a number was needed when calculating the area of circle for legal and landowning purposes. For most of those calculations, you can find an approximation. Even now, engineering calculations rarely need more than five or six decimal places.

Eventually, someone proved pi was transcendant (i.e., can’t be expressed as a fraction). People would spend years calculating as many decimal places as they can. Right now, it’s the realm of supercomputers.

I think the OP is asking, do we have a proof that pi is constant?

No, I’m asking how do they get a computer to calculate something to the 1,000,000th decimal that we don’t know how to express in terms of an equation?

Well, there are lots of ways. Apparently, one of them is the Bailey-Borwein-Plouffe Algorithm.

A more comprehensive overview.

Think of it this way: a circle is a polygon with infinite sides and infinite angles. Since you can divide up polygons into isoceles triangles (one for each side, with the base of the triangle as the side of the polygon), you merely calculate the ratio of the sum of all the base lengths to twice the triangle side length for a given polygon. The more sides you add, the closer you get to a circle. When the first 1 million digits are the same in two consecutive values (i.e. as you increase the number of polygon sides), that’s the first 1 million digits of pi.

To correct a couple of errors in the above:
If you want to define [symbol]p[/symbol] as “the ratio of the circumference of a ( Euclidean) circle to its diameter”, you do indeed need to prove something: that this ratio is the same for all circles. In fact, in moden texts, [symbol]p[/symbol] is usually defined as twice the smallest positive root of
cos x = 0

A number which cannot be expressed as the ratio of two integers is irrational. A number is transcendental if it is not the root of a polynomial equation with integer coefficients. All transcendental numbers are irrational, but there are irrational numbers which are algebraic ( i.e., not transcendental). [symbol]p[/symbol] is transcendental.

The calculations of [symbol]p[/symbol] correct to huge numbers of decimal places are performed by evaluating certain infinite series expansions. As an example, it is known that
[symbol]p[/symbol]/4 = 1 - 1/3 + 1/5 - 1/7 + …
So, by programming a computer to sum a large number of the terms on the right-hand side, we gobtain an approximation to [symbol]p[/symbol]. This particular series converges very slowly, and so would not be used. The keys to an accurate approximation are a quickly converging series and a powerful computer.

We do know how to express pi in an equation. There are infinite series whose sum we know to be equal to pi. In fact, there are formulas that allow to calculate bits in the expansion of pi without having to first calculate earlier bits.

I wrote:

> In fact, there are formulas that allow to calculate bits . . .

I meant:

> In fact, there are formulas that allow us to calculate bits . . .

IIRC my calculus, the infinite series 6/(n^2) will give you the value of pi^2. Alternatively, you could use the trigonometric identity [4arctan(1/5) - arctan(1/239)] to give you the exact value (since any trig. function can be described as an infinite series).

There are proofs for both of these, but they’re far beyond my grasp of math.

There are two separate questions here. Why is pi constant and how can it be calculated to a billion places or more? As for the first, it is a theorem of flat space and no other. In fact, similar triangles that are not actually congruent are possible only in flat space and this, together with calculus says that all circles are similar. Essentially it is an axiom. As for the second, well one redily shows that tan 45 = 1 (essentially by definition). Since 45 is 1/8 of a circle, which is 2 pi radians, it follows that when you define tan in radians, tan pi/4 = 1 or Arc tan 1 = pi/4. The standard power series for Arc tan gives pi/4 = 1 - 1/3 + 1/5 - 1/7 + … mentioned above. But this is a very slowly converging series. However, using some trig identities, one can show that Arc tan 1 = 4 Arc tan 1/5 - Arc tan 1/239, which gives much more quickly converging, enough to enable one to calculate by hand a few hundred places (and this was actually done, although an error was made after about 500 places and all the rest of the computation produced nonesense). All this is based on infinite series for Arc tan, which depend on calculus. More recently, much better methods have been found, which can be found by looking at Jon Borwein’s web site or at the book by Jon and Peter Borwein called Pi and the AGM (arithmetic-geometric mean). One interesting thing is that it possible now to find the trillionth binary bit without finding all the intermediate ones. So far, it has not been possible to do the same for the decimal digits.

Once you have [symbol]p[/symbol] defined as Jabba did, you can use calculus to prove that it’s the number in all the geometric formulas.

I remember being bored in geometry one day and I came up with my own fraction that equaled pi to 10 digits…3960000000/1260507149. That was 12 years ago and I still remember that for some odd reason.

I’ve read several times on the board about the formula that allows the nth digit of pi to be calculated without bothering to calculate the intervening ones, and I am curious about it. Is the formula in question the Bailey-Borwein-Plouffe algorithm linked to above? Is it only possible to do in base 16? If so, can’t you convert the answer back to base 10? Is the work required to determine say the trillionth digit much more than that needed for the sixth? Does anybody who is good at coding want to reproduce some of the cooler formulas for pi here?

As for the Bailey-Borwein-Plouffe algorithm, the difficulty of using larger values of n is simply due to the fact that they’re larger, and require more bits. So it’s a little more difficult, but not much.

You can convert the nth digit to base 10 only if you know all the previous digits.

bryanmcc writes:

> I’ve read several times on the board about the formula that
> allows the nth digit of pi to be calculated without bothering to
> calculate the intervening ones, and I am curious about it.

No, this is an important distinction. There is a formula that allows one to calculate any bit in the expansion of pi. In other words, if pi is written in binary format (i.e., base-2), there is a formula that allows one to calculate any given bit. Click on the link in Achernar’s post. There’s no way to calculate a random digit (i.e., written in base-10) of pi though unless you calculate all the previous digits.

[hijack]
psst, Alex - your prisoner number was 655321…
[/hijack]

I don’t viddy what you skazat Dooku. Are you like telling your humble host that he is all gloopy like? That is the number they drum-drum-drummed into me gulliver all over the plen.

Shut your filthy hole, you scum!!* You are Six Double-Five Three Two One!! :smiley:

*A movie quote, I’m sure Prisoner6655321 understands it was not meant as a direct insult…

Where did you hear that it is SINGLE six double five three two one?

I have the book right here. If he said what you said, then it is a movie mistake. Please go to http://www.moviemistakes.com/ and report it.