glibc/sysdeps/i386
Joseph Myers f88acd39da Fix x86/x86_64 expm1 inaccuracy near 0 in directed rounding modes (bug 16293).
Bug 16293 is inaccuracy of x86/x86_64 versions of expm1, near 0 in
directed rounding modes, that arises from frndint rounding the
exponent to 1 or -1 instead of 0, resulting in large cancellation
error.  This inaccuracy in turn affects other functions such as sinh
that use expm1.  This patch fixes the problem by setting
round-to-nearest mode temporarily around the affected calls to
frndint.  I don't think this is needed for other uses of frndint, such
as in exp itself, as only for expm1 is the cancellation error
significant.

Tested x86_64 and x86 and ulps updated accordingly.

	* sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]: Set
	round-to-nearest mode when using frndint.
	* sysdeps/i386/fpu/s_expm1.S (__expm1): Likewise.
	* sysdeps/i386/fpu/s_expm1f.S (__expm1f): Likewise.
	* sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]:
	Likewise.
	* math/auto-libm-test-in: Add more tests of expm1.  Do not expect
	sinh test to fail.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (TEST_COND_x86_64): Remove macro.
	(TEST_COND_x86): Likewise.
	(expm1_tonearest_test_data): New array.
	(expm1_test_tonearest): New function.
	(expm1_towardzero_test_data): New array.
	(expm1_test_towardzero): New function.
	(expm1_downward_test_data): New array.
	(expm1_test_downward): New function.
	(expm1_upward_test_data): New array.
	(expm1_test_upward): New function.
	(main): Run the new test functions.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-19 13:36:10 +00:00
..
fpu Fix x86/x86_64 expm1 inaccuracy near 0 in directed rounding modes (bug 16293). 2013-12-19 13:36:10 +00:00
i486 Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
i586 Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
i686 Remove use of SSE4.2 functions for strstr on i686 2013-12-18 14:28:30 +10:00
i786 Also applying directories. 1999-01-24 10:39:22 +00:00
sys Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
____longjmp_chk.S Add sigstack handling to Linux ____longjmp_chk on i386. 2009-07-30 21:50:14 -07:00
__longjmp.S Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
abort-instr.h update from main archive 961220 1996-12-21 04:13:58 +00:00
add_n.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
addmul_1.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
asm-syntax.h 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 Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
bsd-setjmp.S Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
bzero.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00: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-procinfo.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dl-procinfo.h Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type. 2013-06-28 16:50:48 -05:00
dl-tls.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dl-tlsdesc.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dl-tlsdesc.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dl-trampoline.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
ffs.c Make __ffs hidden 2013-09-20 21:25:31 +02:00
gccframe.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
gmp-mparam.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
htons.S Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
i386-mcount.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
ldbl2mpn.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
ldsodefs.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
lshift.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
machine-gmon.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Makefile Support crti.S and crtn.S provided directly by architectures. 2012-02-08 01:45:26 +00:00
memchr.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
memcmp.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
memcopy.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
memset.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
memusage.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
mp_clz_tab.c Update. 2002-03-14 20:48:50 +00:00
mul_1.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
rawmemchr.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
rshift.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
setfpucw.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
setjmp.S Fix leading whitespaces. 2013-06-06 20:36:07 +02: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 remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
stpcpy.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
stpncpy.S Fix then/than typos. 2013-08-30 18:10:31 +02:00
strchr.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
strchrnul.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
strcspn.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
string-inlines.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
strlen.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
strpbrk.S Fix typos. 2013-08-30 18:08:59 +02:00
strrchr.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
strspn.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
strtok_r.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
strtok.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
sub_n.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
submul_1.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +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 Introduce TLS descriptors for i386 and x86_64. 2008-05-13 05:41:30 +00:00
tst-audit.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
tst-stack-align.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Versions Merge sysdeps/i386/elf/Versions into sysdeps/i386/Versions. 2012-03-19 21:02:40 +01:00