Fix ldbl-128ibm asinhl inaccuracy (bug 18020).

System Internals / glibc - Joseph Myers [codesourcery.com] - 25 February 2015 05:13 UTC

The ldbl-128ibm implementation of asinhl uses cut-offs of 0x1p28 and 0x1p-29 to determine when to use simpler formulas that avoid possible overflow / underflow. Both those cut-offs are inappropriate for this format, resulting in large errors. This patch changes the code to use more appropriate cut-offs of 0x1p56 and 0x1p-56, adding tests around the cut-offs for various floating-point formats.

Tested for powerpc. Also tested for x86_64 and x86 and updated ulps.

[BZ #18020]
- sysdeps/ieee754/ldbl-128ibm/s_asinhl.c (__asinhl): Use 2**56 and 2**-56 not 2**28 and 2**-29 as thresholds for simpler formulas.
- math/auto-libm-test-in: Add more tests of asinh.
- math/auto-libm-test-out: Regenerated.
- sysdeps/i386/fpu/libm-test-ulps: Update.
- sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

137cef7 Fix ldbl-128ibm asinhl inaccuracy (bug 18020).
ChangeLog | 10 +
NEWS | 2 +-
math/auto-libm-test-in | 61 ++
math/auto-libm-test-out | 1685 ++++++++++++++++++++++++++++++++
sysdeps/i386/fpu/libm-test-ulps | 8 +-
sysdeps/ieee754/ldbl-128ibm/s_asinhl.c | 8 +-
sysdeps/x86_64/fpu/libm-test-ulps | 27 +-
7 files changed, 1779 insertions(+), 22 deletions(-)

Upstream: sourceware.org


  • Share