Comment by bogomipz

4 years ago

>"Sure it matters if you are a hardware guy, or need to work with serialized floats, or some NaN-boxing trickery"

Might you or someone else elaborate on what "NaN-boxing trickery" is and why such "trickery" is needed?

There are 13 bits that are unused in the NaN representation, so you can put data in there without impeding your ability to represent every floating point value.

For example, if you are designing a scripting language interpreter, you can make every value a floating point number and use some of the NaNs to represent pointers, booleans, etc.

See also http://wingolog.org/archives/2011/05/18/value-representation...