Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / common / s_isinfd.c
blob771ce44e4409f7997b3c4d6a53d4cf6cc658ab29
1 /*
2 * __isinfd(x) returns 1 if x is infinity, else 0;
3 * no branching!
4 * Added by Cygnus Support.
5 */
7 #include "fdlibm.h"
9 #ifndef _DOUBLE_IS_32BITS
11 int
12 __isinfd (double x)
14 __int32_t hx,lx;
15 EXTRACT_WORDS(hx,lx,x);
16 hx &= 0x7fffffff;
17 hx |= (__uint32_t)(lx|(-lx))>>31;
18 hx = 0x7ff00000 - hx;
19 return 1 - (int)((__uint32_t)(hx|(-hx))>>31);
22 #endif /* _DOUBLE_IS_32BITS */