This preview shows page 1. Sign up to view the full content.
Unformatted text preview: se, but on most machines the result will either be ÌÅ Ü Û or ÌÅ Ò Û , where Û is the number of bits in an int.
Aside: Ariane 5: the high cost of ﬂoating-point overﬂow Converting large ﬂoating-point numbers to integers is a common source of programming errors. Such an error had particularly disastrous consequences for the maiden voyage of the Ariane 5 rocket, on June 4, 1996. Just 37 seconds after lift-off, the rocket veered off its ﬂight path, broke up, and exploded. On board the rocket were communication satellites, valued at $500 million. A later investigation  showed that the computer controlling the inertial navigation system had sent invalid data to the computer controlling the engine nozzles. Instead of sending ﬂight control information, it had sent a diagnostic bit pattern indicating that, in an effort to convert a 64-bit ﬂoating point number into a 16-bit signed integer, an overﬂow had been encountered. The value that overﬂowed measured the horizontal velocity of the rocket, which could be more than ﬁve times higher tha...
View Full Document
- Spring '10
- The American