newlib/winsup/mingw/mingwex/isnan.c
Danny Smith dc8971488e * include/_mingw.h: Increment version to 2.0.
* Makefile.in: Ditto.
	Merge in mingwex branch.
2002-06-13 10:20:48 +00:00

15 lines
292 B
C

#include <math.h>
int
__isnan (double _x)
{
unsigned short _sw;
__asm__ ("fxam;"
"fstsw %%ax": "=a" (_sw) : "t" (_x));
return (_sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
#undef isnan
int __attribute__ ((alias ("__isnan"))) isnan (double);