MathIsimple
6 min read
beginner

Rounding Errors Have Crashed Rockets and Cost Banks Millions

The Patriot missile system missed a Scud because of a 0.34-second clock drift. Three more examples follow.

April 22, 2026
Math Basics
Science
Real World Math
Computer Science

A Quarter-Second Error. Twenty-Eight Deaths.

On February 25, 1991, a Patriot missile battery near Dhahran, Saudi Arabia failed to intercept an incoming Iraqi Scud. The Scud hit a U.S. Army barracks, killing 28 soldiers and wounding 99 more.

The cause, as documented in a U.S. General Accounting Office report, was a rounding error. The system tracked time in tenths of a second using a 24-bit binary register. The value 0.1 cannot be represented exactly in binary — the computer stored a truncated approximation. The discrepancy was 0.0000000095 seconds per tick.

After the battery had been running for 100 hours, those tiny errors had accumulated to a 0.34-second drift. A Scud travels roughly 1,676 meters per second. The system looked for the missile 570 meters from where it actually was. It declared no target detected and stood down.

A number smaller than one hundredth of a decimal place. Multiplied by time.

Truncation Is Not Rounding — and That Distinction Cost a Stock Exchange 1,000 Points

Most people treat "rounding" and "truncation" as synonyms. They're not.

Rounding looks at the digit being dropped and adjusts: 2.75 rounds to 2.8 (if keeping one decimal), because the dropped digit (5) rounds up.

Truncation simply cuts: 2.75 becomes 2.7 regardless of what follows. 2.99 becomes 2.9. The number always moves down.

In 1982, the Vancouver Stock Exchange launched with an index value of 1,000.000. By November 1983, the index stood at 524.881 — even though based on actual stock prices it should have been approximately 1,098. The exchange had been recalculating the index over 3,000 times a day using truncation instead of rounding. Each recalculation chopped off value. After more than 2.8 million calculations, the accumulated downward bias eroded nearly half the index.

The fix took one afternoon. They recalculated the correct value, reset the index, and switched to rounding. Total investigation time: a few hours. Total damage: 22 months of meaningless data.

How Accumulated Error Works

Every time a calculation truncates or rounds, it introduces a small error ϵ\epsilon. Over nn calculations, if those errors don't cancel out — particularly if they're systematically biased in one direction, like truncation always biasing downward — the accumulated error grows:

EtotalnϵˉE_{total} \approx n \cdot \bar{\epsilon}

Where ϵˉ\bar{\epsilon} is the average per-step error. Random errors (sometimes positive, sometimes negative) tend to cancel — accumulated error grows as n\sqrt{n}. Systematic errors don't cancel — accumulated error grows linearly with nn.

The Patriot system and the Vancouver exchange both suffered from systematic error: the same direction, every time, compounding without cancellation.

Ariane 5 Flight 501: $370 Million in 40 Seconds

On June 4, 1996, the Ariane 5 rocket self-destructed 37 seconds after launch. The cause was a software module originally written for the Ariane 4 — which had a narrower velocity range. When reused on Ariane 5, which flew faster, a 64-bit floating-point number was converted to a 16-bit signed integer. The value was too large for the 16-bit container. Overflow. The inertial reference system shut down. The backup system — running identical code — also failed. The rocket received nonsensical steering commands and broke apart.

This is a different class of numerical error from rounding — it's overflow, not accumulated drift — but the underlying lesson is the same: the assumption that numbers will behave the way you expect becomes a liability the moment the inputs change.

The Ariane 5 review board's conclusion: "The failure was due to complete loss of guidance and attitude information 37 seconds after initiation of the main engine ignition sequence." Root cause: a numeric conversion that was never validated for the new rocket's flight envelope.

Banker's Rounding: The Rule Designed to Prevent Bias

Standard rounding says: when a number is exactly halfway (like 2.5), round up. Always.

That creates a systematic upward bias in large datasets. Half the values that fall exactly on the midpoint always get rounded the same way.

Banker's rounding — also called round-half-to-even or statistical rounding — eliminates this bias by rounding to the nearest even number when a value is exactly at the midpoint:

ValueStandard RoundingBanker's Rounding
2.53 (round up)2 (round to even)
3.54 (round up)4 (round to even)
4.55 (round up)4 (round to even)
5.56 (round up)6 (round to even)

Python 3, the IEEE 754 floating-point standard, and many financial systems use banker's rounding precisely to avoid the accumulated bias that plagued the Vancouver exchange. The next time Python tells you that round(2.5) is 2, you'll know why.

Significant figures — covered in detail in our sig figs article — are related to this: they're a discipline for communicating how precise your numbers actually are, which determines when rounding errors become meaningful.

Quick Questions

Why can't computers represent 0.1 exactly?

Computers store numbers in binary (base 2). The fraction 0.1 in decimal is 1/101/10 — but 10 is not a power of 2, so the division never terminates in binary. It becomes a repeating binary fraction, like how 1/3 becomes 0.333... in decimal. The computer stores an approximation, and the tiny error accumulates over repeated calculations.

How do engineers prevent accumulated rounding errors?

Several techniques: using higher-precision data types (64-bit double instead of 32-bit float), minimizing the number of intermediate calculations, using compensated summation algorithms (like Kahan summation), and validating numerical behavior against known inputs before deployment. The Patriot battery could have been patched with a simple software update that periodically reset the clock — the patch was available but hadn't been installed at that battery.

Is rounding the same as significant figures?

Related but distinct. Rounding is the mechanical process of reducing decimal places. Significant figures are a convention for communicating the precision of a measurement. When you round to a certain number of significant figures, you're signaling how many digits are reliably known — not just how many decimal places you chose to display.

Round Numbers the Right Way

Choose decimal places, significant figures, or custom rounding rules. See exactly what gets dropped — and how much precision you're actually keeping.

*Supports standard rounding, truncation, ceiling, and floor modes.

Ask AI ✨