Issue #15477: Add workaround for log1p(-0.0) on platforms where it's broken.

This commit is contained in:
Mark Dickinson 2012-08-18 12:24:30 +01:00
parent 31a11902b3
commit 05d79e9abf
4 changed files with 28 additions and 10 deletions

View file

@ -519,15 +519,11 @@ class CMathTests(unittest.TestCase):
# of zero, then atan and atanh will also have difficulties with
# the sign of complex zeros.
@requires_IEEE_754
@unittest.skipIf(sysconfig.get_config_var('LOG1P_DROPS_ZERO_SIGN'),
"system log1p() function doesn't preserve the sign")
def testAtanSign(self):
for z in complex_zeros:
self.assertComplexIdentical(cmath.atan(z), z)
@requires_IEEE_754
@unittest.skipIf(sysconfig.get_config_var('LOG1P_DROPS_ZERO_SIGN'),
"system log1p() function doesn't preserve the sign")
def testAtanhSign(self):
for z in complex_zeros:
self.assertComplexIdentical(cmath.atanh(z), z)