8000 gh-132876: workaround broken ldexp() on Windows 10 by skirpichev · Pull Request #133135 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-132876: workaround broken ldexp() on Windows 10 #133135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 26, 2025
Prev Previous commit
address review: added regression test
  • Loading branch information
skirpichev committed May 26, 2025
commit bd5446f49af71349ba03747d86b30c2f33a1bcc2
6 changes: 6 additions & 0 deletions Lib/test/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,12 @@ def testLdexp(self):
self.assertEqual(math.ldexp(NINF, n), NINF)
self.assertTrue(math.isnan(math.ldexp(NAN, n)))

@requires_IEEE_754
def testLdexp_denormal(self):
# Denormal output incorrectly rounded (truncated)
# on some Windows.
self.assertEqual(math.ldexp(6993274598585239, -1126), 1e-323)

def testLog(self):
self.assertRaises(TypeError, math.log)
self.assertRaises(TypeError, math.log, 1, 2, 3)
Expand Down
Loading
0