Hacker News new | ask | show | jobs
by vilhelm_s 3011 days ago
There was just a single failure due to the arithmetic bug (and they patched the software the day after it happened). The general bad performance of Patriot missiles in the gulf war was because shooting down ballistic missiles is hard, not because of a discrete bug.

Incidentally, although this is often described as a "floating point bug", the actual arithmetic was 24-bit fixed point. In order to convert from tenths of seconds to seconds they multiplied by 1/10 = 0.00011001100110011001100. If they had used a floating point format with a 24-bit mantissa, they could have multiplied by 2^-3 * 0.110011001100110011001100, giving 4 more bits of precision, which would probably have been enough to intercept the missile! :)

Also perhaps interestingly, the problem only arose because a software upgrade had introduced a new function to do the conversion more accurately, but didn't call it everywhere. If they had used the old inaccurate conversion throughout, the errors would mostly have cancelled out.

See http://www-users.math.umn.edu/~arnold/disasters/patriot.html