diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-06-13 10:52:38 +0000 |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-06-13 10:52:38 +0000 |
commit | bcdf9da26581266a35a2c7adc835c4580177c1ec (patch) | |
tree | 8223c5a8f1faa149c69305f68e97c463c1369a19 /Lib/test/test_math.py | |
parent | c6f1396be0a09d44de4ea8415c72c947521229d7 (diff) | |
download | cpython-git-bcdf9da26581266a35a2c7adc835c4580177c1ec.tar.gz |
Merged revisions 81967 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81967 | mark.dickinson | 2010-06-13 11:50:29 +0100 (Sun, 13 Jun 2010) | 4 lines
Issue #8986: erfc was raising OverflowError on Linux for arguments in
the (approximate) range (-27.3, 30.0), as a result of an escaped errno
value.
........
Diffstat (limited to 'Lib/test/test_math.py')
-rw-r--r-- | Lib/test/test_math.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 6c4443540f..6c07c8801d 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -1042,6 +1042,15 @@ class MathTests(unittest.TestCase): accuracy_failure = acc_check(expected, got, rel_err = 5e-15, abs_err = 5e-15) + elif fn == 'erfc': + # erfc has less-than-ideal accuracy for large + # arguments (x ~ 25 or so), mainly due to the + # error involved in computing exp(-x*x). + # + # XXX Would be better to weaken this test only + # for large x, instead of for all x. + accuracy_failure = ulps_check(expected, got, 2000) + else: accuracy_failure = ulps_check(expected, got, 20) if accuracy_failure is None: |