fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libm / math / s_isinf.c
blob87f099566b669f7deef610cd948571088440f5d1
1 /*
2 * isinf(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 #ifdef __STDC__
12 int isinf(double x)
13 #else
14 int isinf(x)
15 double x;
16 #endif
18 __int32_t hx,lx;
19 EXTRACT_WORDS(hx,lx,x);
20 hx &= 0x7fffffff;
21 hx |= (__uint32_t)(lx|(-lx))>>31;
22 hx = 0x7ff00000 - hx;
23 return 1 - (int)((__uint32_t)(hx|(-hx))>>31);
26 #endif /* _DOUBLE_IS_32BITS */