Tuesday, September 9, 2008

Costly Programming Error


Text: The Ariane-5 launch on June 4, 1996; it crashed 36 seconds after the launch due to a conversion of a 64-bit floating point into a 16-bit integer value.

Courtesy: Principles Of Model Checking (MIT Press)

2 comments:

Napoleon said...

Also checking of value using = instead of == in C, This happened at AT & T labs during the period of Denis Ritche, Hence they started recommending
if( 5 == C ) { }

instead of

if( c == 5 ) { } so that the complier would catch if there is a typo error ( 5 = c)

Ragu said...

Interesting. Thanks Napoleon.

I know about 5 == c recommendation. But it won't help in many situations since we have to do a == c. So there are limitations what compilers can catch.

The better approach is in the static code analysis.