Humble Pi: When Math Goes Wrong in the Real World

Humble Pi: When Math Goes Wrong in the Real World

by Matt Parker

Narrated by Matt Parker

Unabridged — 9 hours, 33 minutes

Humble Pi: When Math Goes Wrong in the Real World

Humble Pi: When Math Goes Wrong in the Real World

by Matt Parker

Narrated by Matt Parker

Unabridged — 9 hours, 33 minutes

Audiobook (Digital)

$20.00
FREE With a B&N Audiobooks Subscription | Cancel Anytime
$0.00

Free with a B&N Audiobooks Subscription | Cancel Anytime

START FREE TRIAL

Already Subscribed? 

Sign in to Your BN.com Account


Listen on the free Barnes & Noble NOOK app


Related collections and offers

FREE

with a B&N Audiobooks Subscription

Or Pay $20.00

Overview

An international best seller

The book-length answer to anyone who ever put their hand up in math class and asked, "When am I ever going to use this in the real world?"

Our whole world is built on math, from the code running a website to the equations enabling the design of skyscrapers and bridges. Most of the time this math works quietly behind the scenes...until it doesn't. All sorts of seemingly innocuous mathematical mistakes can have significant consequences. Math is easy to ignore until a misplaced decimal point upends the stock market, a unit conversion error causes a plane to crash, or someone divides by zero and stalls a battleship in the middle of the ocean.

Exploring and explaining a litany of glitches, near misses, and mathematical mishaps involving the internet, big data, elections, street signs, lotteries, the Roman Empire, and an Olympic team, Matt Parker uncovers the bizarre ways math trips us up, and what this reveals about its essential place in our world. Getting it wrong has never been more fun.


Editorial Reviews

Publishers Weekly

09/30/2019

Parker (Things to Make and Do in the Fourth Dimension), a stand-up comedian with a penchant for math, devotes this enjoyable but off-target study to exploring all sorts of mishaps, from the trivial to the deadly, that he attributes to mathematical errors. His examples are at times gripping, such as the Air Canada flight from Montreal to Edmonton that ended in an emergency landing after the flight crew and airport personnel mistakenly calculated its fuel needs in pounds rather than kilograms. The problem is that the most serious errors Parker relates can be more readily explained by carelessness or poor planning rather than a failure to understand mathematics. The trivial, but entertaining, examples he discusses—such as English road signs misrepresenting the geometric pattern on soccer balls, or McDonald’s miscalculating the number of possible options arising from its McChoice Menu (247, not 40,312)—are actually results of mathematical blunders. Parker’s conclusion is thus not about mathematics but about quality control: “Mistakes are going to happen, and systems need to be able to... stop them from becoming disasters.” Those expecting insight into the importance of mathematical literacy from this otherwise intriguing book will be disappointed. Agent: PJ Mark, Janklow & Nesbit Assoc. (Jan.)

From the Publisher

Praise for Matt Parker and Humble Pi:

“Parker is consistently very funny. . .. highly entertaining.” —The Guardian

“Parker has a sly wit. . . . A clever, amusing book about some of life’s more serious problems; highly recommended.” —Library Journal

“A fascinating and deeply surprising journey into the hilarious and sometimes tragic realm of mathematical error. Brilliant.” —Tim Harford, author of The Undercover Economist and Messy

“[Matt Parker] shows off math at its most playful and multifarious.” —Jordan Ellenberg, author of How Not to Be Wrong  

“Matt Parker is some sort of unholy fusion of prankster, wizard, and brilliant nerd—math is rarely this clever, funny, and ever so slightly naughty.”—Adam Rutherford, author of Creation

“A pleasant exploration of our deeply held incompetence at mathematics. . . . Fun reading for nonmathematicians.” —Kirkus Reviews

“Numbers to die for. Four stars.” —Mail on Sunday

“Matt Parker has pulled off something wonderful . . . his stories are superb.” —The Daily Mail

Library Journal

12/01/2019

Parker (Things to Make and Do in the Fourth Dimension) explains how the misuse of math creates problems. Mathematical errors often include mistaking units (pounds for kilograms, feet for meters), and misunderstanding probabilistic and statistical statements. Parker also presents examples of users of computer software not fully understanding the limitations of packaged programs. The only topic that is somewhat technical and requires a bit of effort to follow is Parker's explanation of how the inexactitudes introduced by inputting and outputting date in decimal form leads to problems because the internal computations are actually done in binary. Yet, Parker has a sly wit; so, although all this sounds very serious, in fact, the writing style is breezy and, in some parts, extremely funny. VERDICT A clever, amusing book about some of life's more serious problems; highly recommended.—Harold D. Shane, Mathematics Emeritus, Baruch Coll. Lib., CUNY

