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 #include "fdlibm.h" 19 #include <ieeefp.h> 20 21 #undef isinff 22 23 int isinff(float x)24isinff (float x) 25 { 26 __int32_t ix; 27 GET_FLOAT_WORD(ix,x); 28 ix &= 0x7fffffff; 29 return FLT_UWORD_IS_INFINITE(ix); 30 } 31 32 #undef isinf 33 34 _MATH_ALIAS_i_f(isinf) 35