mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
bpo-39288: Add examples to math.nextafter() documentation (GH-17962)
This commit is contained in:
parent
0ca7cc7fc0
commit
54cfbb2fee
1 changed files with 7 additions and 0 deletions
|
@ -219,6 +219,13 @@ Number-theoretic and representation functions
|
|||
|
||||
If *x* is equal to *y*, return *y*.
|
||||
|
||||
Examples:
|
||||
|
||||
* ``math.nextafter(x, math.inf)`` goes up: towards positive infinity.
|
||||
* ``math.nextafter(x, -math.inf)`` goes down: towards minus infinity.
|
||||
* ``math.nextafter(x, 0.0)`` goes towards zero.
|
||||
* ``math.nextafter(x, math.copysign(math.inf, x))`` goes away from zero.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
.. function:: perm(n, k=None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue