From 718d34a309493f8697ff9a8fefcbacbba12a2ccd Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 23 Jun 2015 16:01:54 +0000 Subject: Fix csqrt spurious underflows (bug 18371). The csqrt implementations in glibc can cause spurious underflows in some cases as a side-effect of the scaling for large arguments (when underflow is correct for the square root of the argument that was scaled down to avoid overflow, but not for the original argument). This patch arranges to avoid the underflowing intermediate computation (eliminating a multiplication in 0.5 in the problem cases where a subsequent scaling by 2 would follow). Tested for x86_64 and x86 and ulps updated accordingly (only needed for x86). [BZ #18371] * math/s_csqrt.c (__csqrt): Avoid multiplication by 0.5 where intermediate but not final result might underflow. * math/s_csqrtf.c (__csqrtf): Likewise. * math/s_csqrtl.c (__csqrtl): Likewise. * math/auto-libm-test-in: Add more tests of csqrt. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. --- NEWS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 42ebdd1..fcffaea 100644 --- a/NEWS +++ b/NEWS @@ -19,11 +19,11 @@ Version 2.22 18034, 18036, 18038, 18039, 18042, 18043, 18046, 18047, 18049, 18068, 18080, 18093, 18100, 18104, 18110, 18111, 18116, 18125, 18128, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217, 18219, 18220, 18221, - 18234, 18244, 18247, 18287, 18319, 18324, 18333, 18346, 18397, 18409, - 18410, 18412, 18418, 18422, 18434, 18444, 18468, 18469, 18470, 18479, - 18483, 18495, 18496, 18497, 18498, 18507, 18512, 18513, 18519, 18520, - 18522, 18527, 18528, 18529, 18530, 18532, 18533, 18534, 18536, 18539, - 18540, 18542, 18544, 18545, 18546, 18547, 18553, 18558, 18569. + 18234, 18244, 18247, 18287, 18319, 18324, 18333, 18346, 18371, 18397, + 18409, 18410, 18412, 18418, 18422, 18434, 18444, 18468, 18469, 18470, + 18479, 18483, 18495, 18496, 18497, 18498, 18507, 18512, 18513, 18519, + 18520, 18522, 18527, 18528, 18529, 18530, 18532, 18533, 18534, 18536, + 18539, 18540, 18542, 18544, 18545, 18546, 18547, 18553, 18558, 18569. * Cache information can be queried via sysconf() function on s390 e.g. with _SC_LEVEL1_ICACHE_SIZE as argument. -- cgit v1.1