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 5ab6380 commit 66f67f7Copy full SHA for 66f67f7
Lib/test/test_math.py
@@ -501,6 +501,16 @@ def testExp(self):
501
self.assertTrue(math.isnan(math.exp(NAN)))
502
self.assertRaises(OverflowError, math.exp, 1000000)
503
504
+ def testExp2(self):
505
+ self.assertRaises(TypeError, math.exp2)
506
+ self.ftest('exp2(-1)', math.exp2(-1), 0.5)
507
+ self.ftest('exp2(0)', math.exp2(0), 1)
508
+ self.ftest('exp2(1)', math.exp2(1), 2)
509
+ self.assertEqual(math.exp2(INF), INF)
510
+ self.assertEqual(math.exp2(NINF), 0.)
511
+ self.assertTrue(math.isnan(math.exp2(NAN)))
512
+ self.assertRaises(OverflowError, math.exp2, 1000000)
513
+
514
def testFabs(self):
515
self.assertRaises(TypeError, math.fabs)
516
self.ftest('fabs(-1)', math.fabs(-1), 1)
0 commit comments