glibc/sysdeps
Joseph Myers 913d03c864 Fix acosh (1) in round-downward mode (bug 16927).
According to C99 and C11 Annex F, acosh (1) should be +0 in all
rounding modes.  However, some implementations in glibc wrongly return
-0 in round-downward mode (which is what you get if you end up
computing log1p (-0), via 1 - 1 being -0 in round-downward mode).
This patch fixes the problem implementations, by correcting the test
for an exact 1 value in the ldbl-96 implementation to allow for the
explicit high bit of the mantissa, and by inserting fabs instructions
in the i386 implementations; tests of acosh are duly converted to
ALL_RM_TEST.  I believe all the other sysdeps/ieee754 implementations
are already OK (I haven't checked the ia64 versions, but if buggy then
that will be obvious from the results of test runs after this patch is
in).

Tested x86_64 and x86 and ulps updated accordingly.

	[BZ #16927]
	* sysdeps/i386/fpu/e_acosh.S (__ieee754_acosh): Use fabs on x-1
	value.
	* sysdeps/i386/fpu/e_acoshf.S (__ieee754_acoshf): Likewise.
	* sysdeps/i386/fpu/e_acoshl.S (__ieee754_acoshl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Correct
	for explicit high bit of mantissa when testing for argument equal
	to 1.
	* math/libm-test.inc (acosh_test): Use ALL_RM_TEST.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-05-14 12:35:40 +00:00
..
aarch64 Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
alpha Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
arm Clean up ARM old-ABI symbol versioning relics. 2014-05-14 00:41:20 +00:00
generic Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
gnu Silence a missing-noreturn warning for _Unwind_Resume. 2014-05-09 10:06:20 -07:00
hppa Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
i386 Fix acosh (1) in round-downward mode (bug 16927). 2014-05-14 12:35:40 +00:00
ia64 Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
ieee754 Fix acosh (1) in round-downward mode (bug 16927). 2014-05-14 12:35:40 +00:00
init_array Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
m68k Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
mach Some configure-related decrufting. 2014-05-08 11:27:14 -07:00
microblaze Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
mips Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
posix Fix parsing of getai result from nscd for IPv6-only request 2014-05-07 14:21:27 +02:00
powerpc PowerPC: strncpy/stpncpy optimization for PPC64/POWER7 2014-05-06 09:54:25 -05:00
pthread Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s390 S/390: Port of lock elision to System/z 2014-05-09 16:58:46 +02:00
sh Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
sparc Fix v9/64-bit strcmp when string ends in multiple zero bytes. 2014-05-01 12:15:06 -07:00
tile Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
unix Fix macro warning on HAVE_PT_CHOWN 2014-05-14 09:46:54 +02:00
wordsize-32 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wordsize-64 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
x86 Include SSE state in i386 fenv_t (bug 16064). 2014-05-09 16:59:56 +00:00
x86_64 Fix acosh (1) in round-downward mode (bug 16927). 2014-05-14 12:35:40 +00:00