From fbc68f03b0e56db6a07d789fd403eb79d726fe96 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 15 May 2015 00:16:10 +0000 Subject: Fix erfcf spurious underflows (bug 18217). The flt-32 implementation of erfcf produces spurious underflow exceptions for some arguments close to 0, because of calculations squaring the argument and then multiplying by small constants. This patch fixes this by adjusting the threshold for arguments for which the result is so close to 1 that 1 - x will give the right result from 2**-56 to 2**-26. (If 1 - x * 2/sqrt(pi) were used, the errors would be on the order of x^3 and a much larger threshold could be used.) Tested for x86_64 and x86. [BZ #18217] * sysdeps/ieee754/flt-32/s_erff.c (__erfcf): Use 2**-26 not 2**-56 as threshold for returning 1 - x. * math/auto-libm-test-in: Add more tests of erfc. * math/auto-libm-test-out: Regenerated. --- NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index c46ee35103..9251333195 100644 --- a/NEWS +++ b/NEWS @@ -16,8 +16,8 @@ Version 2.22 17964, 17965, 17967, 17969, 17978, 17987, 17991, 17996, 17998, 17999, 18007, 18019, 18020, 18029, 18030, 18032, 18036, 18038, 18039, 18042, 18043, 18046, 18047, 18068, 18080, 18093, 18100, 18104, 18110, 18111, - 18125, 18128, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18247, - 18287, 18319, 18333, 18346, 18397, 18409. + 18125, 18128, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217, + 18247, 18287, 18319, 18333, 18346, 18397, 18409. * Cache information can be queried via sysconf() function on s390 e.g. with _SC_LEVEL1_ICACHE_SIZE as argument. -- cgit 1.4.1