Mercurial > hg > CbC > CbC_gcc
diff libquadmath/math/isinfq.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 561a7518be6b |
children |
line wrap: on
line diff
--- a/libquadmath/math/isinfq.c Thu Oct 25 07:37:49 2018 +0900 +++ b/libquadmath/math/isinfq.c Thu Feb 13 11:34:05 2020 +0900 @@ -4,14 +4,23 @@ * Public domain. */ +#if defined(LIBM_SCCS) && !defined(lint) +static char rcsid[] = "$NetBSD: $"; +#endif + +/* + * isinfq(x) returns 1 if x is inf, -1 if x is -inf, else 0; + * no branching! + */ + #include "quadmath-imp.h" int isinfq (__float128 x) { - int64_t hx,lx; - GET_FLT128_WORDS64(hx,lx,x); - lx |= (hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL; - lx |= -lx; - return ~(lx >> 63) & (hx >> 62); + int64_t hx,lx; + GET_FLT128_WORDS64(hx,lx,x); + lx |= (hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL; + lx |= -lx; + return ~(lx >> 63) & (hx >> 62); }