2 ms·
> And on top of that, we can do some basic algebra. If we know that x < N and N < 5, then we can infer that x < 5. So if we see a comparison x < 5, we can then
by jakubadamw 3y ago
> And on top of that, we can do some basic algebra. If we know that x < N and N < 5, then we can infer that x < 5. So if we see a comparison x < 5, we can then rewrite that to true.
Even better: if `x` and `N` are integers, then we can infer that `x` < 4. :)
- KMag 3y agoI think you mean x <= 4, right?
- karamanolev 3y agoNo, x < 4, within integers. If N < 5, then N <= 4. If x < N, then x < 4.