FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-131094: Refine math.isclose docs · guyjacoby/cpython@a83f755 · GitHub

Repository navigation

Commit a83f755

Browse files
authored
pythongh-131094: Refine math.isclose docs
Corrected the statement about any *x* and *rel_tol* always producing ``False`` to exclude ``x = 0``.
1 parent 155c44b commit a83f755

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Doc/library/math.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ Floating point manipulation functions
350350

351351
*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be
352352
nonnegative. When comparing ``x`` to ``0.0``, ``isclose(x, 0)`` is computed
353-
as ``abs(x) <= rel_tol * abs(x)``, which is ``False`` for any ``x`` and
354-
rel_tol less than ``1.0``. So add an appropriate positive abs_tol argument
353+
as ``abs(x) <= rel_tol * abs(x)``, which is ``False`` for any nonzero ``x`` and
354+
*rel_tol* less than ``1.0``. So add an appropriate positive *abs_tol* argument
355355
to the call.
356356

357357
The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL