Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / common / sf_isinf.c
blob75e90c9fd2adde045bb2903f657cb91f330c55ac
1 /*
2 * isinff(x) returns 1 if x is +-infinity, else 0;
4 * isinf is a <math.h> macro in the C99 standard. It was previously
5 * implemented as isinf and isinff functions by newlib and are still declared
6 * as such in <math.h>. Newlib supplies it here as a function if the user
7 * chooses to use it instead of the C99 macro.
8 */
10 #include "fdlibm.h"
11 #include <ieeefp.h>
13 #undef isinff
15 int
16 isinff (float x)
18 __int32_t ix;
19 GET_FLOAT_WORD(ix,x);
20 ix &= 0x7fffffff;
21 return FLT_UWORD_IS_INFINITE(ix);
24 #ifdef _DOUBLE_IS_32BITS
26 #undef isinf
28 int
29 isinf (double x)
31 return isinff((float) x);
34 #endif /* defined(_DOUBLE_IS_32BITS) */