summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_math.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-07-07 16:21:29 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-07-07 16:21:29 (GMT)
commitbe64d951694c3f00c57024799246f41618efd625 (patch)
treef0b713d66733ed113be23c664c035405a24146b2 /Lib/test/test_math.py
parent9c91eb844c63a2d86bb845cd41d2662af0866a8b (diff)
downloadcpython-be64d951694c3f00c57024799246f41618efd625.zip
cpython-be64d951694c3f00c57024799246f41618efd625.tar.gz
cpython-be64d951694c3f00c57024799246f41618efd625.tar.bz2
Issue #9186: log1p(-1.0) should raise ValueError, not OverflowError.
Diffstat (limited to 'Lib/test/test_math.py')
-rw-r--r--Lib/test/test_math.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index d6f14b2..12e7f98 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -647,15 +647,7 @@ class MathTests(unittest.TestCase):
def testLog1p(self):
self.assertRaises(TypeError, math.log1p)
- self.ftest('log1p(1/e -1)', math.log1p(1/math.e-1), -1)
- self.ftest('log1p(0)', math.log1p(0), 0)
- self.ftest('log1p(e-1)', math.log1p(math.e-1), 1)
- self.ftest('log1p(1)', math.log1p(1), math.log(2))
- self.assertEquals(math.log1p(INF), INF)
- self.assertRaises(ValueError, math.log1p, NINF)
- self.assertTrue(math.isnan(math.log1p(NAN)))
n= 2**90
- self.assertAlmostEquals(math.log1p(n), 62.383246250395075)
self.assertAlmostEquals(math.log1p(n), math.log1p(float(n)))
def testLog10(self):