]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix ldbl-128ibm sinhl spurious overflows (bug 19350).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 9 Dec 2015 22:37:08 +0000 (22:37 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 9 Dec 2015 22:37:08 +0000 (22:37 +0000)
The ldbl-128ibm implementation of sinhl uses a slightly too small
overflow threshold (similar to bug 16407 for coshl).  This patch fixes
it to use a safe threshold (so that values whose high part is above
the value compared with definitely result in an overflow in all
rounding modes).

Tested for powerpc.

[BZ #19350]
* sysdeps/ieee754/ldbl-128ibm/e_sinhl.c (__ieee754_sinhl):
Increase overflow threshold.

ChangeLog
sysdeps/ieee754/ldbl-128ibm/e_sinhl.c

index b76c54b9a536672cf9e0439b7a9c5d0873a55249..1c7b198d5414f048163a57936e20f723a0f5f2ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-12-09  Joseph Myers  <joseph@codesourcery.com>
 
+       [BZ #19350]
+       * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c (__ieee754_sinhl):
+       Increase overflow threshold.
+
        [BZ #19349]
        * sysdeps/ieee754/ldbl-128ibm/s_tanhl.c (__tanhl): Return argument
        when small.
index 29700ad4abec23d0382e73dbfdf77da738dd4885..67d9d24ce776f93e9f852cae6effb15f7a5936d9 100644 (file)
@@ -67,7 +67,7 @@ __ieee754_sinhl(long double x)
        if (ix < 0x40862e42fefa39efLL)  return h*__ieee754_expl(fabsl(x));
 
     /* |x| in [log(maxdouble), overflowthresold] */
-       if (ix <= 0x408633ce8fb9f87dLL) {
+       if (ix <= 0x408633ce8fb9f87eLL) {
            w = __ieee754_expl(0.5*fabsl(x));
            t = h*w;
            return t*w;