Mercurial > hg > CbC > CbC_gcc
comparison libquadmath/math/finiteq.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* finiteq.c -- __float128 version of s_finite.c. | 1 /* s_finitel.c -- long double version of s_finite.c. |
2 * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz. | 2 * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz. |
3 */ | 3 */ |
4 | 4 |
5 /* | 5 /* |
6 * ==================================================== | 6 * ==================================================== |
11 * software is freely granted, provided that this notice | 11 * software is freely granted, provided that this notice |
12 * is preserved. | 12 * is preserved. |
13 * ==================================================== | 13 * ==================================================== |
14 */ | 14 */ |
15 | 15 |
16 #include "quadmath-imp.h" | 16 #if defined(LIBM_SCCS) && !defined(lint) |
17 static char rcsid[] = "$NetBSD: $"; | |
18 #endif | |
17 | 19 |
18 /* | 20 /* |
19 * finiteq(x) returns 1 is x is finite, else 0; | 21 * finiteq(x) returns 1 is x is finite, else 0; |
20 * no branching! | 22 * no branching! |
21 */ | 23 */ |
22 | 24 |
23 int | 25 #include "quadmath-imp.h" |
24 finiteq (const __float128 x) | 26 |
27 int finiteq(__float128 x) | |
25 { | 28 { |
26 int64_t hx; | 29 int64_t hx; |
27 GET_FLT128_MSW64(hx,x); | 30 GET_FLT128_MSW64(hx,x); |
28 return (int)((uint64_t)((hx&0x7fff000000000000LL) | 31 return (int)((uint64_t)((hx&0x7fff000000000000LL) |
29 -0x7fff000000000000LL)>>63); | 32 -0x7fff000000000000LL)>>63); |
30 } | 33 } |