We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c95e6f9 commit 7dba022Copy full SHA for 7dba022
Lib/test/test_math.py
@@ -2806,6 +2806,13 @@ def test_fma_zero_result(self):
2806
self.assertIsPositiveZero(math.fma(-tiny, -tiny, -0.0))
2807
self.assertIsNegativeZero(math.fma(-tiny, tiny, -0.0))
2808
2809
+ # gh-73468: On some platforms, libc fma() doesn't implement IEE 754-2008
2810
+ # properly: it doesn't use the right sign when the result is zero.
2811
+ @unittest.skipIf(
2812
+ sys.platform.startswith(("freebsd", "netbsd", "emscripten"))
2813
+ or (sys.platform == "android" and platform.machine() == "x86_64"),
2814
+ f"this platform doesn't implement IEE 754-2008 properly")
2815
+ def test_fma_zero_result2(self):
2816
# Corner case where rounding the multiplication would
2817
# give the wrong result.
2818
x = float.fromhex('0x1p-500')
0 commit comments