Humble Pi: When Math Goes Wrong in the Real World
Rate it:
Open Preview
Read between June 12 - June 23, 2024
2%
Flag icon
Leonard never got his jet, and Leonard v. Pepsico, Inc. is now a part of legal history. I, personally, find it reassuring that, if I say anything that I characterize as “zany humor,” there is legal precedent to protect me from people who take it seriously. And if anyone has a problem with that, simply collect enough Parker Points for a free photo of me not caring (postage and handling charges may apply).
2%
Flag icon
We know a million, a billion, and a trillion are different sizes, but we often don’t appreciate the staggering increases between them. A million seconds from now is just shy of eleven days and fourteen hours. Not so bad. I could wait that long. It’s within two weeks. A billion seconds is over thirty-one years. A trillion seconds from now is after the year 33,700 CE.
2%
Flag icon
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. Three is a different kind of middle. It’s the logarithmic middle, which means it’s a middle ...more
3%
Flag icon
A UK National Lottery scratch card had to be pulled from the market the same week it was launched. Camelot, the company that runs the UK lottery, put it down to “player confusion.” The card was called Cool Cash and came with a temperature printed on it. If a player’s scratching revealed a temperature lower than the target value, they won. But a lot of players seemed to have an issue with negative numbers: On one of my cards it said I had to find temperatures lower than −8. The numbers I uncovered were −6 and −7 so I thought I had won, and so did the woman in the shop. But when she scanned the ...more
3%
Flag icon
On September 14, 2004, around eight hundred aircraft were making long-distance flights above Southern California. A mathematical mistake was about to threaten the lives of the tens of thousands of people onboard. Without warning, the Los Angeles Air Route Traffic Control Center lost radio voice contact with all the aircraft. A justifiable amount of panic ensued. The radios were down for about three hours, during which time the controllers used their personal cell phones to contact other traffic control centers to get the aircraft to retune their communications. There were no accidents but, in ...more
This highlight has been truncated due to consecutive passage length restrictions.
4%
Flag icon
Why would Microsoft, Los Angeles Air Route Traffic Control Center, and Boeing all limit themselves to this seemingly arbitrary number of around 4.3 billion (or half of it) when keeping track of time? It certainly seems to be a widespread problem. There is a massive clue if you look at the number 4,294,967,295 in binary. Written in the 1s and 0s of computer code, it becomes 11111111111111111111111111111111; a string of thirty-two consecutive ones.
5%
Flag icon
If you had space for only five digits on a piece of paper, the largest number you could write down would be 99,999. You’ve filled every spot with the largest digit available. What the Microsoft, air-traffic control, and Boeing systems all had in common is that they were 32-bit binary-number systems, which means the default is that the largest number they can write down is thirty-two 1s in binary, or 4,294,967,295 in base-10. It was slightly worse in systems that wanted to use one of the thirty-two spots for something else. If you wanted to use that piece of paper with room for five symbols to ...more
This highlight has been truncated due to consecutive passage length restrictions.
5%
Flag icon
The universe has given us only two units of time: the year and the day. Everything else is the creation of humankind to try to make life easier.
5%
Flag icon
As the protoplanetary disk congealed and separated into the planets as we know them, the Earth was made with a certain amount of angular momentum, sending it flying around the sun, spinning as it goes. The orbit we ended up in gave us the length of the year, and the rate of the Earth’s spin gave us the length of the day. Except they don’t match. There is no reason they should! It was just where the chunks of rock from that protoplanetary disk happened to fall, billions of years ago. The yearlong orbit of the Earth around the sun now takes 365 days, 6 hours, 9 minutes, and 10 seconds. For ...more
5%
Flag icon
This goes from being a minor inconvenience to becoming a major problem because the Earth’s orbital year controls the seasons. The Northern Hemisphere summer occurs around the same point in the Earth’s orbit every year because this is where the Earth’s tilt aligns the north toward the position of the sun. After every 365-day year, the calendar year moves a quarter of a day away from the seasons. After four years, summer would start a day later. In less than four hundred years, within the lifespan of a civilization, the seasons would drift by three months. After eight hundred years, summer and ...more
This highlight has been truncated due to consecutive passage length restrictions.
6%
Flag icon
In 46 BCE Julius Caesar decided to fix this with a new, predictable calendar. Every year would have 365 days—the closest whole number to the true value—and the bonus quarter days would be saved up until every fourth year, which would have a single bonus day. The leap year with an extra leap day was born! To get everything back into alignment in the first place, the year 46 BCE 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. Then, from 45 BCE onward, leap years were inserted every four ...more
7%
Flag icon
Despite all these improvements, our current Gregorian calendar is still not quite perfect. An average of 365.2425 days per year is good, but it’s not exactly 365.2421875. We’re still out by twenty-seven seconds a year. This means that our current Gregorian calendar will drift a whole day once every 3,213 years. The seasons will still reverse once every half a million years. And you will be alarmed to know that there are currently no plans to fix this!
7%
Flag icon
But astronomy does give Julius Caesar the last laugh. The unit of a light-year, that is, the distance traveled 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.
7%
Flag icon
At 3:14 a.m. on Tuesday, January 19, 2038, many of our modern microprocessors and computers are going to stop working. And all because of how they store the current date and time. Individual computers already have enough problems keeping track of how many seconds have passed while they are turned on; things get worse when they also need to keep completely up-to-date with the date. Computer timekeeping has all the ancient problems of keeping a calendar in sync with the planet plus the modern limitations of binary encoding. When the first precursors to the modern internet started to come online ...more
This highlight has been truncated due to consecutive passage length restrictions.
8%
Flag icon
I remember a boozy night out on February 13, 2009, with some friends to celebrate 1,234,567,890 seconds having passed, at just after 11:31 p.m. My programmer friend Jon had written a program to give us the exact countdown; everyone else in the bar was very confused as to why we were celebrating Valentine’s Day half an hour early.
8%
Flag icon
The largest value you can store in a signed 64-bit number is 9,223,372,036,854,775,807, and that number of seconds is equivalent to 292.3 billion years. It’s times like this when the age of the universe becomes a useful unit of measurement: 64-bit Unix time will last until twenty-one times the current age of the universe from now—until (assuming we don’t manage another upgrade in the meantime) December 4 in the year 292,277,026,596 CE, when all the computers will go down. On a Sunday.
8%
Flag icon
Once we live in an entirely 64-bit world, we are safe. The question is: will we upgrade all the multitude of microprocessors in our lives before 2038? We need either new processors or a patch that will force the old ones to use an unusually big number to store the time. Here is a list of all the things I’ve had to update the software on recently: my lightbulbs, a TV, my home thermostat, and the media player that plugs into my TV. I am pretty certain they are all 32-bit systems. Will they be updated in time? Knowing my obsession with up-to-date firmware, probably. But there are going to be a ...more
8%
Flag icon
If you want to see the Y2K38 bug in action for yourself, find an iPhone. This may work for other phones, or the iPhone may one day be updated to fix this. But for now, the built-in stopwatch on the iPhone piggybacks on the internal clock and stores its value as a signed 32-bit number. The reliance on the clock means that, if you start the stopwatch and then change the time forward, the time elapsed on the stopwatch will suddenly jump forward. By repeatedly moving the time and date on your phone forward and backward, you can ratchet up the stopwatch at an alarming rate, until it hits the 32-bit ...more
9%
Flag icon
How hard can it be to know what date it is? Or will be? I could safely state that 64-bit Unix time will run out on December 4 in the year 292,277,026,596 CE because the Gregorian calendar is very predictable. In the short term, it is super easy and loops every few years. Allowing for the two types of year (leap and normal), and the seven possible days a year can start on, there are only fourteen calendars to choose from. When I was shopping for a 2019 calendar (non–leap year, starting on a Tuesday), I knew it would be the same as the one for 2013, so I could pick up a secondhand one at a ...more
9%
Flag icon
GOOD LUCK EVERYONE!!! This year, December has 5 Mondays, 5 Saturdays, and 5 Sundays. This happens once every 823 years. This is called money bags. So share it and money will arrive within 4 days. Based on Chinese feng shui. The one who does not share will be without money. Share within 11 minutes of reading. Can’t hurt so I did it. JUST FOR FUN. This is one of many popular internet memes claiming that something happens only every 823 years. I have no idea where the number 823 came from. But for some reason, the internet is rife with claims that the current year is special and that this ...more
9%
Flag icon
In February 2007, six F-22s were flying from Hawaii to Japan when all their systems crashed at once. All navigation systems went offline, the fuel systems went, and even some of the communication systems were out. This was not triggered by an enemy attack or clever sabotage. The aircraft had merely flown over the International Date Line.
9%
Flag icon
If you’re finding it hard to get your head around this, you’re not alone. The International Date Line causes all sorts of confusion, and whoever was programming the F-22 must have struggled to work it out. The US Air Force has not confirmed what went wrong (only that it was fixed within forty-eight hours), but it seems that time suddenly jumped by a day and the plane freaked out and decided that shutting everything down was the best course of action. Midflight attempts to restart the system proved unsuccessful so, while the planes could still fly, the pilots couldn’t navigate. The planes had ...more
12%
Flag icon
While resonance is great in some situations, engineers often have to go to a lot of effort to avoid it in machines and buildings. A washing machine is incredibly annoying in that brief moment when the spin frequency matches the resonance of the rest of the machine: it takes on a life of its own and decides to go for a walk.
12%
Flag icon
Resonance can affect buildings as well. In July 2011, a thirty-nine-story shopping center in South Korea had to be evacuated because resonance was vibrating the building. People at the top of the building felt it start to shake, as if someone had banged the bass and turned up the treble. Which was exactly the problem. After the official investigators had ruled out an earthquake, they found the culprit was an exercise class on the twelfth floor. On July 5, 2011, they had decided to work out to Snap!’s “The Power,” and everyone jumped around harder than they usually did. Could the rhythm of “The ...more
13%
Flag icon
One of the first bridges to be destroyed by synchronized pedestrians was a suspension bridge just outside Manchester, England (in what is now the city of Salford). I believe that this Broughton Suspension Bridge was the earliest bridge destroyed when people walked over it at the resonant frequency. Unlike the Millennium Bridge, which had a feedback loop to synchronize the pedestrians, on Broughton Bridge the people crossing it had to do all the work themselves. The bridge was built in 1826, and people crossed it with no problem at all until 1831. It took a troop of soldiers all marching ...more
This highlight has been truncated due to consecutive passage length restrictions.
13%
Flag icon
This is a common theme in human progress. We make things beyond what we understand, as 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.
14%
Flag icon
The twisting action of the bridge has since become known to engineers as “torsional instability,” which means that a structure has the capability to twist freely in the middle. I think of torsional instability as the movement no one expects. Most structures don’t have the right combination of size and length to twist noticeably, so torsional instability is forgotten about until a new construction dips just below the threshold where it manifests and then, suddenly, it’s back!
19%
Flag icon
Scientific notation just takes that a step further. In normal language, we like round multiples of millions and billions, but in science, the decimal point is moved all the way to the front, and then the number of digits is specified. So the age of the universe is 1.38E+10. That E is actually a lazy way of writing an exponential: the universe is 1.38 × 1010 years old. For a very small measurement, a negative number is used for the size. A proton has a mass of 1.67E−27 kg. That’s much neater than writing 0.00000000000000000000000000167 kg.
19%
Flag icon
I would be happier if we called them “phone digits” instead of “phone numbers,” because, I repeat, I don’t think they are numbers. If you’re ever not sure if something is a number or not, my test is to imagine asking someone for half of it. If you asked for half the height of someone 180 centimeters tall, they would say 90 centimeters. Height is a number. Ask for half of someone’s phone number, and they will give you the first half of the digits. If the response is not to divide it but rather to split it, it’s not a number.
21%
Flag icon
Thankfully, on the tenth human chromosome is the gene that encodes for the production of this enzyme. The gene has the catchy name of MARCH5, and if you think that looks a lot like a date, then you can already see where this is going. Over on your first chromosome, the gene SEP15 is busy making some other important protein. Type those gene names into Excel and they’ll transform into 5-Mar and 15-Sep, encoded as 3/5/2019 and 9/15/2019 (or whatever the current year is) in the Formula Bar of the US version. All mention of MARCH5 and SEP15 has been obliterated. Do biologists use Excel much to ...more
This highlight has been truncated due to consecutive passage length restrictions.
21%
Flag icon
Another limitation of spreadsheets as databases is that they eventually run out. Much like computers having trouble keeping track of time in a 32-digit binary number, Excel has difficulty keeping track of how many rows are in a spreadsheet. In 2010 WikiLeaks presented The Guardian and The New York Times with 92,000 leaked field reports from the war in Afghanistan. Julian Assange delivered them in person to the Guardian offices in London. The journalists quickly confirmed that they seemed to be real but, to their surprise, the reports ended abruptly in April 2009, although they should have gone ...more
22%
Flag icon
Excel does have one good layer of mistake prevention when someone is typing in a formula: it checks that all the syntax is correct. In normal computer programming, you can easily leave a spare bracket somewhere or miss putting in a comma. Which leaves you swearing loudly at a semicolon at 3 a.m. (“What the heck are you doing there?”), or so I’ve heard. Excel at least does a cursory check that all your punctuation is in order.
23%
Flag icon
A final warning from finance. In 2012 JPMorgan Chase lost a bunch of money; it’s difficult to get a hard figure, but the agreement seems to be that it was around $6 billion. As is often the case in modern finance, there are a lot of complicated aspects to how the trading was done and structured (none of which I claim to understand). But the chain of mistakes featured some serious spreadsheet abuse, including the calculation of how big the risk was and how losses were being tracked. A Value-at-Risk (aka VaR) calculation gives traders a sense of how big the current risk is and limits what sorts ...more
23%
Flag icon
Amazingly, one specific Value-at-Risk calculation was being done in a series of Excel spreadsheets with values having to be manually copied between them. I get the feeling it was a prototype model for working out the risk that was put into production without being converted to a real system for doing mathematical modeling calculations. And enough errors accumulated in the spreadsheets to underestimate the VaR. An overestimation of risk would have meant that more money was kept safe than should have been, and because it was limiting trades, it would have caused someone to investigate what was ...more
23%
Flag icon
The JPMorgan Chase & Co. Management Task Force did eventually release a report about the whole shemozzle. Here are my favorite quotes about what happened: This individual immediately made certain adjustments to formulas in the spreadsheets he used. These changes, which were not subject to an appropriate vetting process, inadvertently introduced two calculation errors, the effects of which were to understate the difference between the VCG mid-price and the traders’ marks. (p. 56) Specifically, after subtracting the old rate from the new rate, the spreadsheet divided by their sum instead ...
This highlight has been truncated due to consecutive passage length restrictions.
23%
Flag icon
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. Colle...
This highlight has been truncated due to consecutive passage length restrictions.
24%
Flag icon
There is something called the Euler characteristic of a surface, which describes the pattern behind how different 2D shapes can join together to make a 3D shape. In short, a ball has a Euler characteristic of two, and hexagons on their own cannot make a shape with a Euler characteristic of more than zero.
27%
Flag icon
When the space shuttle Challenger exploded shortly after launch on January 28, 1986, killing all seven people aboard, a presidential commission was formed to investigate the disaster. The commission included Neil Armstrong, Sally Ride, and Nobel Prize–winning physicist Richard Feynman. The Challenger exploded because of a leak from one of the solid rocket boosters. For takeoff, the space shuttle had two of these boosters, each of which weighed 650 tons and, amazingly, used metal as fuel: they burned aluminum. Once the fuel was spent, the boosters were jettisoned by the shuttle at an altitude ...more
This highlight has been truncated due to consecutive passage length restrictions.
31%
Flag icon
This type of mistake is so common that the programming community has a name for it: an OBOE, or an off-by-one error. Named after the symptom and not the cause, most off-by-one errors come from the complications of convincing code to run for a set number of times or count a certain number of things. I’m obsessed with one specific species of off-by-one error: the fence-post problem. Which is the second weapon in TheJosh’s arsenal. This mistake is called the fence-post problem because it is quintessentially described using the metaphor of a fence: if a fifty-meter stretch of fence has a post ...more
31%
Flag icon
When it comes to measuring time, we use a weird mix of counting posts and counting the sections of the fence. Or we can look at it in terms of rounding. Age is systematically rounded down: in many countries, a human is age zero for the first year of their life and increments to being one year old only after they have finished that whole period of their life. You are always older than your age. When you are thirty-nine, you are not in your thirty-ninth year of life but your fortieth. If you count the day of your birth as a birthday (which is hard to argue against), then when you turn ...more
32%
Flag icon
Marcus Vitruvius Pollio was a contemporary of Julius Caesar, and we know of him largely through his extensive writing about architecture and science. Vitruvius’s works were very influential in the Renaissance, and Leonardo da Vinci’s Vitruvian Man is named after him. In the third book of his De architectura, he talks about good temple building (including always using an odd number of steps, so when someone places their dominant foot on the first step, they will use the same foot when they reach the top). He also talks about an easy mistake to make when positioning your columns. For a temple ...more
32%
Flag icon
The problem continues to inconvenience people. At five p.m. on September 6, 2017, mathematician James Propp was in a Verizon Wireless phone store in the US, buying a new phone. It was for his son, and thankfully, it came with a no-questions-asked refund policy if returned within fourteen days. As it turns out, the phone was not what his son was after, so two weeks later, on September 20, Propp senior went back to return it. But despite it being less than fourteen days since he had bought the phone, the store could not complete the return, as it was now technically day fifteen of the contract. ...more
35%
Flag icon
In the United States, ZIP codes are five digits long and go from 00000 to 99999: a total of just a hundred thousand options. Given that the US has a total land surface area of 9,158,022 square kilometers, this gives just under 100 square kilometers per potential ZIP code. They can never be more accurate than that (on average). This does help narrow down the delivery of mail, but the rest of the address is needed for finer resolution.
35%
Flag icon
My favorite recycled-phone-number story comes from the Ultimate Fighting Championship. The UFC is a mixed-martial-arts competition, which I am vaguely aware of only because the fighting ring is an octagon and directly referred to as such. I’d say calling a television show Road to the Octagon and then just showing a bunch of fighters is false advertising. And don’t get me started on how few higher polygons were in Beyond the Octagon. Welterweight UFC fighter Rory MacDonald noticed that whenever he walked out before a fight they would not play the walkout song he requested. His opponents were ...more
36%
Flag icon
Gandhi is famous as a pacifist who led India to independence from the United Kingdom. But since 1991, he has also gained a reputation as a warmonger leader who launches unprovoked nuclear strikes. This is because of the Civilization computer games, which have sold over 33 million copies. They pit you against several world leaders from history in a race to build the greatest civilization, one of whom is the normally peace-loving Gandhi. But ever since early versions of the game, players noticed that Gandhi was a bit of a jerk. Once he developed atomic technology, he would start dropping nuclear ...more
This highlight has been truncated due to consecutive passage length restrictions.
36%
Flag icon
There are ways to mitigate rollover errors. If programmers see a 256 problem coming, they can put a hard limit in place to stop a value going over 255. This happens all the time, and it’s fun spotting people getting confused by the seemingly arbitrary threshold. When messaging app WhatsApp increased the limit on how many users can be in the same group chat from 100 to 256, it was reported in the Independent that “it’s not clear why WhatsApp settled on the oddly specific number.” A lot of people did know why, though. That comment quickly disappeared from the online version, with a footnote ...more
38%
Flag icon
The most dangerous 256 error I have found so far occurred in the Therac-25 medical radiation machine. This was designed to treat cancer patients with bursts of either an electron beam or intense X-rays. It was able to achieve both types of radiation from the one machine by either producing a low-current electron beam, which the patient was directly exposed to, or a high-current electron beam, which was aimed at a metal plate to produce X-rays. The danger was that the beam of electrons required to produce X-rays was so powerful that it could do severe damage to patients if it hit them directly. ...more
This highlight has been truncated due to consecutive passage length restrictions.
38%
Flag icon
On January 17, 1987, in Yakima Valley Memorial Hospital in Washington (now Virginia Mason Memorial), a patient was due to receive eighty-six rads from a Therac-25 machine (the rad is an antiquated unit of radiation absorption). Before the patient was to receive the dose of X-rays, however, the metal target and collimator had been moved out of the way so the machine could be aligned using normal visible light. They were not put back. The operator hit the Set button on the machine at the exact moment Class3 had rolled over to zero, Chkcol was not run, and the electron beam fired with no target ...more
38%
Flag icon
The fix to the software was disturbingly simple: the setup loop was rewritten so it would set Class3 to a specific non-zero value each time instead of incrementing its previous value. It’s a sobering thought that neglecting the way co...
This highlight has been truncated due to consecutive passage length restrictions.
39%
Flag icon
On February 25, 1991, in the First Gulf War, a Scud missile was fired at the US Army barracks near Dhahran, Saudi Arabia. This was not a surprise for the army, which had set up a Patriot missile defense system to detect, track, and intercept any such missiles. Using radar, the Patriot would detect an incoming missile, calculate its speed, and use that to track its movements until an antimissile could be fired to annihilate it. Except a mathematical oversight in the Patriot code meant that it would miss. Originally designed as a portable system to intercept enemy planes, the Patriot battery had ...more
« Prev 1