News for hackers. Stuff that matters.
Re:How to compare floats in Python by Veedrac on Wednesday March 30, 2022 @02:31PM (#30859005)
I agree that you need to be cautious asserting that you know the exact value of a floating point value, because it isn't a property you get by default.

Generally, though, if it isn't fairly obvious that equality should be preserved, and if you don't have exactness as a requirement, then you probably shouldn't be building your solution around equality checks at all.

There are no comments on this comment yet.