diff options
Diffstat (limited to 'libquadmath/math/sinq_kernel.c')
-rw-r--r-- | libquadmath/math/sinq_kernel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libquadmath/math/sinq_kernel.c b/libquadmath/math/sinq_kernel.c index 395fcaba9cb..86034551d43 100644 --- a/libquadmath/math/sinq_kernel.c +++ b/libquadmath/math/sinq_kernel.c @@ -99,10 +99,10 @@ __quadmath_kernel_sinq (__float128 x, __float128 y, int iy) { /* So that we don't have to use too large polynomial, we find l and h such that x = l + h, where fabsl(l) <= 1.0/256 with 83 - possible values for h. We look up cosl(h) and sinl(h) in - pre-computed tables, compute cosl(l) and sinl(l) using a + possible values for h. We look up cosq(h) and sinq(h) in + pre-computed tables, compute cosq(l) and sinq(l) using a Chebyshev polynomial of degree 10(11) and compute - sinl(h+l) = sinl(h)cosl(l) + cosl(h)sinl(l). */ + sinq(h+l) = sinq(h)cosq(l) + cosq(h)sinq(l). */ index = 0x3ffe - (tix >> 16); hix = (tix + (0x200 << index)) & (0xfffffc00 << index); x = fabsq (x); @@ -116,7 +116,7 @@ __quadmath_kernel_sinq (__float128 x, __float128 y, int iy) SET_FLT128_WORDS64(h, ((uint64_t)hix) << 32, 0); if (iy) - l = y - (h - x); + l = (ix < 0 ? -y : y) - (h - x); else l = x - h; z = l * l; |