4 ms·
NaN is a float according to IEEE754. All numbers in Javascript being floats, it makes sense that typeof NaN === "number". Now, the fact that IEEE754 is insane
by ohgodplsno 5y ago
NaN is a float according to IEEE754. All numbers in Javascript being floats, it makes sense that typeof NaN === "number".
Now, the fact that IEEE754 is insane is something else, but JS does nothing wrong (aside from not having not-floats)
- Ginden 5y ago> Now, the fact that IEEE754 is insane is something else, but JS does nothing wrong (aside from not having not-floats) JS has BigInt - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- ohgodplsno 5y agoBigInt is relatively recent, all things considered. JS only having floats is a conception flaw.