4 ms·
Isn't it interesting that x < y, y > x, !(x >= y), and !(y >= x) all express the same thing differently (barring NaNs)? Why should one of them be considered mo
by wnoise 16y ago
Isn't it interesting that x < y, y > x, !(x >= y), and !(y >= x) all express the same thing differently (barring NaNs)? Why should one of them be considered more "inside out" than another? Why does it make a difference if one is a constant rather than a variable? Does one of "x + 2" and "2 + x" seem inside-out as compared to the other? How about "2 * x" vs "x * 2"?
- Luyt 16y agoYou're right. I think it's just what people are used to. Compare: "If two gallons is less than the amount of gas in your tank, you should fill it up." "If you have less than two gallons of gas left in your tank, you should fill it up." In everyday speech, as well in mathematics, it is usual to state the variable first (what are we're going to compare) and then the amount to which it will be compared.
- wnoise 16y agoThe second actually splits the variable across the comparison. ("you have" and "left in your tank").
- __david__ 16y agoThe first is especially awkward because you forgot to flip the < into a >. It should be, "If two gallons is greater than the amount of gas in your tank, you should fill it up."