ack/lang/cem/libcc.ansi/pure/math/isnan.c
2018-06-21 23:00:33 +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;
}