Hacker GitHub

← All repos

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

Mentions per year 3 mentions · busiest year 2021 (2)
20082026
  1. 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
  2. …bits, so masking the top portion with the NaN signature makes all of your characters NaNs. [0]: https://github.com/philihp/nanbox