3 ms·
In terms of coding style, I agree with you that following the number line is usually going to be clearest. I think there might be some situations where descend
by dllthomas 12y ago
In terms of coding style, I agree with you that following the number line is usually going to be clearest. I think there might be some situations where descending is better than ascending, but certainly both are radically better than what I did above (low > high < lower).
As an example for what I was specifically trying to show here, though, that doesn't let me distinguish things quite as clearly.
I believe that (a < x < b) gives the same value as at least one of (a < x) and (x < b) for any value of x.
x < a:
a < x gives false
a < x < b gives false
a < x < b:
everything gives true
b < x:
x < b gives false
a < x < b gives false
So there's no way to get both of the parenthesized versions to disagree with the unparenthesized version in a single example.