diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/e_remainderl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/e_remainderl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c b/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c index 800416f29a..efa83bdab7 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c @@ -31,7 +31,7 @@ long double __ieee754_remainderl(long double x, long double p) { int64_t hx,hp; - u_int64_t sx,lx,lp; + uint64_t sx,lx,lp; long double p_half; double xhi, xlo, phi, plo; @@ -42,8 +42,14 @@ __ieee754_remainderl(long double x, long double p) EXTRACT_WORDS64 (hp, phi); EXTRACT_WORDS64 (lp, plo); sx = hx&0x8000000000000000ULL; + lp ^= hp & 0x8000000000000000ULL; hp &= 0x7fffffffffffffffLL; + lx ^= sx; hx &= 0x7fffffffffffffffLL; + if (lp == 0x8000000000000000ULL) + lp = 0; + if (lx == 0x8000000000000000ULL) + lx = 0; /* purge off exception values */ if(hp==0) return (x*p)/(x*p); /* p = 0 */ |