1 /*
2  * isinf(x) returns 1 if x is infinity, else 0;
3  * no branching!
4  * Added by Cygnus Support.
5  */
6 
7 #include "fdlibm.h"
8 
9 #ifndef _DOUBLE_IS_32BITS
10 
11 #ifdef __STDC__
isinf(double x)12 	int isinf(double x)
13 #else
14 	int isinf(x)
15 	double x;
16 #endif
17 {
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);
24 }
25 
26 #endif /* _DOUBLE_IS_32BITS */
27