Re:Aztec monks with 1/55 HP no longer die when picking up or...
by zelphirkalt on Saturday April 15, 2023 @06:25AM
(#35579266)
This effect becomes more pronounced, when substracting (but probably also adding) small amounts from big amounts, because more bits are needed to store the big number's more significant digits and floats then lose bits for the less significant digits. That is why, if one needs precision, needs to sort numbers first and then start calculating with the smallest numbers first, working ones way up to the bigger numbers.
[ Parent
| on HN ]
Re:Aztec monks with 1/55 HP no longer die when picking up or...
by pixelfarmer on Monday April 17, 2023 @04:17AM
(#35598047)
Knuth has an entire chapter dedicated to floats, error ranges and such, which includes pretty much that (a+b)+c != a+(b+c) for floats, which in turn breaks tons of things on the math side already. That is such a large issue that it has some serious consequences in the real world, e.g. constructions failing, or I remember the Patriot missile system having problems from that side.