summaryrefslogtreecommitdiff
path: root/Doc/library
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-01-12 02:15:42 +0100
committerGitHub <noreply@github.com>2020-01-12 02:15:42 +0100
commit100fafcf20e8fc67cd8ef512074f9c0a253cb427 (patch)
tree4908c600f2dcda034e767b7f4e9cf50228f83a1b /Doc/library
parent1b335ae281631a12201fdec29b3c55d97166fc06 (diff)
downloadcpython-git-100fafcf20e8fc67cd8ef512074f9c0a253cb427.tar.gz
bpo-39288: Add math.nextafter(x, y) (GH-17937)
Return the next floating-point value after x towards y.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/math.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 43eaba935a..135adf8f63 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -213,6 +213,14 @@ Number-theoretic and representation functions
of *x* and are floats.
+.. function:: nextafter(x, y)
+
+ Return the next floating-point value after *x* towards *y*.
+
+ If *x* is equal to *y*, return *y*.
+
+ .. versionadded:: 3.9
+
.. function:: perm(n, k=None)
Return the number of ways to choose *k* items from *n* items