News for hackers. Stuff that matters.
Re:How to compare floats in Python by eru on Thursday March 31, 2022 @01:55AM (#30864238)
How do you determine the fudge factor?

Eg if you compare (x + 1.2) + (x + 2.3) < (2*x + 3.6) that goes wrong for big enough x.

Re:How to compare floats in Python by wheelerof4te on Thursday March 31, 2022 @06:14AM (#30865561)
Use the round function in that case.
Re:How to compare floats in Python by eru on Thursday March 31, 2022 @07:58PM (#30873653)
How is that going to help? What precision do you want to round to?

You know that at big enough values, floating point numbers are farther apart than integers?