A single number too big for its box destroyed a rocket 37 seconds after launch.
On 4 June 1996, Europe's new Ariane 5 rocket veered off course and self-destructed on its first flight, taking four science satellites with it. The cause was old software reused from Ariane 4, converting a number that no longer fitted. It became one of the most expensive software bugs in history.
Ariane 5 reused the inertial reference software from its highly successful predecessor. One routine, an alignment function, kept running for about 40 seconds after lift-off, as Ariane 4 had required, though it served no purpose on Ariane 5. The new rocket flew a different early trajectory with much higher horizontal velocity, so a value called horizontal bias grew far larger than ever before.
The software converted that value from a 64-bit floating-point number into a 16-bit signed integer. It did not fit, and the conversion triggered an overflow exception. Programmers had protected only four of seven critical variables against overflow, to keep the computer's workload under a target of 80 per cent, relying on assumptions that were true for Ariane 4 but not for Ariane 5. The specification said any detected exception should stop the processor.
So it did, and because the backup unit ran identical software, it failed in exactly the same way. The main computer then read a diagnostic error pattern as if it were flight data and swung the engine nozzles to full deflection. The rocket pitched past 20 degrees, began to break apart, and destroyed itself. The loss exceeded 370 million dollars.
The inquiry, led by Jacques-Louis Lions, noted that the whole programme had been designed to guard against random hardware failures, while this was a design error, and that redundancy is useless when both copies share the same bug. The routine had never been tested against Ariane 5's trajectory. The disaster spurred research into software reliability, including the first large-scale use of static code analysis by abstract interpretation. Replacement Cluster satellites flew in 2000.
Source: Wikipedia — Ariane flight V88 · Text summarised from Wikipedia (CC BY-SA 4.0)