8000 bpo-45917: Add math.exp2() method - return 2 raised to the power of x by Turreted · Pull Request #29829 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45917: Add math.exp2() method - return 2 raised to the power of x #29829

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 8 commits into from
Nov 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
FB84 Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add non-integral testcase to Lib/test/test_math.py
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
  • Loading branch information
Turreted and mdickinson authored Nov 29, 2021
commit b41d5d7e46fcf931a1e8ac31a4d028eb723be280
1 change: 1 addition & 0 deletions Lib/test/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ def testExp2(self):
self.ftest('exp2(-1)', math.exp2(-1), 0.5)
self.ftest('exp2(0)', math.exp2(0), 1)
self.ftest('exp2(1)', math.exp2(1), 2)
self.ftest('exp2(2.3)', math.exp2(2.3), 4.924577653379665)
self.assertEqual(math.exp2(INF), INF)
self.assertEqual(math.exp2(NINF), 0.)
self.assertTrue(math.isnan(math.exp2(NAN)))
Expand Down
0