Skip to content
Next Next commit
Improve docs
  • Loading branch information
Xiaokang2022 committed Oct 31, 2024
commit 683a59af6f67b1ba2c14529bcbe87ae26241b4cf
5 changes: 3 additions & 2 deletions Doc/library/cmath.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,9 @@ Classification functions
tolerance is ``1e-09``, which assures that the two values are the same
within about 9 decimal digits. *rel_tol* must be greater than zero.

*abs_tol* is the minimum absolute tolerance -- useful for comparisons near
zero. *abs_tol* must be at least zero.
*abs_tol* is the minimum absolute tolerance; it must be at least 0.0. When
comparing to 0.0, the default *abs_tol* of 0.0 means that only 0.0 is close
to 0.0. Pass a larger tolerance to allow for floating point inaccuracies.

If no errors occur, the result will be:
``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
Expand Down
5 changes: 3 additions & 2 deletions Doc/library/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ Number-theoretic and representation functions
tolerance is ``1e-09``, which assures that the two values are the same
within about 9 decimal digits. *rel_tol* must be greater than zero.

*abs_tol* is the minimum absolute tolerance -- useful for comparisons near
zero. *abs_tol* must be at least zero.
*abs_tol* is the minimum absolute tolerance; it must be at least 0.0. When
comparing to 0.0, the default *abs_tol* of 0.0 means that only 0.0 is close
to 0.0. Pass a larger tolerance to allow for floating point inaccuracies.

If no errors occur, the result will be:
``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
Expand Down