Skip to content

Commit 43f7398

Browse files
committed
Revert gh-146402 and update NEWS entry
This reverts commit 8e1469c.
1 parent 25ec8e2 commit 43f7398

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

Lib/test/test_cmath.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,6 @@ def polar_with_errno_set(z):
406406
_testcapi.set_errno(0)
407407
self.check_polar(polar_with_errno_set)
408408

409-
@unittest.skipIf(sys.platform.startswith("sunos"),
410-
"skipping, see gh-138573")
411409
def test_phase(self):
412410
self.assertAlmostEqual(phase(0), 0.)
413411
self.assertAlmostEqual(phase(1.), 0.)

Lib/test/test_math.py

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

290-
@unittest.skipIf(sys.platform.startswith("sunos"),
291-
"skipping, see gh-138573")
292290
def testAtan2(self):
293291
self.assertRaises(TypeError, math.atan2)
294292
self.ftest('atan2(-1, 0)', math.atan2(-1, 0), -math.pi/2)
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The return values of ``atan2(0.0, 0.0)``, ``atan2(0.0, -0.0)``, etc. are
2-
specified in Annex F of the C standard. The Intel math library, for legacy
3-
compatibility, also sets ``errno`` to indicate a domain error when both
4-
arguments are zero. Python's :func:`math.atan2` and :func:`cmath.phase`
5-
should return the values specified by Annex F, not raise ``ValueError``.
6-
This patch fixes these cases when building Python with the Intel math
7-
library. Contributed by High Performance Kernels LLC.
2+
specified in Annex F of the C standard. The Intel and Solaris math libraries,
3+
for legacy compatibility, also set ``errno`` to indicate a domain error when
4+
both arguments are zero. Python's :func:`math.atan2`, :func:`math.atan2pi`,
5+
and :func:`cmath.phase` should return the values specified by Annex F, not
6+
raise ``ValueError``. This patch ignores ``errno`` for the C ``atan2()`` and
7+
``atan2pi()`` functions. Contributed by High Performance Kernels LLC.

0 commit comments

Comments
 (0)