It is often required to perform either types of tolerance check. Having to write abs(a - b) < abs_tol or abs(a - b) < rel_tol * max(abs(a), abs(b)) for every comparison can quickly become tedious.
It would therefore be convenient to have a function like Python’s math.isclose(a, b, rel_tol=1e-09, abs_tol=0.0).
Originally posted by @dbauer-ets in #208