News for hackers. Stuff that matters.
Re:How to compare floats in Python by sfvisser on Wednesday March 30, 2022 @03:09PM (#30859530)
You’re right here I think, but it is a hard problem in practice I noticed. Hard in the engineering sense, because you’re sometimes writing generic library-level code that needs a domain specific notion of error bars and tolerances. So you need to parametrize everything, sometimes for multiple dimensions. Becomes messy quickly.

I must admit putting a mystery epsilon in my code here and there for that reason. Admittedly the wrong thing to do.

There are no comments on this comment yet.