1 /*
2 Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
3 
4 Developed at SunPro, a Sun Microsystems, Inc. business.
5 Permission to use, copy, modify, and distribute this
6 software is freely granted, provided that this notice
7 is preserved.
8  */
9 /*
10  * isinff(x) returns 1 if x is +-infinity, else 0;
11  *
12  * isinf is a <math.h> macro in the C99 standard.  It was previously
13  * implemented as isinf and isinff functions by newlib and are still declared
14  * as such in <math.h>.  Newlib supplies it here as a function if the user
15  * chooses to use it instead of the C99 macro.
16  */
17 
18 #define _ADD_D_TO_DOUBLE_FUNCS
19 
20 #include "fdlibm.h"
21 
22 #undef isinff
23 
24 int
isinff(float x)25 isinff (float x)
26 {
27 	__int32_t ix;
28 	GET_FLOAT_WORD(ix,x);
29 	ix &= 0x7fffffff;
30 	return FLT_UWORD_IS_INFINITE(ix);
31 }
32 
33 #undef isinf
34 
35 _MATH_ALIAS_i_f(isinf)
36 #ifdef _DOUBLE_IS_32BITS
37 #define isinfd __isinfd
38 _MATH_ALIAS_i_d_to_f(isinf)
39 #endif
40