Happy #PiDay – even if you aren’t in North America!

As almost everyone who doesn’t live in North America knows…

…American dates are weird!

Those of us who care about these things use YYYY-MM-DD, because writing 2022-03-14 is undoubtedly the easiest way of avoiding ambiguity in dates, given that the four-digit part is obviously the year, and everyone who writes the year at the start inevitably follows it with the month and then the day.

No one who would deliberately lead off with the year would ever dare to use the format YYYY-DD-MM, because that would be absurd: putting the year first means the years sort textually and tidily into chronological order, so it wouldn’t make sense to ruin that handy feature by using anything other than YYYY-MM-DD to make the entire date field sort alphabetically.

And no one, truly no one, would ever use just two digits for the year, given the palaver that beset us around Y2K, so you can rule out YY-MM-DD without further thought.

When we say dates out loud , however, we usually say the year at the end (or casually leave the listener to infer that we mean whatever-year-we-are-in-right-now, or possibly the one just past or just about to arrive, assuming we’re close to the start of January or near the end of December).

As a result, many countries, sadly incuding the UK, still routinely use DD/MM/YYYY for dates, and then rather casually tolerate DD/MM/YY as well, as though the millennium bug had never been a thing.

And a few countries – you know who you are, and you know that this habit of yours is odder than ounces (fluid or avoirdupois), madder than miles, and clumsier even than cubic inches! – stick resolutely to MM/DD/YY, so that everything about their dates is confusing and ambiguous.

The happy side of MM/DD/YY

But one delightful thing that you do get from this peculiar transatlantic habit is that the 14th day of March in any year gets shortened to 3/14, and if you imagine that slash as if it were a decimal separator and not a division sign…

…you get PI DAY!

Today is Pi Day because 3.14 is pretty jolly close to the value of Pi, which is a very handy number indeed.

Pi tells you how exactly much longer it is to walk all the way around a circle than simply walking across it – this comes in handy when building wheels, designing gears, or turning this way and that at a consistent rate.

What’s in a name?

Why the letter π, which is a lower-case P in Greek, you wonder?

Wouldn’t c (or C), short for circumference, be a more obvious English abbreviation? (Back when the abbreviation π came in, during the early 1700s, we knew that light had a finite speed, but c was first used to denote the speed of light only in the late 1800s, so we didn’t then need c for that purpose.)

Apparently, π is simply short for perimeter, an English word that was adopted from the Greek περίμετρος, and which conveniently therefore starts with π in Greek and the equivalent p in English.

If you’re interested, the quickest way to “know” Pi to seven significant digits is in the form 355/113, which comes out at 3.14159290 (and a bit), a mere 0.0000085% higher than the more precise 3.14159265 (and a bit).

If you went to primary school before calculators came out, you probably learned 22/7 (a handy Commonwealth alternative for celebrating Pi day, being the 22nd of July), which gives you 3.14285714, too high by just 0.04%.

Why not 3, or 4, or something more “natural”?

But why does Pi come out at close to 3.14, instead of, say, 3, or 4, or something easier to remember and more natural, in the mathematical sense of a whole number?

The simple answer is the unexplanatory, pop-psychology-sounding remark that “the value of Pi is what it is”.

Of course, you can get a quick idea of why Pi is a fair bit less than 4, and probably a touch bigger than 3, simply by imagining how long it would take you to walk round a square field that measures one {mile, furlong, hectometer, football field, whatever unit you like} along each side…

…compared to walking around a circle that passes just outside that square, or around a circle that passes just inside it.

Here’s a diagram of what we mean.

We want to compare the distance round the blue circle, denoted P below, to the distance around the red outer square (which is obviously longer than P), and to the distance around the green inner square (clearly shorter than P).

As you can see, the perimeter of the outer square is just four times the length of each side; so the perimeter is 4.

So the περίμετρος of the circle – its circumference, to use the Latin word, or π to abbreviate the Greek one – must be less than 4.

And the length of each side of the inner square – to work this out for yourself, you can use Pythogoras’s theorem, as shown above – is 1/√2, which is slightly more than 7/10, or 0.707106781 (and-a-bit), in fact, so its perimeter is slightly more than 2.8.

From that alone, therefore, we know that 2.8 < π < 4, which narrows things down a bit already…

…and by using polygons with more and more sides in our diagram, rather than squares, we could produce better and better approximations of non-curved figures that home in more and more closely on π from above and below, corralling it into an ever-narrower range of possible values.

You never get there

As you probably know, however, π is an irrational number – which means not that it is crazy or weird, but simply that it can’t be written as a ratio, in the way that we can exactly represent 0.142857142857 recurring as 1/7, or 0.2 as 2/10, or 1/5 in its simplest form.

Of course, even though we can never print out a complete decimal expansion of π, that hasn’t stopped computer scientists from seeing how far they can get.

The current record is close to 63 trillion decimal digits, which took Swiss academics more than 100 days on a “computer” (we are using the word very loosely here!) that was apparently equipped with 1024 gigabytes of RAM and more than 600,000 gigabytes of disk space.

In case you’re wondering, the exact number of digits computed was 62,831,853,071,796.

If that number looks kind of familiar, try dividing it by 2, which gives you 31,415,926,535,898.

Look familiar?

Happy #PiDay!

PS. The cybersecurity connection here is this: never assume that apparently impracticable or difficult calculations, whether that’s churning out Pi to ever more decimal places, or cracking passwords and cryptographic codes, will retain their difficulty forever. Computation speeds only ever get faster. Memory size only ever increases. Disk space only ever goes up.


go top