Uncle
Banned
On February 25, 1991, during the Gulf War, an American Patriot Missile battery in Dharan, Saudi Arabia, failed to track and intercept an incoming Iraqi Scud missile. The Scud struck an American Army barracks, killing 28 soldiers and injuring around 100 other people.
It turns out that the cause was an inaccurate calculation of the time since boot due to computer arithmetic errors. Specifically, the time in tenths of second as measured by the system's internal clock was multiplied by 1/10 to produce the time in seconds. This calculation was performed using a 24 bit fixed point register.
24 bit timer stored 0.00011001100110011001100
Error = 0.0000000000000000000000011001100 . . . binary
Where in real numbers it is:
≈ 9.5 x 10−8
Timer running 100 hours : Error = 9.5 x 10−8× 100 × 60 × 60 × 10 = 0.342 seconds
The velocity of a SCUD missile is 1,676 m.s-1
So the error is 1,676 m.s-1 * 0.342 s = 573.192 m
Error > 0.5 km
Source:
UNSW MATH 2 0 8 9 Numerical Methods lecture slides.
The Patriot Missile Failure
An error resulting in a deviation of more than 500 metres is pretty huge, considering it is only a magnitude of 10−8.
The gist:
That's right, 28 people die from an error of 0.000000095
So,
Think twice before you just chop off numbers or just let one divided by square root of 3 equal just 0.5, when it is actually 0.5773502692...
Stop being lazy and just round off to only 1 decimal place or even one whole number when evaluating irrational expressions.