2 ms·
Most languages have some kind of isNaN(value) method in my experience. Even C and C++ have an isnan method (C since ±1999, but other platforms had the macro bef
by jeroenhd 4y ago
Most languages have some kind of isNaN(value) method in my experience. Even C and C++ have an isnan method (C since ±1999, but other platforms had the macro before: https://repo.or.cz/w/glibc.git/blob/HEAD:/sysdeps/ieee754/dbl-64/s_isnan.c https://repo.or.cz/w/glibc.git/blob/HEAD:/sysdeps/ieee754/db...)
People do probably rely on NaN ≠ NaN but I think that's more of a side effect of compatibility than anything else.
- morelisp 4y agoGo's implementation of math.IsNaN is return f != f