3 ms·
TIL: the mediant of two fractions
a/b < (a+c)/(b+d) < c/d
TIL: the mediant of two fractions
a/b < (a+c)/(b+d) < c/d
Easy to prove too.
Just found the proof, that's also how I noticed it doesn't work when one of the denominators is negative.
If one of the denominators (not both) is negative, you are guaranteed to be outside of the range.