about summary refs log tree commit diff
path: root/NEWS
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-06-23 20:12:33 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-06-23 20:12:33 +0000
commit4da6db51880289f0bf41b39e05cf9bb1c4769c47 (patch)
tree9f57512f4561f512366c93cf7430d5b75d4852fd /NEWS
parent5686b236cccdc8c72788b7996537ed92ac3a3c8c (diff)
downloadglibc-4da6db51880289f0bf41b39e05cf9bb1c4769c47.tar.gz
glibc-4da6db51880289f0bf41b39e05cf9bb1c4769c47.tar.xz
glibc-4da6db51880289f0bf41b39e05cf9bb1c4769c47.zip
Fix pow overflow in non-default rounding modes (bug 16315).
This patch fixes bug 16315, bad pow handling of overflow/underflow in
non-default rounding modes.  Tests of pow are duly converted to
ALL_RM_TEST to run all tests in all rounding modes.

There are two main issues here.  First, various implementations
compute a negative result by negating a positive result, but this
yields inappropriate overflow / underflow values for directed
rounding, so either overflow / underflow results need recomputing in
the correct sign, or the relevant overflowing / underflowing operation
needs to be made to have a result of the correct sign.  Second, the
dbl-64 implementation sets FE_TONEAREST internally; in the overflow /
underflow case, the result needs recomputing in the original rounding
mode.

Tested x86_64 and x86 and ulps updated accordingly.

	[BZ #16315]
	* sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Ensure possibly
	overflowing or underflowing operations take place with sign of
	result.
	* sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Likewise.
	* sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Likewise.
	* sysdeps/ieee754/dbl-64/e_pow.c: Include <math.h>.
	(__ieee754_pow): Recompute overflowing and underflowing results in
	original rounding mode.
	* sysdeps/x86/fpu/powl_helper.c: Include <stdbool.h>.
	(__powl_helper): Allow negative argument X and scale negated value
	as needed.  Avoid passing value outside [-1, 1] to f2xm1.
	* sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Ensure possibly
	overflowing or underflowing operations take place with sign of
	result.
	* sysdeps/x86_64/fpu/multiarch/e_pow.c [HAVE_FMA4_SUPPORT]:
	Include <math.h>.
	* math/auto-libm-test-in: Add more tests of pow.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (pow_test): Use ALL_RM_TEST.
	(pow_tonearest_test_data): Remove.
	(pow_test_tonearest): Likewise.
	(pow_towardzero_test_data): Likewise.
	(pow_test_towardzero): Likewise.
	(pow_downward_test_data): Likewise.
	(pow_test_downward): Likewise.
	(pow_upward_test_data): Likewise.
	(pow_test_upward): Likewise.
	(main): Don't call removed functions.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS22
1 files changed, 11 insertions, 11 deletions
diff --git a/NEWS b/NEWS
index b0d5ab2b7c..27d553b718 100644
--- a/NEWS
+++ b/NEWS
@@ -10,17 +10,17 @@ Version 2.20
 * The following bugs are resolved with this release:
 
   6804, 9894, 12994, 13347, 13651, 14308, 14770, 15119, 15132, 15347, 15514,
-  15698, 15804, 15894, 15946, 16002, 16064, 16095, 16198, 16284, 16348,
-  16349, 16357, 16362, 16447, 16516, 16532, 16545, 16564, 16574, 16599,
-  16600, 16609, 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634,
-  16639, 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683,
-  16689, 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731,
-  16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789,
-  16791, 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16849,
-  16854, 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16912, 16915,
-  16916, 16917, 16922, 16927, 16928, 16932, 16943, 16958, 16965, 16966,
-  16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031, 17042,
-  17048, 17058, 17062, 17069, 17075, 17079.
+  15698, 15804, 15894, 15946, 16002, 16064, 16095, 16198, 16284, 16315,
+  16348, 16349, 16357, 16362, 16447, 16516, 16532, 16545, 16564, 16574,
+  16599, 16600, 16609, 16610, 16611, 16613, 16619, 16623, 16629, 16632,
+  16634, 16639, 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681,
+  16683, 16689, 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724,
+  16731, 16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786,
+  16789, 16791, 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838,
+  16849, 16854, 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16912,
+  16915, 16916, 16917, 16922, 16927, 16928, 16932, 16943, 16958, 16965,
+  16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031,
+  17042, 17048, 17058, 17062, 17069, 17075, 17079.
 
 * Optimized strchr implementation for AArch64.  Contributed by ARM Ltd.