Any value where all 11 bits of the exponent are set to "1" are considered NaN in IEEE 754-1985.
From that perspective the heading should have been
NaN (not a number)
JavaScript's problem was that it only supports the floating point format (now there's BigInt though that's not as performant as sticking to integers that can be represented accurately within the 53 bit signifcand).
Furthermore isNaN() exists for backward compatibility. New code should be using Number.isNaN() instead:
The thing is:
What Every Programmer Should Know About Floating-Point Arithmetic or Why don’t my numbers add up?
Any value where all 11 bits of the exponent are set to "1" are considered
NaN
in IEEE 754-1985.From that perspective the heading should have been
JavaScript's problem was that it only supports the floating point format (now there's BigInt though that's not as performant as sticking to integers that can be represented accurately within the 53 bit signifcand).
Furthermore
isNaN()
exists for backward compatibility. New code should be using Number.isNaN() instead: