Safety in Numbers

Blog

Lurking Peril: Lethal Floating-Point Error

Today computers are ubiquitous. We depend on them for operating our appliances, our cars, and our finances. We require that they be accurate, but, indeed, sometimes they are not.

Computers are good at representing and manipulating things that can be represented with whole numbers, numbers without fractions. But when it comes to computing things like time or distance, which are not whole numbers, sometimes the answers are incorrect.

In February 1991, Iraq fired a SCUD missile at a U.S. military barracks.

In February 1991, Iraq fired a SCUD missile at a U.S. military barracks.

In response, a Patriot anti-missile was fired back.

In response, a Patriot anti-missile was fired back.

The Patriot missed and the barracks was destroyed. Tragically, 28 American military personnel died.

The Patriot missed and the barracks was destroyed. Tragically, 28 American military personnel died.

And why did this happen? Because the Patriot guidance computer, using floating point, got the wrong answer as there was insufficient space for the required number of significant digits for the result.

Connie Masters