3 ms·
> Yes, it's goofy that typeof (NaN) == 'number'. You should be harsher on him. NaN is definitely a number in practically every programming language. (typ
by SeanLuke 14y ago
> Yes, it's goofy that typeof (NaN) == 'number'.
You should be harsher on him. NaN is definitely a number in practically every programming language.
(type-of (/ 0.0 0.0))
SINGLE-FLOAT
System.err.println((new Double(0.0/0.0)) instanceof Number)
true
from types import *
type(1e10000 / 1e10000)
<type 'float'>
It looks like the blogger is just out and out mistaken. But there's more. The poster goes on about NaN not being easy to check for: not realizing that it's the only value which is never equal to itself. He even thinks this is a bug.