Humble Pi

Matt Parker

As humans, we are not good at judging the size of large numbers. And even when we know one is bigger than another, we don’t appreciate the size of the difference. I had to go on the BBC News in 2012 to explain how big a trillion is. The UK debt had just gone over £1 trillion and they wheeled me out to explain that that is a big number. Apparently, shouting, ‘It’s really big, now back to you in the studio!’ was insufficient, so I had to give an example.


During our lives we learn that numbers are linear; that the spaces between them are all the same. If you count from one to nine, each number is one more than the previous one. If you ask someone what number is halfway between one and nine, they will say five – but only because they have been taught to. Wake up, sheeple! Humans instinctively perceive numbers logarithmically, not linearly. A young child or someone who has not been indoctrinated by education will place three halfway between one and nine.


When members of the indigenous Munduruku group in the Amazon were asked to place groups of dots where they belong between one dot and ten dots, they put groups of three dots in the middle. If you have access to a child of kindergarten age or younger with parents who don’t mind you experimenting on them, they will likely do the same thing when distributing numbers.


there is a vestigial instinct that larger numbers are logarithmic; that the gap between a trillion and a billion feels about the same as the jump between a million and a billion – because both are a thousand times bigger. In reality, the jump to a trillion is much bigger: the difference between living to your early thirties and a time when humankind may no longer exist.


It’s only when something goes wrong that we suddenly have a sense of how far mathematics has let us climb – and how long the drop below might be.


It seems the air traffic control system kept track of time by starting at 4,294,967,295 and counting down once a millisecond. Which meant that it would take 49 days, 17 hours, 2 minutes and 47.296 seconds to reach 0. Usually, the machine would be restarted before that happened, and the countdown would begin again from 4,294,967,295. From what I can tell, some people were aware of the potential issue so it was policy to restart the system at least every thirty days.


Boeing has since updated its program to fix the problem, so preparing the plane for take-off no longer involves a quick restart.


A political committee is rarely a good solution to a mathematical problem. The years leading up to 46BCE were known as the ‘years of confusion’, as extra months came and went, with little relation to when they were needed. A lack of notice could also mean that people travelling away from Rome would have to guess what the date back at home was.


To get everything back into alignment in the first place, the year 46BCE had a possible-world-record 445 days. In addition to the bonus month between February and March, two more months were inserted between November and December.


There was an initial clerical error, where the last year in a four-year period was double-counted as the first year of the next period, so leap years were actually put in every three years. But this was spotted, fixed and, by 3CE, everything was on track.


Luigi’s breakthrough was to keep the standard every-fourth-year leap year of the Julian calendar but to take out three leap days every four hundred years. Leap years were all the years divisible by four, and all Luigi suggested was to remove the leap days from years which were also a multiple of 100 (apart from those that were also a multiple of 400). This now averages out to 365.2425 days per year; impressively close to the desired tropical year of around 365.2422 days.


the Gregorian calendar was backdated, recalibrating the year as if it, rather than the Julian option, had always been used. Through the use of pope power, it was decreed that ten dates would be taken from October 1582 and so, in Catholic countries, 4 October 1582 was directly followed by 15 October.


England (which still – barely – included parts of North America) swapped over in 1752, realigning its dates by removing eleven days from September. Thus, 2 September 1752 was followed by 14 September 1752.


I went to the British Library in London, which houses a copy of every newspaper ever published in England and looked up contemporary reports. No mention of complaint, only ads selling new calendars. Calendar creators were having the time of their life.


The only contemporary concerns were expressed by people who did not want to pay a full 365 days’ worth of tax on a year with fewer days. Legitimately, one might say.


Russia did not swap calendars until 1918, when it started February on the 14th rather than on the 1st to bring themselves back into alignment with everyone else on the Gregorian calendar.


astronomy does give Julius Caesar the last laugh. The unit of a light-year, that is, the distance travelled by light in a year (in a vacuum) is specified using the Julian year of 365.25 days. So we measure our current cosmos using a unit in part defined by an ancient Roman.


This number was stored as a signed 32-digit binary number which allowed for a maximum of 2,147,483,647 seconds: a total of over sixty-eight years from 1970. And this was put in place by members of the generation who in the sixty-eight years leading up to 1970 had seen humankind go from the Wright Brothers inventing the first powered aeroplane to humans dancing on the Moon. They were sure that, by the year 2038, computers would have changed beyond all recognition and no longer use Unix time. Yet here we are. More than halfway there and we’re still on the same system. The clock is literally ticking.


I don’t blame the people who originally set up Unix time. They were working with what they had available back then. The engineers of the 1970s figured that someone else, further into the future, would fix the problems they were causing (classic baby-boomers).


The building at 20 Fenchurch Street in London was nearing completion in 2013 when a major design flaw became apparent. It was nothing to do with the structural integrity of the building; it was completed in 2014 and is a perfectly functioning building to this day, and was sold in 2017 for a record-breaking £1.3 billion. By all measures, it’s a successful building. Except, during the summer of 2013, it started setting things on fire.


it was producing temperatures of around 90°C, which was enough to scorch the doormat at a nearby barber’s shop. A parked car was a bit melted and someone claimed it burned their lemon (that’s not cockney rhyming slang; it was an actual lemon). A local reporter with a flair for the dramatic took the opportunity to fry some eggs by placing a pan in the hotspot.


This is a common theme in human progress. We make things beyond what we understand, and we always have done. Steam engines worked before we had a theory of thermodynamics; vaccines were developed before we knew how the immune system works; aircraft continue to fly to this day, despite the many gaps in our understanding of aerodynamics. When theory lags behind application, there will always be mathematical surprises lying in wait. The important thing is that we learn from these inevitable mistakes and don’t repeat them.


People were told that it was perfectly safe to drive across Galloping Gertie, as it had been nicknamed by the locals. (It seems Americans are even more creative at naming structures than Londoners, who probably would have gone with The Wavy Bridge.)


The rule of thumb should be: if you’re not going to do any maths with it, don’t store it as a number. In some countries phone numbers


just because something walks like a number and quacks like a number does not mean it is a number. Some things which look like numbers are just not. Phone numbers are a perfect example: despite being made from digits, they are not actually numbers. When have you ever added two phone numbers together? Or found the prime factors of a phone number? (Mine has eight, four distinct.) The rule of thumb should be: if you’re not going to do any maths with it, don’t store it as a number.


Reading biology texts reminds me what it is like for other people reading maths: a string of words and symbols that looks like normal language yet transmits no new information to my brain as it parses them. If I fight back the need to process the actual content and just focus on the overall syntax, I can kinda get the gist of what the author is trying to say.


I find that incredible. Billions of dollars were lost in part because someone added two numbers together instead of averaging them. A spreadsheet has all the outward appearances of making it look as if serious and rigorous calculations have taken place. But they’re only as trustworthy as the formulas below the surface.


Because of the miscalculation of a triangle, a freshwater lake which was only about 3 metres deep was completely drained and refilled from the ocean. It’s now a 400-metre-deep saltwater lake, and this has brought a complete change in plants and wildlife.


when playing the piano, going up a ‘third’ means going up two notes and going up a ‘fifth’ is going up only four notes. Put together, the whole transition is a ‘seventh’, giving us 3 + 5 = 7. Counting the dividers and not the intervals means that the note between the transitions is double-counted. It is also why an ‘octave’ of seven notes (and seven intervals) is named ‘oct’ for eight.


Days and hours are also done differently. I love the example of someone who starts work at 8 a.m. and by 12 p.m. they need to have cleaned floors eight to twelve of a building. Setting about cleaning one floor per hour would leave a whole floor still untouched come noon.


if floors eight to twelve have to be deep-cleaned between 8 December and 12 December, there would be enough time for one floor per day.


Trains in Switzerland are not allowed to have 256 axles. This may be a great obscure fact, but it is not an example of European regulations gone mad. To keep track of where all the trains are on the Swiss rail network, there are detectors positioned around the rails. They are simple detectors which are activated when a wheel goes over a rail, and they count how many wheels there are to provide some basic information about the train which has just passed. Unfortunately, they keep track of the number of wheels using an 8-digit binary number, and when that number reaches 11111111 it rolls over to 00000000. Any trains which bring the count back to exactly zero move around undetected, as phantom trains.


I guess they had so many enquiries from people wanting to know exactly why they could not add that 256th axle to their train that a justification was put in the manual. This is, apparently, easier than fixing the code. There have been plenty of times where a hardware issue has been covered by a software fix, but only in Switzerland have I seen a bug fixed with a bureaucracy patch.


Computers just blindly follow the rules they are given and do the ‘logical’ thing, with no regard for what may be the ‘reasonable’ thing.


programming requires being numerate, but in my opinion it is the ability to think logically through scenarios which most unites programmers with mathematicians.


this exact oddity is the basis of the game Rock, Paper, Scissors. Any option picked can be beaten by one of the other options. This is the difference between transitive and non-transitive relations.


Some of the ancient Sumerian records were written by a person seemingly named Kushim and signed off by their supervisor, Nisa. Some historians have argued that Kushim is the earliest human whose name we know. It seems the first human whose name has been passed down through millennia of history was not a ruler, a warrior or a priest … but an accountant.


When researching this book, I read a lot of accident reports and they were generally good at looking at the whole system. It is my uninformed impression that in some industries, such as medicine and finance, which do tend to blame the individual, ignoring the whole system can lead to a culture of not admitting mistakes when they happen. Which, ironically, makes the system less able to deal with them.


On 10 August 1628 the Swedish warship Vasa was launched and sank within minutes. For those brief moments it was the most powerfully armed warship in the world:


During the restorations, four different rulers were recovered. Two were ‘Swedish feet’ rulers split into twelve inches, and the other two were ‘Amsterdam feet’ rulers, split into only eleven inches. Amsterdam inches were bigger than Swedish inches (and the feet were slightly different lengths too).


The ocean is not a neat, flat surface; it’s constantly sloshing around. And that’s before you get to the Earth’s uneven gravitational field, which alters sea heights. So a country needs to make a decision on its sea level. The UK uses the average height of the water in the English Channel as measured from the town of Newlyn in Cornwall once an hour between 1915 and 1921.


The problem arose because the German and Swiss definitions of ‘sea level’ differed by 27 centimetres and, without compensating for the difference, the bridge would not match in the middle. But that was not the maths mistake. The engineers realized there would be a sea-level discrepancy, calculated the exact difference of 27 centimetres and then … subtracted it from the wrong side. When the two halves of the 225-metre bridge met in the middle, the German side was 54 centimetres higher than the Swiss side.


The method used to collect the data made a big difference. It’s like conducting a survey about what people think of modern technology but only accepting submissions by fax.


That was back when everything was ‘cyber’ and people could use the phrase ‘information superhighway’ with a straight face. When searching


That was back when everything was ‘cyber’ and people could use the phrase ‘information superhighway’ with a straight face.


we’ll go back a step and look at the actual sensors that are sending the SRI the data and see what range of values they can possibly produce. For three of the inconvenient seven it was found that the input could never be big enough to cause an operand error, so protection was not added. The other four variables could possibly be too big, so they were always run through the safety check. Which was all great … for the Ariane 4 rocket, the precursor of the Ariane 5. After years of faithful service, the SRI was pulled out of the Ariane 4 and used in the Ariane 5 without a proper check of the code. The Ariane 5 was designed with a different take-off trajectory to the Ariane 4, which involved greater horizontal speeds early in the launch. The trajectory of an Ariane 4 meant that this horizontal velocity would never be big enough to cause a problem, so it was not checked. But on the Ariane 5 it quickly exceeded the space available for the value within the SRI and the system threw out an operand error. But this alone was not what brought the rocket down.


The programmer mantra should be ‘Always comment on your code.’ And make the comments helpful. I’ve reviewed dense code I wrote years before, to find the only comment is ‘Good luck, future Matt.’


And it’s not even just engineers who are being restricted from speaking publicly. A different mathematical friend of mine does consulting work about the mathematics of a very public-facing area of safety. They will be hired by one company to do some research and uncover industry-wide mistakes. But then, when working for a different company or even advising the government on safety guidelines, they will not be able to disclose what they previously discovered on someone else’s dime. It’s all a bit silly.


But I wish there was a mechanism in place to ensure that important, potentially useful lessons could be shared with the people who would benefit from knowing.


As far as I’m aware, the only quote from me that has been made into a poster by teachers and put up in their classrooms is: ‘Mathematicians aren’t people who find maths easy; they’re people who enjoy how hard it is.’


I’ve tried to wangle the Parker Square back to being a mascot of the importance of giving something a go, even when you’re likely to fail. The experience people seem to have at school is that getting something wrong in maths is terrible and to be avoided at all costs. But you’re not going to be able to stretch yourself and try new challenges without occasionally going wrong. So, as some kind of compromise, the Parker Square has ended up being ‘a mascot for people who give it a go but ultimately fall short’.


It can be very dangerous when humans get complacent and think they know better than the maths.