0
$\begingroup$

Is there a way to rewrite these two equations into one equation that would work in both scenarios?

If $x > y$, then the equation is: $$z = \frac{x - y}{1 - y}.$$

If $x < y$, then the equation is: $$z = 1 - \frac{y - x}{y}.$$

  • 1
    The second is just z=x/y2011-06-18
  • 0
    Why do you want to? In any case, $z$ is not continuous in $x$ and $y$, so the combined expression would be not be very nice (no offence to Yuval).2011-06-18

3 Answers 3