[3.12] gh-126719: Clarify math.fmod docs (GH-127741) (#128492)

(cherry picked from commit f28d471fbe)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-01-04 18:45:19 +01:00 committed by GitHub
parent 731fc4052c
commit 98d3f2bc6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,7 +84,8 @@ Number-theoretic and representation functions
.. 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