diff options
Diffstat (limited to 'Doc/library/math.rst')
-rw-r--r-- | Doc/library/math.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst index bf7a00549fc..55f2de07553 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -42,6 +42,8 @@ noted otherwise, all return values are floats. :func:`fabs(x) <fabs>` Absolute value of *x* :func:`floor(x) <floor>` Floor of *x*, the largest integer less than or equal to *x* :func:`fma(x, y, z) <fma>` Fused multiply-add operation: ``(x * y) + z`` +:func:`fmax(x, y) <fmax>` Maximum of two floating-point values +:func:`fmin(x, y) <fmin>` Minimum of two floating-point values :func:`fmod(x, y) <fmod>` Remainder of division ``x / y`` :func:`modf(x) <modf>` Fractional and integer parts of *x* :func:`remainder(x, y) <remainder>` Remainder of *x* with respect to *y* @@ -248,6 +250,30 @@ Floating point arithmetic .. versionadded:: 3.13 +.. function:: fmax(x, y) + + Get the larger of two floating-point values, treating NaNs as missing data. + + When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0`` + respectively and the sign of the result is implementation-defined, that + is, :func:`!fmax` is not required to be sensitive to the sign of such + operands (see Annex F of the C11 standard, §F.10.0.3 and §F.10.9.2). + + .. versionadded:: next + + +.. function:: fmin(x, y) + + Get the smaller of two floating-point values, treating NaNs as missing data. + + When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0`` + respectively and the sign of the result is implementation-defined, that + is, :func:`!fmin` is not required to be sensitive to the sign of such + operands (see Annex F of the C11 standard, §F.10.0.3 and §F.10.9.3). + + .. versionadded:: next + + .. function:: fmod(x, y) Return the floating-point remainder of ``x / y``, |