News for hackers. Stuff that matters.
Re:How to compare floats in Python by opisthenar84 on Wednesday March 30, 2022 @07:59PM (#30862289)
This is a good introductory article, but I would not recommend it for more advanced use cases. Just because two numbers are "close" does not mean that they are "equal". If truly precise floating point math is needed, symbolic representations are a much better way to do things.
Re:How to compare floats in Python by eru on Thursday March 31, 2022 @01:53AM (#30864228)
Python supports rational numbers just fine, too.