+ 1

# Is NaN equal to 0

3 ответов

+ 9

I think it's not
NaN is Not a Number
while 0 is still a number
so....0==NaN return false (not a number is not equal to number surely)
But I feel kinda strange bc
0 can be false value and
NaN can be false value,too 😐
*Experiment*

+ 7

In some programming languages, it is. But in computation, generally it is not.
Its like saying:
Nothing is a number
Doesn't make sense right? Though you may be saying 0 is technically nothing for a computer or for us, but you can be wrong.
One key example is Base Values, lets say that I have a Base2 value, 1001 (its 9 in Base10). If I say that 0 represents nothing, and go remove the 0s to become 11, now that would become a totally different value already isn't it?
Not clear enough?
101 is Not 11
10000 is Not 1
Hence, 0 is not empty or nothing.

+ 3

:O....
Wen Qin!! I respect you!