3 ms·
I see this advice often and I find that it misses the point. The problem isn't the equality check, the problem is finite precision. There are situations that c
by gugagore 5y ago
I see this advice often and I find that it misses the point. The problem isn't the equality check, the problem is finite precision.
There are situations that call for exact equality checking in floating point.
- cratermoon 5y agoIn which case, you don't use IEEE 754 floating point for math, you use some kind of numerics type or library that correctly models the domain.