ack/lang/cem/libcc.ansi/core/math/isnan.c
David Given d1cdb07719 Realise that the libc core can safely call other libc core functions, even if
they're not defined in the core: so putw() can call stdio stuff, for example.
So the earlier concept of pureness isn't necessary. Rename accordingly.
2018-06-21 23:24:23 +02:00

12 lines
194 B
C

__IsNan(double d)
{
#if defined(__vax) || defined(__pdp)
#else
float f = d;
if ((*((long*)&f) & 0x7f800000) == 0x7f800000 && (*((long*)&f) & 0x007fffff) != 0)
return 1;
#endif
return 0;
}