The cmath(complex math) module provides functions for performing complex mathematical operations. The cmath.isclose()
function is used to determine whether the values of two complex numbers are within a certain tolerance of each other i.e Whether they are close to each other with respect to the given tolerances.
math.isclose(a, b, rel_tol= 1e-09, abs_tol = 0)
copy
a |
The first complex number in the comparison |
b |
The second complex number in the comparison |
rel_tol |
The maximum difference for being considered "close", relative to the magnitude of the input values. Default value is 1e-09 |
abs_tol |
The maximum difference for being considered "close", regardless of the magnitude of the input values. Default value is 0. |