Floats

I just read about a tiny computer bug that ended up costing the loss of a $370-million space craft. It reminds me of one of the things I learned at school: Floats deserve extra respect!

Because of the different flight path, a data conversion from a 64-bit floating point to 16-bit signed integer value caused a hardware exception (more specifically, an arithmetic overflow, as the floating point number had a value too large to be represented by a 16-bit signed integer). Efficiency considerations had led to the disabling of the software handler (in Ada code) for this error trap, although other conversions of comparable variables in the code remained protected. This led to a cascade of problems, culminating in destruction of the entire flight.

Tags: [, ]

Comments