News for hackers. Stuff that matters.
Re:How to compare floats in Python by OrderlyTiamat on Thursday March 31, 2022 @04:19AM (#30864986)
> Do you see what I mean? math.colse()" increases the cognitive load for no benefit.

That seems to me to be a matter of perspective. It doesn't increase cognitive load for me (appropriate name, meaning is clear, checking the implementation, that's how I would've done it anyway, etc.) so I guess opinions differ.

from your earlier comment:

> Golly. Do any programmers need it explained to them why floating point numbers are not precise and equality does not apply?

I think the answer is _yes_. Actually, all programmers need that explained to them. Especially python programmers, as python is used by a lot of beginning programmers. So I don't see the problem here.

There are no comments on this comment yet.