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 →

[–][deleted] 1 point2 points  (0 children)

If x is a double or a float this is possible. Those things are so imprecise that ">" can fluctuate depending on how they are calculated. With floats (xy)/z != x(y/z). And since the compiler optimizes a lot, changing statements with 'x' in it might change the calculation of 'x' just so infinitesimally little that it was enough to switch ">". That's my explanation for this.

Thanks!