Skip to content

Commit f0a438a

Browse files
StanFromIrelandpicnixz
authored andcommitted
pythongh-126719: Clarify math.fmod docs (pythonGH-127741)
(cherry picked from commit f28d471) Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 731fc40 commit f0a438a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/math.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ Number-theoretic and representation functions
8484

8585
.. function:: fmod(x, y)
8686

87-
Return ``fmod(x, y)``, as defined by the platform C library. Note that the
87+
Return the floating-point remainder of ``x / y``,
88+
as defined by the platform C library function ``fmod(x, y)``. Note that the
8889
Python expression ``x % y`` may not return the same result. The intent of the C
8990
standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite
9091
precision) equal to ``x - n*y`` for some integer *n* such that the result has

0 commit comments

Comments
 (0)