2 /* @(#)z_isnanf.c 1.0 98/08/13 */
3 /******************************************************************
7 * x - pointer to a floating point value
10 * An integer that indicates if the number is NaN.
13 * This routine returns an integer that indicates if the number
14 * passed in is NaN (1) or is finite (0).
16 *****************************************************************/
22 _DEFUN (isnanf
, (float),
28 GET_FLOAT_WORD (wx
, x
);
29 exp
= (wx
& 0x7f800000) >> 23;
31 if ((exp
== 0x7f8) && (wx
& 0x7fffff))
38 #ifdef _DOUBLE_IS_32BITS
41 _DEFUN (isnan
, (double),
44 return isnanf((float) x
);
47 #endif /* defined(_DOUBLE_IS_32BITS) */