Consider the following implementation of linear interpolation:
lerp(x1, x2, y1, y2, x) = y1 * (x - x2) / (x1 - x2) + y2 * (x - x1) / (x2 - x1)
Is it true that x1 <= x <= x2
implies y1 <= lerp(x1, x2, y1, y2, x) <= y2
assuming IEEE 754 floating-point arithmetic? If not, can you provide a counterexample?