▲ | zX41ZdbW 2 days ago | |
This is a great article! A few more resources on this topic: https://randomascii.wordpress.com/category/floating-point/ - a series of articles about floating point, with deeper details. https://float.exposed/ - explorer of floating point values by Bartosz Ciechanowski. | ||
▲ | zX41ZdbW 2 days ago | parent | next [-] | |
Fun facts about floating point, from my practice: Obvious: An array containing NaNs will almost certainly be sorted incorrectly with std::sort. Non-obvious: sorting an array containing NaNs with std::sort from libstdc++ (gcc's implementation) could lead to a buffer overflow. Non-obvious: using MMX instructions without clearing the FPU state leads to incorrect results of floating-point instructions in other parts of the code base: https://github.com/simdjson/simdjson/issues/169 | ||
▲ | extraduder_ire 2 days ago | parent | prev [-] | |
I love that float.exposed website. Really nails home a point I saw made a few years ago about how there's only a few billion possible floats, so you can often test them all. |