mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-126719: Clarify math.fmod docs (#127741)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
parent
fd94c6a803
commit
f28d471fbe
1 changed files with 2 additions and 1 deletions
|
@ -248,7 +248,8 @@ Floating point arithmetic
|
||||||
|
|
||||||
.. function:: fmod(x, y)
|
.. 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
|
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
|
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
|
precision) equal to ``x - n*y`` for some integer *n* such that the result has
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue