← Back to context

Comment by FpUser

3 years ago

I can not recall when did I ever need to do "if X=Y" without actually needing to account for tolerances.

Your experience seems a bit limited then?

Obviously, you need to account for tolerances, but that accounting does not need to be via an epsilon in your count, it can also take the form of careful numerical analysis. For example, in some numerical algorithms, it is right and proper to run them until an equality test (without epsilon) succeeds. And using any positive epsilon would give a worse result.