gh-131094: Refine math.isclose docs (#131139)

This commit is contained in:
Guy Jacoby 2025-03-18 02:13:26 -07:00 committed by GitHub
parent a936af924e
commit 3f50f96586
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -350,8 +350,8 @@ Floating point manipulation functions
*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be *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 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 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 *rel_tol* less than ``1.0``. So add an appropriate positive *abs_tol* argument
to the call. to the call.
The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be