Making Floating Point Calculations Less Cursed When Accuracy Matters

An unfortunate reality of trying to represent continuous real numbers in a fixed space (e.g. with a limited number of bits) is that this comes with an inevitable loss of both precision and accuracy. Although floating point arithmetic standards – like the commonly used IEEE 754 – seek to minimize this error, it’s inevitable that across the range of a floating point variable loss of precision occurs. This is what [exozy] demonstrates, by showing just how big the error can get when performing a simple division of the exponential of an input value by the original value. This results in an amazing error of over 10%, which leads to the question of how to best fix this.


This is a companion discussion topic for the original entry at https://hackaday.com/2024/03/14/making-floating-point-calculations-less-cursed-when-accuracy-matters/