To me, the strangest crackpots I’ve encountered through this blog are the π denialists.

When people have trouble with Cantor and differently sized infinities, I get it. It defies our intuitions. It doesn’t seem to make sense.

When you look at Gödel incompleteness theorem – it’s really hard to wrap your head around. It doesn’t seem to make sense. I get it.

When you talk about things like indescribable numbers, it’s crazy. How could it possibly be true? I get it.

But π?

It’s a pretty simple number: the ratio of the diameter of the circle and the circle’s circumference. There’s nothing all that difficult about what it means. And there are so many different ways of calculating it! We can use the nature of a circle, and derive series that compute it. We can write simple programs, do tactile demos, measure actual physical phenomena. And yet, there are people who fervently believe that it’s all a sham: that the value of π *isn’t* what we say it is. It’s exactly 4. Or it’s exactly 22/7. Or it’s exactly . Or it’s not a number, it’s an *acceleration*.

It’s amazing. I constantly get mail – mostly from fans of either Jain (the author of the φ-based π mentioned above), or from followers of Miles Mathis (he of “π isn’t a ratio, it’s an acceleration” fame), insisting that I’m part of the great mathematical conspiracy to deny the true factual value of π.

And yet… It’s so simple to demonstrate how wrong that is.

My favorite version is a simple program.

Here’s the idea, followed by the code.

- Take the unit square – the region of the graph from (0, 0) to (1, 1), and inside of it, an arc of the circle of radius 1 around (0,0).
- Pick a random point, (x, y), anywhere inside of that square.
- If the distance from the origin () is less than one, then the point is inside the circle. If it isn’t, then it’s outside of the circle.
- The probability, , of any given random point being inside that circle is equal to the ratio of the area of the circle to the area of the square. The area of that region of the circle is: , and the area of the the square is . So the probability is , or .
- So take a ton of random points, and count how many are inside the circle.
- The ratio of points inside the circle to total random points is . The more random points you do this with, the closer you get to π.

We can turn that into a simple Python program:

from random import random def computePi(points): inside = 0 for i in range(points): x = random() y = random() if (x*x + y*y) < 1.0: inside = inside + 1 return (inside*1.0)/points * 4.0 for i in range(30): pi = computePi(2**i) print(f"Pi at 2**{i} iterations = {pi}")

The exact value that you’ll get when you run this depends on the random number generator, and the initial seed value. If you don’t specify a seed, most random number libraries will use something like last 32 digits of the current system time in nanoseconds, so you’ll get slightly different results each time you run it. I just ran it, and got:

Pi at 2**0 iterations = 4.0 Pi at 2**1 iterations = 4.0 Pi at 2**2 iterations = 3.0 Pi at 2**3 iterations = 2.0 Pi at 2**4 iterations = 3.5 Pi at 2**5 iterations = 2.75 Pi at 2**6 iterations = 3.0625 Pi at 2**7 iterations = 3.125 Pi at 2**8 iterations = 3.109375 Pi at 2**9 iterations = 3.1875 Pi at 2**10 iterations = 3.171875 Pi at 2**11 iterations = 3.126953125 Pi at 2**12 iterations = 3.12109375 Pi at 2**13 iterations = 3.14013671875 Pi at 2**14 iterations = 3.169677734375 Pi at 2**15 iterations = 3.1324462890625 Pi at 2**16 iterations = 3.14453125 Pi at 2**17 iterations = 3.147247314453125 Pi at 2**18 iterations = 3.138519287109375 Pi at 2**19 iterations = 3.1364669799804688 Pi at 2**20 iterations = 3.1443214416503906 Pi at 2**21 iterations = 3.141223907470703 Pi at 2**22 iterations = 3.141301155090332 Pi at 2**23 iterations = 3.1419320106506348 Pi at 2**24 iterations = 3.1415367126464844 Pi at 2**25 iterations = 3.1421539783477783 Pi at 2**26 iterations = 3.1420511603355408 Pi at 2**27 iterations = 3.1415300369262695 Pi at 2**28 iterations = 3.141532242298126 Pi at 2**29 iterations = 3.1415965482592583

I suspect that I could do a lot better using a special number library to reduce or eliminate the floating point roundoff errors, but I don’t really think it’s worth the time. Just this much, using a really simple, obvious, intuitive method produces a better result than *any* of the numbers pushed by the crackpots.

To support that previous statement: the best crackpot value for π is the one based on the golden ratio. That version insists that the true value of π is 3.14460551103. But you can see – by using the simple metric of counting points inside and outside the circle – that the actual value is quite different from that.

