Hacker News new | ask | show | jobs
by fouronnes3 67 days ago
You should use two tolerances: absolute and relative. See for example numpy.allclose()

https://numpy.org/doc/stable/reference/generated/numpy.allcl...