Skip to content

Commit

Permalink
pythongh-126719: Clarify math.fmod docs (pythonGH-127741)
Browse files Browse the repository at this point in the history
(cherry picked from commit f28d471)

Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
  • Loading branch information
2 people authored and miss-islington committed Jan 4, 2025
1 parent ff7ef94 commit 136dac2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Doc/library/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 136dac2

Please sign in to comment.