def linear_interp(x0: Float64, y0: Float64, x1: Float64, y1: Float64, x: Float64) -> Float64: return y0 + (y1 - y0) * (x - x0) / (x1 - x0)