Skip to content

Commit 5ab6380

Browse files
committed
update documentation to include math.exp2
1 parent 31a27c1 commit 5ab6380

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Doc/library/math.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,11 @@ Power and logarithmic functions
355355
of natural logarithms. This is usually more accurate than ``math.e ** x``
356356
or ``pow(math.e, x)``.
357357

358+
.. function:: exp2(x)
359+
360+
Return *2* raised to the power *x*.
361+
362+
.. versionadded:: 3.11
358363

359364
.. function:: expm1(x)
360365

Doc/whatsnew/3.11.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ fractions
203203

204204
math
205205
----
206+
* Add :func:`math.exp2`: return 2 raised to the power of x.
207+
(Contributed by Gideon Mitchell in :issue:`45917`.)
206208

207209
* Add :func:`math.cbrt`: return the cube root of x.
208210
(Contributed by Ajith Ramachandran in :issue:`44357`.)

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,7 @@ Julien Miotte
11911191
Andrii V. Mishkovskyi
11921192
Dom Mitchell
11931193
Dustin J. Mitchell
1194+
Gideon Mitchell
11941195
Tim Mitchell
11951196
Zubin Mithra
11961197
Florian Mladitsch

0 commit comments

Comments
 (0)