philihp/nanbox
View on GitHub ↗ ★ 20 TypeScript
Encode non-numerical data as NaNs
3 mentions on Hacker News by 2 people: 1 story, 2 comments · first 2021-09-30 · latest 2022-07-17
20082026
-
https://github.com/philihp/nanbox You don't even need a Double, you can use a Float NaN to encode strings: > IEEE 754 encodes 32-bit floating points with 1 bit for the sign, 8 bits for the exponent, and 23 bits for the number part…
comment by ElectricalUnion · 2022-07-17 · in Integer math in JavaScript -
…bits, so masking the top portion with the NaN signature makes all of your characters NaNs. [0]: https://github.com/philihp/nanbox
comment by jitl · 2021-09-30 · in NansAreNumbers – An esoteric data type built of NaNs -
▲ 1
Nanbox: Encode non-numerical data as NaNsstory by jitl · 2021-09-30 · 0 comments