about summary refs log tree commit diff
path: root/math/auto-libm-test-in
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-05-15 00:16:10 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-05-15 00:16:10 +0000
commitfbc68f03b0e56db6a07d789fd403eb79d726fe96 (patch)
treea39460f48cef09b5e9577c38b9b061ddfb335fab /math/auto-libm-test-in
parent9a71f1fcf53615c00b5f9e5da4bba92bccb0efb4 (diff)
downloadglibc-fbc68f03b0e56db6a07d789fd403eb79d726fe96.tar.gz
glibc-fbc68f03b0e56db6a07d789fd403eb79d726fe96.tar.xz
glibc-fbc68f03b0e56db6a07d789fd403eb79d726fe96.zip
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.
Diffstat (limited to 'math/auto-libm-test-in')
-rw-r--r--math/auto-libm-test-in2
1 files changed, 2 insertions, 0 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 1deb99ad0d..c4bfe7439c 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -1129,6 +1129,8 @@ erf -0x1.3a0d48p+0
 
 erfc 0.0
 erfc -0
+erfc 0x1p-55
+erfc -0x1p-55
 erfc 0.125
 erfc 0.75
 erfc 1.25