1 /* sf_c_isnan.c -- float version of s_c_isnan.c.
2  */
3 
4 /*
5  * ====================================================
6  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
7  *
8  * Developed at SunPro, a Sun Microsystems, Inc. business.
9  * Permission to use, copy, modify, and distribute this
10  * software is freely granted, provided that this notice
11  * is preserved.
12  * ====================================================
13  */
14 
15 /*
16  * isnanf(x) returns 1 is x is nan, else 0;
17  *
18  * isnanf is an extension declared in <math.h>.
19  */
20 
21 #include "fdlibm.h"
22 #include <ieeefp.h>
23 
24 #undef isnanf
25 
26 int
isnanf(float x)27 isnanf (float x)
28 {
29 	__int32_t ix;
30 	GET_FLOAT_WORD(ix,x);
31 	ix &= 0x7fffffff;
32 	return FLT_UWORD_IS_NAN(ix);
33 }
34 
35 #undef isnan
36 
37 _MATH_ALIAS_i_f(isnan)
38