NaN tagging exists since the dawn of time. CDC 6600 had reserved NaN mantissa bits... in 1963! The IEEE floating point standard just carried on these features. Many lisp implementation used NaN for packing data in the 80's/90's. Google for: lisp nan tagged data.