Re:How to compare floats in Python
by da12 on Wednesday March 30, 2022 @11:57AM
(#30856953)
Could you explain what you mean the 0.0 case? math.isclose() has an abs_tol parameter for, among other things, handling comparisons to 0.
[ Parent
| on HN ]
Re:How to compare floats in Python
by longemen3000 on Thursday March 31, 2022 @02:02AM
(#30864273)
The Julia equivalent does a good job explaining the 0.0 case:
https://docs.julialang.org/en/v1/base/math/#Base.isapprox