Skip to content

Commit e5b8642

Browse files
committed
gh-138573: restrict testAtan2() the IEC 60559-compatible platforms
Section 7.12.4.4 of the C17 doesn't specify special values for atan2() (and in particular permit domain error when both arguments are zero). The F.10.1.4 does.
1 parent 942ac08 commit e5b8642

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_math.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ def testAtanh(self):
325325
self.assertRaises(ValueError, math.atanh, NINF)
326326
self.assertTrue(math.isnan(math.atanh(NAN)))
327327

328+
@unittest.skipIf(not sys.float_info.stdc_iec_559,
329+
"Support for the IEC 60559 floating-point standard expected.")
328330
def testAtan2(self):
329331
self.assertRaises(TypeError, math.atan2)
330332
self.ftest('atan2(-1, 0)', math.atan2(-1, 0), -math.pi/2)

0 commit comments

Comments
 (0)