mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
parent
8842c356aa
commit
e979ec8fbf
5 changed files with 68 additions and 6 deletions
|
@ -996,6 +996,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue