3 ms·
Interesting that there are 15*(2^47) unused values in this scheme in the range FFFF:xxx1:xxxx:xxxx - FFFF:xxxF:xxxx:xxxx. Could these be put to any practical us
by AprilArcus 4y ago
Interesting that there are 15*(2^47) unused values in this scheme in the range FFFF:xxx1:xxxx:xxxx - FFFF:xxxF:xxxx:xxxx. Could these be put to any practical use?
- ElectricalUnion 4y agohttps://github.com/philihp/nanbox 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 (mantissa). (...) > 23 bits isn't much space, but conveniently the max size of a Unicode codepoint is 0x10FFFF, making it a 22-bit charset. When you encode your strings in UTF-32, you're only going to be using 22 of those bits, so masking the top portion with the NaN signature makes all of your characters NaNs.