[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:
Miss Islington (bot) 2025-03-18 10:20:52 +01:00 committed by GitHub
parent 304ef8440b
commit c23a2d3bdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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