NaN stands for Not-a-Number. NaN-boxing is a technique that use for dynamically storing data.It optimizes for fast floating-point operations, and for allowing a larger amount of meaningful values to be represented in 64 bits.
NaN-boxing technology: A 64-bit number to represent multiple data types. It saves data by a nan floating point number. It is based on the IEEE-754 floating point standard.
History
The NaN-boxing technology was originally used by Amazon engineers in the javascript engine. Luajit and Rubyjit also use it as a dynamic type to store data.