From: Joseph Myers Date: Thu, 21 Jun 2012 19:26:09 +0000 (+0000) Subject: Fix wordsize-64 cosh regression (bug 14273). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=725b8ee08aff8f6a6edf3de90c5e7ef0ffcae2f8;p=thirdparty%2Fglibc.git Fix wordsize-64 cosh regression (bug 14273). (cherry picked from commit b7abb4bf78443f4f8d05a9dfa768fdee65b99d42) --- diff --git a/ChangeLog b/ChangeLog index 6a9c536141c..cfc58359415 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,11 @@ 2012-06-21 Joseph Myers + [BZ #14273] + * sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c (__ieee754_cosh): + Clear sign bit of 64-bit integer value before comparing against + overflow value. + [BZ #14167] * aclocal.m4 (LIBC_TRY_CC_OPTION): New macro. * configure: Regenerated. diff --git a/NEWS b/NEWS index a804824d8f5..357e31cc194 100644 --- a/NEWS +++ b/NEWS @@ -10,7 +10,7 @@ Version 2.15.1 * The following bugs are resolved with this release: 411, 2547, 2548, 11365, 11494, 13583, 13731, 13732, 13733, 13747, 13748, - 13749, 13753, 13771, 13774, 13786, 14048, 14059, 14167 + 13749, 13753, 13771, 13774, 13786, 14048, 14059, 14167, 14273 Version 2.15 diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c b/sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c index 41dc42c0af5..b8aadabb0eb 100644 --- a/sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c +++ b/sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c @@ -67,6 +67,7 @@ __ieee754_cosh (double x) /* |x| in [log(maxdouble), overflowthresold] */ int64_t fix; EXTRACT_WORDS64(fix, x); + fix &= UINT64_C(0x7fffffffffffffff); if (fix <= UINT64_C(0x408633ce8fb9f87d)) { w = __ieee754_exp(half*fabs(x)); t = half*w;