newlib/winsup/mingw/mingwex/isnanf.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

13 lines
280 B
C

#include <math.h>
int
__isnanf (float _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;
}
int __attribute__ ((alias ("__isnanf"))) isnanf (float);