3 ms·
I hope you are not iterating over floating point numbers between 0 and 9.9999 :-) But your example is just the case for using 0 <= x < 10 in that _particular_
by IlliOnato 6y ago
I hope you are not iterating over floating point numbers between 0 and 9.9999 :-)
But your example is just the case for using 0 <= x < 10 in that _particular_ case.
However, if I want all numbers greater than zero and up to and including 10, I'd write 0 < x <= 10.
So I fail to see your point. Do you argue that if we had to choose just one of these expressions, 0 <= x < 10 would have more utility? I don't know how to evaluate this conjecture, but suppose it's right.
Why would you need to limit yourself to just one, though?
Why not to use one that is most suitable to the problem you are dealing with?