This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Fix ldbl-128ibm asinhl inaccuracy (bug 16385)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Date: Wed, 1 Jan 2014 18:41:31 +0000
- Subject: Fix ldbl-128ibm asinhl inaccuracy (bug 16385)
- Authentication-results: sourceware.org; auth=none
This patch fixes bug 16385, ldbl-128ibm asinhl inaccuracy, which
showed up while attempting to regenerate ulps for powerpc-nofpu for
2.19. The problem here was use of fabs instead of fabsl meaning large
arguments were reduced to the precision of double. Tested for
powerpc-nofpu.
2014-01-01 Joseph Myers <joseph@codesourcery.com>
[BZ #16385]
* sysdeps/ieee754/ldbl-128ibm/s_asinhl.c (__asinhl): Use fabsl not
fabs.
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_asinhl.c b/sysdeps/ieee754/ldbl-128ibm/s_asinhl.c
index 63c6edb..043b151 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_asinhl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_asinhl.c
@@ -48,7 +48,7 @@ long double __asinhl(long double x)
if(huge+x>one) return x; /* return x inexact except 0 */
}
if(ix>0x41b0000000000000LL) { /* |x| > 2**28 */
- w = __ieee754_logl(fabs(x))+ln2;
+ w = __ieee754_logl(fabsl(x))+ln2;
} else if (ix>0x4000000000000000LL) { /* 2**28 > |x| > 2.0 */
t = fabs(x);
w = __ieee754_logl(2.0*t+one/(__ieee754_sqrtl(x*x+one)+t));
--
Joseph S. Myers
joseph@codesourcery.com