Much ado about NaN

6 · John Cook · Sept. 30, 2021, 8:47 p.m.
I ran across a GitHub repo today that features an amusing hack using the sign bit of NaNs for unintended purposes. This is an example of how IEEE floating point numbers have a lot of leftover space devoted to NaNs and infinities. However, relative to the enormous number of valid 64-bit floating point numbers, this […] The post Much ado about NaN first appeared on John D. Cook....