News for hackers. Stuff that matters.
Re:How to compare floats in Python by rich_sasha on Wednesday March 30, 2022 @03:07PM (#30859499)
Floats have an enormous range, with fixed relative precision. Even a single-precision float can store numbers up to about 1.7e38 .

Now of course you pay for that by losing absolute precision, but chances are that if you’re working with numbers like 1e20 you don’t much care about anything after the decimal point.

There are no comments on this comment yet.