glibc/sysdeps/x86_64
Joseph Myers 5b0626b9c5 Fix x86 / x86_64 expl / expl10l wild results in directed rounding modes (bug 16356).
This patch fixes bug 16356, bad results from x86 / x86_64 expl /
exp10l in directed rounding modes, the most serious of the bugs shown
up by my patch expanding libm test coverage.  When I fixed bug 16293,
I thought it was only necessary to set round-to-nearest when using
frndint in expm1 functions, because in other cases the cancellation
error from having the resulting fractional part close to 1 or -1 would
not be significant.  However, in expl and exp10l, the way the final
fractional part gets computed (something more complicated than a
simple subtraction, because more precision is needed than you'd get
that way) can result in a value outside the range [-1, 1] when the
argument to frndint was very close to an integer and was rounded the
"wrong" way because of the rounding mode - and the f2xm1 instruction
has undefined results if its argument is outside [-1, 1], so resulting
in the large errors seen.  So this patch removes the USE_AS_EXPM1L
conditionals on the round-to-nearest settings, so all of expl, expm1l
and exp10l now get round-to-nearest used for frndint (meaning the
final fractional part can at most be slightly above 0.5 in
magnitude).  Associated tests of exp and exp10 are added and testing
of exp10 in directed rounding modes enabled.

Tested x86_64 and x86 and ulps updated accordingly.

	* sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL): Also set
	round-to-nearest for [!USE_AS_EXPM1L].
	* sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL): Likewise.
	* math/auto-libm-test-in: Do not expect cosh tests to fail.  Add
	more tests of exp and exp10.  Expect some exp10 tests to miss
	exceptions or fail in directed rounding modes.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (exp10_tonearest_test_data): New array.
	(exp10_test_tonearest): New function.
	(exp10_towardzero_test_data): New array.
	(exp10_test_towardzero): New function.
	(exp10_downward_test_data): New array.
	(exp10_test_downward): New function.
	(exp10_upward_test_data): New array.
	(exp10_test_upward): New function.
	(main): Call the new functions.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-21 13:07:16 +00:00
..
64 Convert WORDSIZE[32|64]/ld entries to abi-variants 2012-05-30 08:33:26 -07:00
bits Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
fpu Fix x86 / x86_64 expl / expl10l wild results in directed rounding modes (bug 16356). 2013-12-21 13:07:16 +00:00
multiarch Update file name in x86_64 ifunc list 2013-12-16 13:00:39 +10:00
x32 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
____longjmp_chk.S
__longjmp.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
_mcount.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
abort-instr.h
add_n.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
addmul_1.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
backtrace.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
bsd-_setjmp.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
bsd-setjmp.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
bzero.S
cacheinfo.c Change __x86_64 prefix in cache size to __x86 2013-01-05 16:00:38 -08:00
configure rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
configure.ac rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
crti.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
crtn.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dl-irel.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dl-lookupcfg.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dl-machine.h Avoid crashing in LD_DEBUG when program name is unavailable 2013-05-29 21:34:12 +05:30
dl-runtime.c
dl-tls.h Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
dl-tlsdesc.h Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
dl-tlsdesc.S Fix typo in _dl_tlsdesc_resolve_hold. 2013-11-26 12:42:45 +01:00
dl-trampoline.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dl-trampoline.S Fix typos. 2013-08-30 18:08:59 +02:00
ffs.c Make __ffs hidden 2013-09-20 21:25:31 +02:00
ffsll.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
hp-timing.c
hp-timing.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
htonl.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Implies Use x86-64 bits/byteswap.h for both i386 and x86_64 2012-05-30 14:13:18 -07:00
jmpbuf-offsets.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
jmpbuf-unwind.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
l10nflist.c
ldbl2mpn.c
ldsodefs.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
link-defines.sym
locale-defines.sym
lshift.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
machine-gmon.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Makefile Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
memchr.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
memcmp.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
memcpy_chk.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
memcpy.S Change __x86_64 prefix in cache size to __x86 2013-01-05 16:00:38 -08:00
memmove.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
mempcpy_chk.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
mempcpy.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
memrchr.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
memset_chk.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
memset.S Use p2align instead ALIGN 2013-10-08 15:46:48 +02:00
memusage.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
mp_clz_tab.c
mul_1.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
preconfigure rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
preconfigure.ac rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
rawmemchr.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
rshift.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
rtld-memcmp.c
rtld-memset.S Add rtld-memset.S for x86_64 2013-06-15 00:09:26 +05:30
rtld-strchr.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
rtld-strlen.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
sched_cpucount.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
setjmp.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
stackinfo.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
start.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
stpcpy_chk.S
stpcpy.S
strcasecmp_l-nonascii.c
strcasecmp_l.S
strcasecmp.S
strcat.S Faster strlen on x64. 2013-03-18 07:39:12 +01:00
strchr.S Use p2align instead ALIGN 2013-10-08 15:46:48 +02:00
strchrnul.S Faster strchr implementation. 2013-09-11 17:07:38 +02:00
strcmp.S BZ#11120: fix x86_64/strcmp.S NOT_IN_libc safeguards 2013-03-22 03:16:00 +00:00
strcpy_chk.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
strcpy.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
strcspn.S Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
strlen.S Faster strlen on x64. 2013-03-18 07:39:12 +01:00
strncase_l-nonascii.c
strncase_l.S
strncase.S
strncmp.S
strnlen.S Faster strlen on x64. 2013-03-18 07:39:12 +01:00
strpbrk.S
strrchr.S Use p2align instead ALIGN 2013-10-08 15:46:48 +02:00
strspn.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
strtok_r.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
strtok.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
sub_n.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
submul_1.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
sysdep.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
tls-macros.h Split tls-macros.h into sysdeps directories. 2012-07-17 11:30:58 +00:00
tlsdesc.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
tlsdesc.sym
tst-audit3.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-audit4.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-audit5.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-audit6.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-audit7.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-audit.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
tst-auditmod3a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod3b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod4a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod4b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod5a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod5b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod6a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod6b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod6c.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod7a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod7b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-mallocalign1.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
tst-quad1.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
tst-quad1pie.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quad2.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quad2pie.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quadmod1.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
tst-quadmod1pie.S Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quadmod2.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
tst-quadmod2pie.S Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-stack-align.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Versions
wcschr.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
wcscmp.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
wcslen.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
wcsrchr.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00