comparison libquadmath/math/finiteq.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 561a7518be6b
children 1830386684a0
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* s_finitel.c -- long double version of s_finite.c. 1 /* finiteq.c -- __float128 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 * ====================================================
13 * ==================================================== 13 * ====================================================
14 */ 14 */
15 15
16 #include "quadmath-imp.h" 16 #include "quadmath-imp.h"
17 17
18 /*
19 * finiteq(x) returns 1 is x is finite, else 0;
20 * no branching!
21 */
22
18 int 23 int
19 finiteq (const __float128 x) 24 finiteq (const __float128 x)
20 { 25 {
21 int64_t hx; 26 int64_t hx;
22 GET_FLT128_MSW64(hx,x); 27 GET_FLT128_MSW64(hx,x);
23 return (int)((uint64_t)((hx&0x7fffffffffffffffLL) 28 return (int)((uint64_t)((hx&0x7fff000000000000LL)
24 -0x7fff000000000000LL)>>63); 29 -0x7fff000000000000LL)>>63);
25 } 30 }