That’s what makes this breed of denialism so stupid. π isn’t complicated: it’s a simple ratio. And it’s easy to test using simple concepts. Pi relates the diameter (or radius) of a circle to the circumference or area of that circle. So any test that works with circles can easily show you what π is. There’s nothing mysterious or counterintuitive or debatable about it. It is what it is, and you can test it yourself.

CurlyI see what you did there with your simple ‘Pi-thon’ program

Mike Stortz“It’s a simple ratio”… well, that’s a bit disingenuous. A simple ratio of what two numbers, exactly? Isn’t any irrational number (which, by definition, can’t be accurately expressed in a rational notation) not really a number, but a range, where the range can be arbitrarily small, but still > 0? Pi is > 3.14 and 3.141 and < 3.142, etc?

markccPost authorNo. Pi is an exact number. It’s not a rational number, but that doesn’t make it any less real. Don’t

confuse the finite representability of a number in common notation (or its finite representability at all)

with its reality. Real numbers are real.

Pi, in particular, is real. In numeric terms, it’s an irrational number; but in geometric terms, it’s one of the simplest ratios: it’s the ratio of the circumference of a circle to its diameter. It’s a fundamental quantity, which appears all over the place, in some of the most fundamental equations of mathematics, in some of the most fundamental theories of reality. It’s as real as real gets.

Daniel MartinThe random method is nice, but I like this approach for its direct simplicity and because if you have an all-integer sqrt routine (that does \x -> floor(sqrt(x))) then you can implement this very simple pi-finder in all integer math:

(In case the blog software kills the whitespace above, only the two lines after the “for” line are supposed to be indented more than anything else) Accuracy is within 4/stepsize.

markccPost authorThanks for posting this, Daniel. I did a quick edit to throw a preformat around the code, so that it indents properly.

AnonymousI’ve never met a pi denier, nor indeed, even heard of one before.

But really, if you are trying to demonstrate the conceptual simplicity of pi, using probabilities where even an astronomical number of iterations yields only 5 decimal places of accuracy hardly clarifies. Archimedes classic calculation is perhaps the most intuitively accessible.

If you can assume higher math, one of my favorite approaches is to observe the circumference is the rate of change of the area with respect to radius (the first derivative).

Pi is then half the rate of change of circumference with respect to radius (a constant), since diameter is twice the radius. Perhaps this is where the notion of “acceleration” arises.

Interestingly, the same differential relations apply to spherical volume and area. The second derivative gives 8pi which implies four great circles, but does not seem to have any obvious geometric meaning.

I looked at the Miles Mathis link that you label “an acceleration”. I read the “short version” which seems to say nothing about acceleration. I skimmed the long version and determined it would be a waste of time to read it. Based on the short version, I would say there is something broken in Mr. Mathis’ sense of logic. It is very sad.

markccPost authorMaybe it’s just me – but the number of iterations doesn’t matter that much to me; the concept of what’s going on does. It’s really hard to conceptually get any easier than “count points inside and outside the circle”.

There’s lots of other methods – such as the calculus based method that you suggest – but calculus is far from intuitive to an average person.

Likewise, Archimedes method has a lot of intuitive flair as a method, but the actual computations involved in finding the perimeter of polygons inscribed inside of a circle can be very tricky, and most people lose their intuition in that process.

The point-counting method requires you to repeat the process many many times, but there’s nothing about the calculation that’s at all subtle or difficult.

MarkI may be biased because I’m a physicist, but this is my favorite way to calculate pi: counting elastic collisions.

PLAYING POOL WITH π (THE NUMBER π FROM A BILLIARD POINT OF VIEW)

https://www.maths.tcd.ie/~lebed/Galperin.%20Playing%20pool%20with%20pi.pdf

3Blue1Brown video: https://www.youtube.com/watch?v=HEfHFsfGXjs

3Blue1Brown explanation video: https://www.youtube.com/watch?v=jsYwFizhncE

MarkMy favorite way to calculate pi: counting elastic collisions. You start with a wall to the left, a small block to the right, and a larger block to the right of the small block. Push the big block towards the small block. The blocks will collide, sending the small block towards the wall. The small block will bounce back and forth between the wall and the big block some number of times.

The punchline: If the mass of the big block is 100^n times the mass o the small block, the number of collisions gives the first n+1 digits of pi.

Paper: https://www.maths.tcd.ie/~lebed/Galperin.%20Playing%20pool%20with%20pi.pdf

3Blue1Brown videos:

https://www.youtube.com/watch?v=HEfHFsfGXjs