Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: