> Errors in the software of the radiation therapy machine Therac-25…
Caused by unsigned 8-bit integer overflow combined with (presumably) treating 0 as falsy. May or may not have been solved by using Rust (but probably wouldn't have because it sounds like a logic error in "clever" code).
> Errors in the software of a MIM-104 Patriot…
Caused by loss of precision in floating-point calculations. Would not have been solved by using Rust.
The other two were more likely human or mechanical than (unspecified) software errors.
Integer overflow is defined to panic in debug builds, and either do that or two's compliment overflow in release builds. The current implementation overflows. However, zero is not false.
I assume that treating 0 as false was intentional in this case (it probably was written in PDP-11 ASM) and a direct translation of the Therac code therefore would be
Caused by unsigned 8-bit integer overflow combined with (presumably) treating 0 as falsy. May or may not have been solved by using Rust (but probably wouldn't have because it sounds like a logic error in "clever" code).
> Errors in the software of a MIM-104 Patriot…
Caused by loss of precision in floating-point calculations. Would not have been solved by using Rust.
The other two were more likely human or mechanical than (unspecified) software errors.