Kirkus Reviews

2019-09-29
A pleasant exploration of our deeply held incompetence at mathematics.

Comedian and YouTube performer Parker (Things To Make and Do in the Fourth Dimension: A Mathematician's Journey Through Narcissistic Numbers, Optimal Dating Algorithms, at Least Two Kinds of Infinity, and More, 2014), who hosts a show on the Science Channel called Outrageous Acts of Science, claims bluntly that humans are stupid at dealing with numbers. "We were not born with any kind of ability to understand fractions, negative numbers, or the many other strange concepts developed by mathematics," he writes, "but, over time, your brain can slowly learn how to deal with them." Ironically, it is engineering and computer glitches, not pure math, that make up much of the book. Buildings and bridges collapse because someone gets the numbers wrong. A squadron of advanced jets crossing the Pacific suddenly lost their electronics because their navigation computer program, which must keep track of time, couldn't deal with crossing the International Date Line. They followed an older plane nearby to a safe landing. A corporation, searching for an employee named Jack Null, could never find him because "null" to a computer means "no data." People named Blank, Sample, and Test also cause trouble. A number divided by a really tiny number becomes very large. The result of dividing by zero is meaningless; no proper computer will deal with it. Humans yearn to predict the unpredictable; the author shows how a truly random event (a lottery draw, a coin flip) has no influence on the following event. No matter how many times heads appears, the chance of tails remains 50-50. The only way to increase your chance of winning the lottery is to buy more tickets. If black comes up four, five, or 10 times in a row on the roulette wheel, gamblers rush to bet on red because it is "due"—but it isn't. Nonsense, blunders, and delusions make for good reading, so Parker's relentless litany will have a wide appeal.

Fun reading for nonmathematicians.

Product Details

BN ID: 2940173916099
Publisher: Penguin Random House
Publication date: 01/21/2020
Series: Humble Pi
Edition description: Unabridged

Read an Excerpt

One

Losing Track of Time

 

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 the chaos, ten aircraft flew closer to each other than regulations allowed (five nautical miles horizontally or two thousand feet vertically); two pairs passed within two miles of each other. Four hundred flights on the ground were delayed and a further six hundred canceled. All because of a math error.

 

Official details are scant on the precise nature of what went wrong, but we do know it was due to a timekeeping error within the computers running the control center. 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.295 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. But this was just a way of working around the problem; it did nothing to correct the underlying mathematical error, which was that nobody had checked how many milliseconds there would be in the probable runtime of the system. So, in 2004, it accidentally ran for fifty days straight, hit zero, and shut down. Eight hundred aircraft traveling through one of the world's biggest cities were put at risk because, essentially, someone didn't choose a big enough number.

 

People were quick to blame the issue on a recent upgrade of the computer systems to run a variation of the Windows operating system. Some of the early versions of Windows (most notably Windows 95) suffered from exactly the same problem. Whenever you started the program, Windows would count up once every millisecond to give the "system time" that would drive all the other programs. But once the Windows system time hit 4,294,967,295, it would loop back to zero. Some programs-drivers, which allow the operating system to interact with external devices-would have an issue with time suddenly racing backward. These drivers need to keep track of time to make sure the devices are regularly responding and do not freeze for too long. When Windows told them that time had abruptly started to go backward, they would crash and take the whole system down with them.

 

It is unclear if Windows itself was directly to blame or if it was a new piece of computer code within the control center system itself. But, either way, we do know that the number 4,294,967,295 is to blame. It wasn't big enough for people's home desktop computers in the 1990s, and it was not big enough for air-traffic control in the early 2000s. Oh, and it was not big enough in 2015 for the Boeing 787 Dreamliner aircraft.

The problem with the Boeing 787 lay in the system that controlled the electrical power generators. It seems they kept track of time using a counter that would count up once every 10 milliseconds (so, a hundred times a second) and it topped out at 2,147,483,647 (suspiciously close to half of 4,294,967,295). This means that the Boeing 787 could lose electrical power if turned on continuously for 248 days, 13 hours, 13 minutes and 56.47 seconds. This was long enough that most planes would be restarted before there was a problem but short enough that power could, feasibly, be lost. The Federal Aviation Administration described the situation like this:

 

The software counter internal to the generator control units (GCUs) will overflow after 248 days of continuous power, causing that GCU to go into failsafe mode. If the four main GCUs (associated with the engine-mounted generators) were powered up at the same time, after 248 days of continuous power, all four GCUs will go into failsafe mode at the same time, resulting in a loss of all AC electrical power regardless of flight phase.

 

I believe that "regardless of flight phase" is official FAA-speak for "This could go down midflight." Their official line on airworthiness was the requirement of "repetitive maintenance tasks for electrical power deactivation." That is to say, anyone with a Boeing 787 had to remember to turn it off and on again. It's the classic computer programmer fix. Boeing has since updated its program to fix the problem, so preparing the plane for takeoff no longer involves a quick restart.

 

When 4.3 Billion Milliseconds Is Just Not Enough

 

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.

 

Most humans never need to go near the actual circuits or binary code on which computers are built. They only need to worry about the programs and apps that run on their devices and, occasionally, the operating system on which those programs run (such as Windows or iOS). All these use the normal digits of 0 to 9 in the base-10 numbers we all know and love.

But beneath it all lies binary code. When people use Windows on a computer or iOS on a phone, they are interacting only with the graphical user interface, or GUI (delightfully pronounced "gooey"). Below the GUI is where it gets messy. There are layers of computer code taking the mouse clicks and swipe lefts of the human using the device and converting them into the harsh machine code of 1s and 0s that is the native language of computers.

 

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 write down a negative number, you'd need to leave the first spot free for a positive or negative sign, which would mean that you could now write down all the whole numbers between 9,999 and +9,999. It's believed Boeing's system used such "signed numbers," so, with the first spot taken, they only had room for a maximum of thirty-one 1s, which translates into 2,147,483,647. Counting only centiseconds rather than milliseconds bought them some time-but not enough.

 

Thankfully, this is a can that can be kicked far enough down the road that it does not matter. Modern computer systems are generally 64-bit, which allows for much bigger numbers by default. The maximum possible value is of course still finite, so any computer system is assuming that it will eventually be turned off and on again. But if a 64-bit system counts milliseconds, it will not hit that limit until 584.9 million years have passed. So you don't need to worry: it will need a restart only twice every billion years.

 

Calendars

The analog methods of timekeeping we used before the invention of computers would, at least, never run out of room. The hands of a clock can keep spinning around; new pages can be added to the calendar as the years go by. Forget milliseconds: with only good old-fashioned days and years to worry about, you will not have any math mistakes ruining your day.

 

Or so thought the Russian shooting team as they arrived at the 1908 Olympic Games in London a few days before the international shooting was scheduled to start on July 10. But if you look at the results of the 1908 Olympics, you'll see that all the other countries did well but there are no Russian results for any shooting event. And that is because what was July 10 for the Russians was July 23 in the UK (and indeed most of the rest of the world). The Russians were using a different calendar.

 

It seems odd that something as straightforward as a calendar can go so wrong that a team of international athletes shows up at the Olympics two weeks late. But calendars are far more complex than you'd expect; it seems that dividing the year up into predictable days is not easy and there are different solutions to the same problems.

 

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. 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 simplicity, we can call that 365 days.

 

This means that, if you celebrate New Year's Eve after a year of 365 days, the Earth still has a quarter of a day of movement before you'll be back to exactly where you were last New Year's Eve. The Earth is tearing around the sun at a speed of around 30 kilometers every second, so this New Year's Eve you will be over 650,000 kilometers away from wherever you were last year. So, if your New Year's resolution was to not be late for things, you're already way behind.

 

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 winter would swap places completely.

To fix this, we had to tweak the calendar to have the same number of days as the orbit. Somehow, we needed to break away from having the same number of days every year, but without having a fraction of a day; people get upset if you restart the day at a time other than midnight. We needed to link a year to the Earth's orbit without breaking the tie between a day and the Earth's rotation.

 

The solution that most civilizations came up with was to vary the number of days in any given year so there is a fractional number of days per year on average. But there is no single way to do that, which is why there are still a few competing calendars around today (which all start at different points in history). If you ever have access to a friend's phone, go into the settings and change their calendar to the Buddhist one. Suddenly, they're living in the 2560s. Maybe try to convince them they have just woken up from a coma.

 

Our main modern calendar is a descendant of the Roman Republican calendar. They had only 355 days, which was substantially fewer than required, so every few years an entire extra month was inserted between February and March, adding an extra twenty-two or twenty-three days to the year. In theory, this adjustment could be used to keep the calendar aligned with the solar year. In practice, it was up to the reigning politicians to decide when the extra month should be inserted. As this decision could either lengthen their year of ruling or shorten that of an opponent, the motivation was not always to keep the calendar aligned.

A political committee is rarely a good solution to a mathematical problem. The years leading up to 46 BCE 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 traveling away from Rome would have to guess what the date back at home was.

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 years to keep the calendar in sync.

Well, almost. There was an initial clerical error, by which 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 3 CE, everything was on track.

From the B&N Reads Blog

Customer Reviews