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 86e104a commit df77e3dCopy full SHA for df77e3d
Lib/test/test_math.py
@@ -653,8 +653,8 @@ def testLog1p(self):
653
def testLog2(self):
654
self.assertRaises(TypeError, math.log2)
655
# Check that we get exact equality for log2 of powers of 2.
656
- actual = [math.log2(2.0**n) for n in range(-324, 1024)]
657
- expected = [float(n) for n in range(-324, 1024)]
+ actual = [math.log2(math.ldexp(1.0, n)) for n in range(-1074, 1024)]
+ expected = [float(n) for n in range(-1074, 1024)]
658
self.assertEqual(actual, expected)
659
660
# Check some integer values
0 commit comments