4 ms·
This post is a great reminder of just how much we need to respect the people who write or have written system libraries. Even simple things can be so complicate
by abhinai 8y ago
This post is a great reminder of just how much we need to respect the people who write or have written system libraries. Even simple things can be so complicated when you have to factor for all eventualities. A rocket could blow up because the library function you wrote didn't account for floating point arithmetic correctly.
- adwn 8y ago> A rocket could blow up because the library function you wrote didn't account for floating point arithmetic correctly. I would go so far as to say that using floating point in any software that might cause the rocket to blow up is probably Doing It Wrong (TM). That does not include the video encoder sending a livestream to the ground station, but it does include the µC that controls the engine turbopumps.
- lhjuhafjbh 8y agoA microcontroller for a pump probably doesn't need floating point numbers, but flight control software uses it. This went wrong before and an Ariane 5 was blown up (automatically as a safety measure), see https://en.wikipedia.org/wiki/Cluster_(spacecraft)#Launch_failure https://en.wikipedia.org/wiki/Cluster_(spacecraft)#Launch_fa... Strictly speaking the problem was converting floats to 16-bit integers which ended in an overflow... So avoiding floats doesn't even help as it won't protect you from overflows.