In OT’s unit tests, we have frequently statements that look like this:
assert_almost_equal(a, b, 1e-12, 1e-12)
My understanding of this matter, which is entirely due to a recent training session by @MichaelBaudin, is that generally, relative tolerance (the first one in
assert_almost_equal) should be preferred to absolute tolerance, except when the expected value is
0 (in which case relative tolerance makes no sense).
What is the reasoning behind having both relative and absolute tolerance?