The Secret Life of NaN
Summary
The article explains Not-a-Number (NaN) representations per IEEE 754-2008, including quiet vs signaling NaNs, and how modern runtimes (e.g., JavaScriptCore) use NaN-boxing to encode multiple value types in 64 bits. It also discusses trade-offs and security implications with references to real-world vulnerabilities.