Practice question · Multiple choice
In 1996 the Ariane 5 rocket destroyed itself 37 seconds after launch, from converting a 64-bit float to a 16-bit integer that overflowed. What is the general lesson?
Hints
- The code had flown successfully for years. Ask what changed.
- The value that overflowed was horizontal velocity. What was different about Ariane 5?
Show the answer
C. That representable range is part of a program's contract
Why
The software was correct, for Ariane 4. A faster rocket produced a velocity outside the 16-bit range, and reuse carried the code across without re-checking its assumptions. Range is part of the contract, and 370 million dollars was the cost of an implicit precondition.
Practise Floating-Point Numbers
The app has 6 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.
More questions on Floating-Point Numbers
- Sort each way of comparing two floating-point values.
- In that same toy system, representable values are spaced 0.25 apart. What is the largest possible round-off…
- Select every statement about floating-point arithmetic that is TRUE.
- Floating-point numbers are spaced evenly in a toy system like 1.0, 1.25, 1.5, 1.75, 2.0 - but across the full…