## 15 October 2013

### Demystifying pi

One of my pet peeves is that we routinely teach kids that things are impossible, unknowable, too complicated, et cetera.  Another is when our equations are dirtied with exceptions to rules...

One example of this was my implementation of pi.  That in turn was based on a modification of the continued fraction library to be a bit cleaner in the implementation.

It bugged me that my implementation of pi started with an exception. My numerator at index=0 was 22.  Something was not quite right - but what was it?

So I thought, well, the number in that position should be 02... but then the continued fraction starts with 0 + 0/ ...  That seemed kinda redundant and pointless.

What if we started with index=1?  All the sudden, this started to look a lot cleaner... [NOTE: I use 'cf' instead of 'K' to note the indexes are based on the above mentioned modification, not on Gauss's indexes]:

Ok... this is looking really clean...  left side is the odd numbers... right side is the squares (or more specifically, the sum of the odd numbers up to and including the one on the left)... no exceptions to the rule, etc. very clean... but it is no longer pi.

π = 4/y....  or more specifically, in this particular case, y = diameter of the circle (⌀) which is about 1.27323954474 (etc)....

What does this mean?  It means that π isn't really the important number... ⌀ is. π = 4/⌀, but ⌀ is a very simple continued fraction. π is just derived from it.  Maybe if we were teaching how simple continued fractions were, π would not seem like some mystical self-aware number.

Also, to simplify describing these... instead of using LaTeX and such I think we could just specify them as the relationship between two series... For example, ⌀ = A000290::A005408.  Similarly, if we wanted to define some 'constant' that was using even numbers instead of odds and the sum of even numbers instead of the sum of odds, we'd have y = A002378::A005843.

UPDATE:
Ok, I admit, the '4' in the definition also bothered me...
Extrapolating further, it appears that this is slightly more correct:
where S = perimeter of a square (ie: the 4 above is the unit square)
where C = circumference of the circle (to find)
then C = S/⌀
aka, while a 1x1 square will mean C=4/⌀; a 3x3 square will mean C=9/⌀

UPDATE:
Obviously, I have to assume that this number has already been defined.  It's used everywhere.  A quick Google search found nothing until I started trimming the number down.  Eventually, I found a reference in The royal gauger; or, gauging made perfectly easy, as it is actually practised by the officers of His Majesty's revenue of excise. In two parts. by Charles Leadbetter.  He appears to have referred to it both as "Square of the Diameter of a Circle, whose Area is Unity" as well as "The Multiplier or Multiplicator for reducing a Square to a Circle".  He showed how to use it for calculating how much Ale was in a round cask, for example.  For reference: