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 * __isinfd(x) returns 1 if x is infinity, else 0;
11 * no branching!
12 * Added by Cygnus Support.
13 */
14
15 #define __isinf __isinfd
16
17 #include "fdlibm.h"
18
19 #ifdef _NEED_FLOAT64
20
21 int
__isinf64(__float64 x)22 __isinf64 (__float64 x)
23 {
24 __int32_t hx,lx;
25 EXTRACT_WORDS(hx,lx,x);
26 hx &= 0x7fffffff;
27 hx |= (__uint32_t)(lx|(-lx))>>31;
28 hx = 0x7ff00000 - hx;
29 return 1 - (int)((__uint32_t)(hx|(-hx))>>31);
30 }
31
32 _MATH_ALIAS_i_d(__isinf)
33
34 #endif /* _NEED_FLOAT64 */
35