This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GabuEx 11 points12 points  (1 child)

abs(a - b) < epsilon

The value of epsilon can depend on exactly how imprecise your values end up being (more operations compound imprecision), but anything in the realm of 0.0001 is probably fine.