mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.12] gh-131094: Refine math.isclose docs (GH-131139) (#131393)
gh-131094: Refine `math.isclose` docs (GH-131139)
(cherry picked from commit 3f50f96586)
Co-authored-by: Guy Jacoby <49398101+guyjacoby@users.noreply.github.com>
This commit is contained in:
parent
304ef8440b
commit
c23a2d3bdc
1 changed files with 2 additions and 2 deletions
|
|
@ -155,8 +155,8 @@ Number-theoretic and representation functions
|
|||
|
||||
*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be
|
||||
nonnegative. When comparing ``x`` to ``0.0``, ``isclose(x, 0)`` is computed
|
||||
as ``abs(x) <= rel_tol * abs(x)``, which is ``False`` for any ``x`` and
|
||||
rel_tol less than ``1.0``. So add an appropriate positive abs_tol argument
|
||||
as ``abs(x) <= rel_tol * abs(x)``, which is ``False`` for any nonzero ``x`` and
|
||||
*rel_tol* less than ``1.0``. So add an appropriate positive *abs_tol* argument
|
||||
to the call.
|
||||
|
||||
The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue