about summary refs log tree commit diff
path: root/NEWS
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-12-19 13:36:10 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-12-19 13:36:10 +0000
commitf88acd39da2a509081e541b84ecbf204ef20f9e8 (patch)
tree383c0bcce4b3e74c9150d01550e7c412e47981bd /NEWS
parentc688b4196014e0162a1ff11120f6c9516be0c6cb (diff)
downloadglibc-f88acd39da2a509081e541b84ecbf204ef20f9e8.tar.gz
glibc-f88acd39da2a509081e541b84ecbf204ef20f9e8.tar.xz
glibc-f88acd39da2a509081e541b84ecbf204ef20f9e8.zip
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.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS2
1 files changed, 1 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index d82cf9592b..b8ff649e2c 100644
--- a/NEWS
+++ b/NEWS
@@ -22,7 +22,7 @@ Version 2.19
   15966, 15985, 15988, 15997, 16032, 16034, 16036, 16037, 16038, 16041,
   16055, 16071, 16072, 16074, 16077, 16078, 16103, 16112, 16143, 16144,
   16146, 16150, 16151, 16153, 16167, 16172, 16195, 16214, 16245, 16271,
-  16274, 16283, 16289, 16314, 16316, 16330, 16338.
+  16274, 16283, 16289, 16293, 16314, 16316, 16330, 16338.
 
 * The public headers no longer use __unused nor __block.  This change is to
   support compiling programs that are derived from BSD sources and use