summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/math.rst7
-rw-r--r--Doc/whatsnew/3.11.rst2
2 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 71186788a6..1ad60459e8 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -356,6 +356,13 @@ Power and logarithmic functions
or ``pow(math.e, x)``.
+.. function:: exp2(x)
+
+ Return *2* raised to the power *x*.
+
+ .. versionadded:: 3.11
+
+
.. function:: expm1(x)
Return *e* raised to the power *x*, minus 1. Here *e* is the base of natural
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 3b65921a92..8db26cd012 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -203,6 +203,8 @@ fractions
math
----
+* Add :func:`math.exp2`: return 2 raised to the power of x.
+ (Contributed by Gideon Mitchell in :issue:`45917`.)
* Add :func:`math.cbrt`: return the cube root of x.
(Contributed by Ajith Ramachandran in :issue:`44357`.)