glibc/sysdeps
Joseph Myers b72592e75f Fix log10 (1) in round-downward mode (bug 16977).
As with various other issues of this kind, bug 16977 is log10 (1)
wrongly returning -0 rather than +0 in round-downward mode because of
an implementation effectively in terms of log1p (x - 1).  This patch
fixes the issue in the same way used for log.

Tested x86_64 and x86 and ulps updated accordingly.  Also tested for
mips64 to confirm a fix was needed for ldbl-128 and to validate that
fix (also applied to ldbl-128ibm since that version of logl is
essentially the same as the ldbl-128 one).

	[BZ #16977]
	* sysdeps/i386/fpu/e_log10.S (__ieee754_log10): Take absolute
	value when x - 1 is zero.
	* sysdeps/i386/fpu/e_log10f.S (__ieee754_log10f): Likewise.
	* sysdeps/i386/fpu/e_log10l.S (__ieee754_log10l): Likewise.
	* sysdeps/ieee754/ldbl-128/e_log10l.c (__ieee754_log10l): Return
	0.0L for an argument of 1.0L.
	* sysdeps/ieee754/ldbl-128ibm/e_log10l.c (__ieee754_log10l):
	Likewise.
	* sysdeps/x86_64/fpu/e_log10l.S (__ieee754_log10l): Take absolute
	value when x - 1 is zero.
	* math/libm-test.inc (log10_test): Use ALL_RM_TEST.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-05-23 12:07:50 +00:00
..
aarch64 Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
alpha alpha: Define ELF_MACHINE_NO_RELA 2014-05-20 07:17:21 -07:00
arm Consistently use $(elf-objpfx). 2014-05-21 16:52:08 +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 log10 (1) in round-downward mode (bug 16977). 2014-05-23 12:07:50 +00:00
ia64 Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
ieee754 Fix log10 (1) in round-downward mode (bug 16977). 2014-05-23 12:07:50 +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 Return EAI_AGAIN for AF_UNSPEC when herrno is TRY_AGAIN (BZ #16849) 2014-05-15 12:33:11 +05:30
powerpc PowerPC: Remove unneeded copysign[f] macros 2014-05-22 16:05:19 -05:00
pthread Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
s390 Consistently use $(elf-objpfx). 2014-05-21 16:52:08 +00:00
sh Don't include individual test ulps in libm-test-ulps. 2014-03-05 15:02:38 +00:00
sparc Fix sparc memcpy data corruption when using niagara2 optimized routines. 2014-05-17 14:09:55 -07:00
tile Clean up __exit_thread. 2014-05-13 09:49:20 -07:00
unix AArch64: Convert fork.c to arch-fork.h 2014-05-21 18:45:00 +01: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 Move NPTL public ABI headers for x86 to sysdeps/x86/nptl/. 2014-05-14 09:44:56 -07:00
x86_64 Fix log10 (1) in round-downward mode (bug 16977). 2014-05-23 12:07:50 +00:00