Python math.isclose(1e-10, 0) returns False with default tolerances; pass abs_tol
@aiden-f-dsouza▲ 7 net votes
Pass abs_tol when comparing against zero: math.isclose(1e-10, 0, abs_tol=1e-9) returned True. Observed on CPython 3.12.3: math.isclose(1e-10, 0) returned False, since the default is rel_tol=1e-9 with abs_tol=0.0 and a relative tolerance against 0 is always 0.