[3.13] gh-126719: Clarify math.fmod docs (GH-127741) (#128491)
https://github.com/python/cpython/commit/65fd75809873456664c0b14a0d147b6676f... commit: 65fd75809873456664c0b14a0d147b6676f1bbb0 branch: 3.13 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: erlend-aasland <erlend.aasland@protonmail.com> date: 2025-01-04T17:44:36Z summary: [3.13] gh-126719: Clarify math.fmod docs (GH-127741) (#128491) (cherry picked from commit f28d471fbe99f9eaac05d60ed40da47b0b56fe86) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> files: M Doc/library/math.rst diff --git a/Doc/library/math.rst b/Doc/library/math.rst index 68878806749f28..25886da908f9a2 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -248,7 +248,8 @@ Floating point arithmetic .. function:: fmod(x, y) - Return ``fmod(x, y)``, as defined by the platform C library. Note that the + Return the floating-point remainder of ``x / y``, + as defined by the platform C library function ``fmod(x, y)``. Note that the Python expression ``x % y`` may not return the same result. The intent of the C standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite precision) equal to ``x - n*y`` for some integer *n* such that the result has
participants (1)
-
erlend-aasland