Skip to content

Commit

Permalink
gh-126719: Clarify math.fmod docs (#127741)
Browse files Browse the repository at this point in the history
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
  • Loading branch information
StanFromIreland and picnixz authored Jan 4, 2025
1 parent fd94c6a commit f28d471
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 f28d471

Please sign in to comment.