Skip to content

Commit

Permalink
Move notes next to the related functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodd committed Nov 12, 2024
1 parent 40fd579 commit e271e9c
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Doc/library/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ Floating point arithmetic
Return the fractional and integer parts of *x*. Both results carry the sign
of *x* and are floats.

Note that :func:`modf` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second return value through an 'output
parameter' (there is no such thing in Python).


.. function:: remainder(x, y)

Expand Down Expand Up @@ -328,11 +333,6 @@ Python floats typically carry no more than 53 bits of precision (the same as the
platform C double type), in which case any float *x* with ``abs(x) >= 2**52``
necessarily has no fractional bits.

Note that :func:`modf` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second return value through an 'output
parameter' (there is no such thing in Python).


Floating point manipulation functions
-------------------------------------
Expand All @@ -351,6 +351,10 @@ Floating point manipulation functions
returns ``(0.0, 0)``, otherwise ``0.5 <= abs(m) < 1``. This is used to "pick
apart" the internal representation of a float in a portable way.

Note that :func:`frexp` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second return value through an 'output
parameter' (there is no such thing in Python).

.. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0)

Expand Down Expand Up @@ -457,12 +461,6 @@ Floating point manipulation functions
.. versionadded:: 3.9


Note that :func:`frexp` has a different call/return pattern
than its C equivalents: it takes a single argument and return a pair of
values, rather than returning its second return value through an 'output
parameter' (there is no such thing in Python).


Power, exponential and logarithmic functions
--------------------------------------------

Expand Down

0 comments on commit e271e9c

Please sign in to comment.