News for hackers. Stuff that matters.
Re:How to compare floats in Python by Veedrac on Thursday March 31, 2022 @01:53PM (#30870240)
I think most people trying to losslessly represent money or similar discrete quantities already have the intuition that you shouldn't use binary floating point, and those that don't are not well served by telling them to math.isclose it, which is at best a fragile bandaid.
Re:How to compare floats in Python by Tainnor on Thursday March 31, 2022 @07:23PM (#30873407)
I sadly don't think the first part of your sentence is true, from what I've seen, but yes, definitely agree about the second part.