Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3

Percentage Accurate: 84.2% → 97.0%
Time: 8.1s
Alternatives: 9
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{y} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* x (- y z)) y))
double code(double x, double y, double z) {
	return (x * (y - z)) / y;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (y - z)) / y
end function
public static double code(double x, double y, double z) {
	return (x * (y - z)) / y;
}
def code(x, y, z):
	return (x * (y - z)) / y
function code(x, y, z)
	return Float64(Float64(x * Float64(y - z)) / y)
end
function tmp = code(x, y, z)
	tmp = (x * (y - z)) / y;
end
code[x_, y_, z_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y - z\right)}{y}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 9 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 84.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{y} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* x (- y z)) y))
double code(double x, double y, double z) {
	return (x * (y - z)) / y;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (y - z)) / y
end function
public static double code(double x, double y, double z) {
	return (x * (y - z)) / y;
}
def code(x, y, z):
	return (x * (y - z)) / y
function code(x, y, z)
	return Float64(Float64(x * Float64(y - z)) / y)
end
function tmp = code(x, y, z)
	tmp = (x * (y - z)) / y;
end
code[x_, y_, z_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y - z\right)}{y}
\end{array}

Alternative 1: 97.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{-262} \lor \neg \left(x \leq 5 \cdot 10^{-47}\right):\\ \;\;\;\;x - x \cdot \frac{z}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z}{\frac{y}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -3.5e-262) (not (<= x 5e-47)))
   (- x (* x (/ z y)))
   (- x (/ z (/ y x)))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -3.5e-262) || !(x <= 5e-47)) {
		tmp = x - (x * (z / y));
	} else {
		tmp = x - (z / (y / x));
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-3.5d-262)) .or. (.not. (x <= 5d-47))) then
        tmp = x - (x * (z / y))
    else
        tmp = x - (z / (y / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -3.5e-262) || !(x <= 5e-47)) {
		tmp = x - (x * (z / y));
	} else {
		tmp = x - (z / (y / x));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -3.5e-262) or not (x <= 5e-47):
		tmp = x - (x * (z / y))
	else:
		tmp = x - (z / (y / x))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -3.5e-262) || !(x <= 5e-47))
		tmp = Float64(x - Float64(x * Float64(z / y)));
	else
		tmp = Float64(x - Float64(z / Float64(y / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -3.5e-262) || ~((x <= 5e-47)))
		tmp = x - (x * (z / y));
	else
		tmp = x - (z / (y / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -3.5e-262], N[Not[LessEqual[x, 5e-47]], $MachinePrecision]], N[(x - N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-262} \lor \neg \left(x \leq 5 \cdot 10^{-47}\right):\\
\;\;\;\;x - x \cdot \frac{z}{y}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{y}{x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.50000000000000011e-262 or 5.00000000000000011e-47 < x

    1. Initial program 83.9%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. --rgt-identity83.9%

        \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{y} - 0} \]
      2. associate-*l/86.4%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(y - z\right)} - 0 \]
      3. sub-neg86.4%

        \[\leadsto \frac{x}{y} \cdot \color{blue}{\left(y + \left(-z\right)\right)} - 0 \]
      4. distribute-rgt-in78.2%

        \[\leadsto \color{blue}{\left(y \cdot \frac{x}{y} + \left(-z\right) \cdot \frac{x}{y}\right)} - 0 \]
      5. *-commutative78.2%

        \[\leadsto \left(\color{blue}{\frac{x}{y} \cdot y} + \left(-z\right) \cdot \frac{x}{y}\right) - 0 \]
      6. distribute-lft-neg-out78.2%

        \[\leadsto \left(\frac{x}{y} \cdot y + \color{blue}{\left(-z \cdot \frac{x}{y}\right)}\right) - 0 \]
      7. unsub-neg78.2%

        \[\leadsto \color{blue}{\left(\frac{x}{y} \cdot y - z \cdot \frac{x}{y}\right)} - 0 \]
      8. associate--r+78.2%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot y - \left(z \cdot \frac{x}{y} + 0\right)} \]
      9. associate-*l/75.8%

        \[\leadsto \color{blue}{\frac{x \cdot y}{y}} - \left(z \cdot \frac{x}{y} + 0\right) \]
      10. associate-/l*90.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{y}{y}}} - \left(z \cdot \frac{x}{y} + 0\right) \]
      11. *-inverses90.9%

        \[\leadsto \frac{x}{\color{blue}{1}} - \left(z \cdot \frac{x}{y} + 0\right) \]
      12. /-rgt-identity90.9%

        \[\leadsto \color{blue}{x} - \left(z \cdot \frac{x}{y} + 0\right) \]
      13. +-rgt-identity90.9%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{y}} \]
      14. *-commutative90.9%

        \[\leadsto x - \color{blue}{\frac{x}{y} \cdot z} \]
      15. associate-/r/98.9%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{y}{z}}} \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{y}{z}}} \]
    4. Step-by-step derivation
      1. clear-num98.9%

        \[\leadsto x - \color{blue}{\frac{1}{\frac{\frac{y}{z}}{x}}} \]
      2. associate-/r/98.9%

        \[\leadsto x - \color{blue}{\frac{1}{\frac{y}{z}} \cdot x} \]
      3. clear-num99.0%

        \[\leadsto x - \color{blue}{\frac{z}{y}} \cdot x \]
    5. Applied egg-rr99.0%

      \[\leadsto x - \color{blue}{\frac{z}{y} \cdot x} \]

    if -3.50000000000000011e-262 < x < 5.00000000000000011e-47

    1. Initial program 93.1%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. --rgt-identity93.1%

        \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{y} - 0} \]
      2. associate-*l/73.9%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(y - z\right)} - 0 \]
      3. sub-neg73.9%

        \[\leadsto \frac{x}{y} \cdot \color{blue}{\left(y + \left(-z\right)\right)} - 0 \]
      4. distribute-rgt-in73.9%

        \[\leadsto \color{blue}{\left(y \cdot \frac{x}{y} + \left(-z\right) \cdot \frac{x}{y}\right)} - 0 \]
      5. *-commutative73.9%

        \[\leadsto \left(\color{blue}{\frac{x}{y} \cdot y} + \left(-z\right) \cdot \frac{x}{y}\right) - 0 \]
      6. distribute-lft-neg-out73.9%

        \[\leadsto \left(\frac{x}{y} \cdot y + \color{blue}{\left(-z \cdot \frac{x}{y}\right)}\right) - 0 \]
      7. unsub-neg73.9%

        \[\leadsto \color{blue}{\left(\frac{x}{y} \cdot y - z \cdot \frac{x}{y}\right)} - 0 \]
      8. associate--r+73.9%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot y - \left(z \cdot \frac{x}{y} + 0\right)} \]
      9. associate-*l/95.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{y}} - \left(z \cdot \frac{x}{y} + 0\right) \]
      10. associate-/l*98.2%

        \[\leadsto \color{blue}{\frac{x}{\frac{y}{y}}} - \left(z \cdot \frac{x}{y} + 0\right) \]
      11. *-inverses98.2%

        \[\leadsto \frac{x}{\color{blue}{1}} - \left(z \cdot \frac{x}{y} + 0\right) \]
      12. /-rgt-identity98.2%

        \[\leadsto \color{blue}{x} - \left(z \cdot \frac{x}{y} + 0\right) \]
      13. +-rgt-identity98.2%

        \[\leadsto x - \color{blue}{z \cdot \frac{x}{y}} \]
      14. *-commutative98.2%

        \[\leadsto x - \color{blue}{\frac{x}{y} \cdot z} \]
      15. associate-/r/83.6%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{y}{z}}} \]
    3. Simplified83.6%

      \[\leadsto \color{blue}{x - \frac{x}{\frac{y}{z}}} \]
    4. Step-by-step derivation
      1. clear-num83.6%

        \[\leadsto x - \color{blue}{\frac{1}{\frac{\frac{y}{z}}{x}}} \]
      2. associate-/r/83.6%

        \[\leadsto x - \color{blue}{\frac{1}{\frac{y}{z}} \cdot x} \]
      3. clear-num83.7%

        \[\leadsto x - \color{blue}{\frac{z}{y}} \cdot x \]
    5. Applied egg-rr83.7%

      \[\leadsto x - \color{blue}{\frac{z}{y} \cdot x} \]
    6. Step-by-step derivation
      1. associate-*l/96.4%

        \[\leadsto x - \color{blue}{\frac{z \cdot x}{y}} \]
      2. associate-/l*98.1%

        \[\leadsto x - \color{blue}{\frac{z}{\frac{y}{x}}} \]
    7. Applied egg-rr98.1%

      \[\leadsto x - \color{blue}{\frac{z}{\frac{y}{x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{-262} \lor \neg \left(x \leq 5 \cdot 10^{-47}\right):\\ \;\;\;\;x - x \cdot \frac{z}{y}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z}{\frac{y}{x}}\\ \end{array} \]

Alternative 2: 71.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+88} \lor \neg \left(z \leq 2.25 \cdot 10^{+27}\right):\\ \;\;\;\;\frac{-x}{\frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -8.8e+88) (not (<= z 2.25e+27))) (/ (- x) (/ y z)) x))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -8.8e+88) || !(z <= 2.25e+27)) {
		tmp = -x / (y / z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-8.8d+88)) .or. (.not. (z <= 2.25d+27))) then
        tmp = -x / (y / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -8.8e+88) || !(z <= 2.25e+27)) {
		tmp = -x / (y / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -8.8e+88) or not (z <= 2.25e+27):
		tmp = -x / (y / z)
	else:
		tmp = x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -8.8e+88) || !(z <= 2.25e+27))
		tmp = Float64(Float64(-x) / Float64(y / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -8.8e+88) || ~((z <= 2.25e+27)))
		tmp = -x / (y / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -8.8e+88], N[Not[LessEqual[z, 2.25e+27]], $MachinePrecision]], N[((-x) / N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+88} \lor \neg \left(z \leq 2.25 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{-x}{\frac{y}{z}}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.80000000000000035e88 or 2.25e27 < z

    1. Initial program 88.0%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Taylor expanded in y around 0 77.3%

      \[\leadsto \frac{\color{blue}{-1 \cdot \left(z \cdot x\right)}}{y} \]
    3. Step-by-step derivation
      1. mul-1-neg77.3%

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{y} \]
      2. distribute-rgt-neg-in77.3%

        \[\leadsto \frac{\color{blue}{z \cdot \left(-x\right)}}{y} \]
    4. Simplified77.3%

      \[\leadsto \frac{\color{blue}{z \cdot \left(-x\right)}}{y} \]
    5. Step-by-step derivation
      1. frac-2neg77.3%

        \[\leadsto \color{blue}{\frac{-z \cdot \left(-x\right)}{-y}} \]
      2. div-inv77.2%

        \[\leadsto \color{blue}{\left(-z \cdot \left(-x\right)\right) \cdot \frac{1}{-y}} \]
      3. distribute-rgt-neg-out77.2%

        \[\leadsto \left(-\color{blue}{\left(-z \cdot x\right)}\right) \cdot \frac{1}{-y} \]
      4. remove-double-neg77.2%

        \[\leadsto \color{blue}{\left(z \cdot x\right)} \cdot \frac{1}{-y} \]
    6. Applied egg-rr77.2%

      \[\leadsto \color{blue}{\left(z \cdot x\right) \cdot \frac{1}{-y}} \]
    7. Step-by-step derivation
      1. un-div-inv77.3%

        \[\leadsto \color{blue}{\frac{z \cdot x}{-y}} \]
      2. add-sqr-sqrt38.8%

        \[\leadsto \frac{z \cdot x}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}} \]
      3. sqrt-unprod28.7%

        \[\leadsto \frac{z \cdot x}{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}} \]
      4. sqr-neg28.7%

        \[\leadsto \frac{z \cdot x}{\sqrt{\color{blue}{y \cdot y}}} \]
      5. sqrt-unprod0.5%

        \[\leadsto \frac{z \cdot x}{\color{blue}{\sqrt{y} \cdot \sqrt{y}}} \]
      6. add-sqr-sqrt1.2%

        \[\leadsto \frac{z \cdot x}{\color{blue}{y}} \]
      7. associate-*l/1.2%

        \[\leadsto \color{blue}{\frac{z}{y} \cdot x} \]
      8. associate-/r/1.3%

        \[\leadsto \color{blue}{\frac{z}{\frac{y}{x}}} \]
      9. frac-2neg1.3%

        \[\leadsto \color{blue}{\frac{-z}{-\frac{y}{x}}} \]
      10. distribute-frac-neg1.3%

        \[\leadsto \color{blue}{-\frac{z}{-\frac{y}{x}}} \]
      11. distribute-neg-frac1.3%

        \[\leadsto -\frac{z}{\color{blue}{\frac{-y}{x}}} \]
      12. associate-/l*1.2%

        \[\leadsto -\color{blue}{\frac{z \cdot x}{-y}} \]
      13. *-commutative1.2%

        \[\leadsto -\frac{\color{blue}{x \cdot z}}{-y} \]
      14. associate-/l*1.2%

        \[\leadsto -\color{blue}{\frac{x}{\frac{-y}{z}}} \]
      15. add-sqr-sqrt0.7%

        \[\leadsto -\frac{x}{\frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{z}} \]
      16. sqrt-unprod35.5%

        \[\leadsto -\frac{x}{\frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{z}} \]
      17. sqr-neg35.5%

        \[\leadsto -\frac{x}{\frac{\sqrt{\color{blue}{y \cdot y}}}{z}} \]
      18. sqrt-unprod36.0%

        \[\leadsto -\frac{x}{\frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{z}} \]
      19. add-sqr-sqrt72.6%

        \[\leadsto -\frac{x}{\frac{\color{blue}{y}}{z}} \]
    8. Applied egg-rr72.6%

      \[\leadsto \color{blue}{-\frac{x}{\frac{y}{z}}} \]

    if -8.80000000000000035e88 < z < 2.25e27

    1. Initial program 84.5%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    4. Taylor expanded in y around inf 75.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+88} \lor \neg \left(z \leq 2.25 \cdot 10^{+27}\right):\\ \;\;\;\;\frac{-x}{\frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 71.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+88} \lor \neg \left(z \leq 2.5 \cdot 10^{+28}\right):\\ \;\;\;\;x \cdot \frac{-z}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -9e+88) (not (<= z 2.5e+28))) (* x (/ (- z) y)) x))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -9e+88) || !(z <= 2.5e+28)) {
		tmp = x * (-z / y);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-9d+88)) .or. (.not. (z <= 2.5d+28))) then
        tmp = x * (-z / y)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -9e+88) || !(z <= 2.5e+28)) {
		tmp = x * (-z / y);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -9e+88) or not (z <= 2.5e+28):
		tmp = x * (-z / y)
	else:
		tmp = x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -9e+88) || !(z <= 2.5e+28))
		tmp = Float64(x * Float64(Float64(-z) / y));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -9e+88) || ~((z <= 2.5e+28)))
		tmp = x * (-z / y);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -9e+88], N[Not[LessEqual[z, 2.5e+28]], $MachinePrecision]], N[(x * N[((-z) / y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+88} \lor \neg \left(z \leq 2.5 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot \frac{-z}{y}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9e88 or 2.49999999999999979e28 < z

    1. Initial program 88.0%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. associate-*r/89.6%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    3. Simplified89.6%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    4. Taylor expanded in y around 0 72.6%

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{z}{y}\right)} \]
    5. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto x \cdot \color{blue}{\left(-\frac{z}{y}\right)} \]
      2. distribute-neg-frac72.6%

        \[\leadsto x \cdot \color{blue}{\frac{-z}{y}} \]
    6. Simplified72.6%

      \[\leadsto x \cdot \color{blue}{\frac{-z}{y}} \]

    if -9e88 < z < 2.49999999999999979e28

    1. Initial program 84.5%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    4. Taylor expanded in y around inf 75.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+88} \lor \neg \left(z \leq 2.5 \cdot 10^{+28}\right):\\ \;\;\;\;x \cdot \frac{-z}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 72.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+88} \lor \neg \left(z \leq 2.25 \cdot 10^{+27}\right):\\ \;\;\;\;z \cdot \frac{-x}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -8.8e+88) (not (<= z 2.25e+27))) (* z (/ (- x) y)) x))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -8.8e+88) || !(z <= 2.25e+27)) {
		tmp = z * (-x / y);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-8.8d+88)) .or. (.not. (z <= 2.25d+27))) then
        tmp = z * (-x / y)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -8.8e+88) || !(z <= 2.25e+27)) {
		tmp = z * (-x / y);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -8.8e+88) or not (z <= 2.25e+27):
		tmp = z * (-x / y)
	else:
		tmp = x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -8.8e+88) || !(z <= 2.25e+27))
		tmp = Float64(z * Float64(Float64(-x) / y));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -8.8e+88) || ~((z <= 2.25e+27)))
		tmp = z * (-x / y);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -8.8e+88], N[Not[LessEqual[z, 2.25e+27]], $MachinePrecision]], N[(z * N[((-x) / y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+88} \lor \neg \left(z \leq 2.25 \cdot 10^{+27}\right):\\
\;\;\;\;z \cdot \frac{-x}{y}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.80000000000000035e88 or 2.25e27 < z

    1. Initial program 88.0%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. associate-*r/89.6%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    3. Simplified89.6%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    4. Taylor expanded in y around 0 77.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot x}{y}} \]
    5. Step-by-step derivation
      1. associate-*r/78.4%

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \frac{x}{y}\right)} \]
      2. associate-*r*78.4%

        \[\leadsto \color{blue}{\left(-1 \cdot z\right) \cdot \frac{x}{y}} \]
      3. neg-mul-178.4%

        \[\leadsto \color{blue}{\left(-z\right)} \cdot \frac{x}{y} \]
      4. *-commutative78.4%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(-z\right)} \]
    6. Simplified78.4%

      \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(-z\right)} \]

    if -8.80000000000000035e88 < z < 2.25e27

    1. Initial program 84.5%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    4. Taylor expanded in y around inf 75.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+88} \lor \neg \left(z \leq 2.25 \cdot 10^{+27}\right):\\ \;\;\;\;z \cdot \frac{-x}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 72.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+89}:\\ \;\;\;\;\frac{x \cdot \left(-z\right)}{y}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{-x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1e+89) (/ (* x (- z)) y) (if (<= z 2e+27) x (* z (/ (- x) y)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1e+89) {
		tmp = (x * -z) / y;
	} else if (z <= 2e+27) {
		tmp = x;
	} else {
		tmp = z * (-x / y);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-1d+89)) then
        tmp = (x * -z) / y
    else if (z <= 2d+27) then
        tmp = x
    else
        tmp = z * (-x / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1e+89) {
		tmp = (x * -z) / y;
	} else if (z <= 2e+27) {
		tmp = x;
	} else {
		tmp = z * (-x / y);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1e+89:
		tmp = (x * -z) / y
	elif z <= 2e+27:
		tmp = x
	else:
		tmp = z * (-x / y)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1e+89)
		tmp = Float64(Float64(x * Float64(-z)) / y);
	elseif (z <= 2e+27)
		tmp = x;
	else
		tmp = Float64(z * Float64(Float64(-x) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1e+89)
		tmp = (x * -z) / y;
	elseif (z <= 2e+27)
		tmp = x;
	else
		tmp = z * (-x / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1e+89], N[(N[(x * (-z)), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2e+27], x, N[(z * N[((-x) / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+89}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{y}\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+27}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{-x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.99999999999999995e88

    1. Initial program 88.6%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Taylor expanded in y around 0 76.5%

      \[\leadsto \frac{\color{blue}{-1 \cdot \left(z \cdot x\right)}}{y} \]
    3. Step-by-step derivation
      1. mul-1-neg76.5%

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{y} \]
      2. distribute-rgt-neg-in76.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(-x\right)}}{y} \]
    4. Simplified76.5%

      \[\leadsto \frac{\color{blue}{z \cdot \left(-x\right)}}{y} \]

    if -9.99999999999999995e88 < z < 2e27

    1. Initial program 84.5%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    4. Taylor expanded in y around inf 75.4%

      \[\leadsto \color{blue}{x} \]

    if 2e27 < z

    1. Initial program 87.4%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. associate-*r/90.5%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    3. Simplified90.5%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    4. Taylor expanded in y around 0 77.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot x}{y}} \]
    5. Step-by-step derivation
      1. associate-*r/81.2%

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \frac{x}{y}\right)} \]
      2. associate-*r*81.2%

        \[\leadsto \color{blue}{\left(-1 \cdot z\right) \cdot \frac{x}{y}} \]
      3. neg-mul-181.2%

        \[\leadsto \color{blue}{\left(-z\right)} \cdot \frac{x}{y} \]
      4. *-commutative81.2%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(-z\right)} \]
    6. Simplified81.2%

      \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(-z\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+89}:\\ \;\;\;\;\frac{x \cdot \left(-z\right)}{y}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{-x}{y}\\ \end{array} \]

Alternative 6: 52.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-121}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-245}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -1.55e-121) x (if (<= y 4.6e-245) (* y (/ x y)) x)))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.55e-121) {
		tmp = x;
	} else if (y <= 4.6e-245) {
		tmp = y * (x / y);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= (-1.55d-121)) then
        tmp = x
    else if (y <= 4.6d-245) then
        tmp = y * (x / y)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.55e-121) {
		tmp = x;
	} else if (y <= 4.6e-245) {
		tmp = y * (x / y);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -1.55e-121:
		tmp = x
	elif y <= 4.6e-245:
		tmp = y * (x / y)
	else:
		tmp = x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -1.55e-121)
		tmp = x;
	elseif (y <= 4.6e-245)
		tmp = Float64(y * Float64(x / y));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -1.55e-121)
		tmp = x;
	elseif (y <= 4.6e-245)
		tmp = y * (x / y);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -1.55e-121], x, If[LessEqual[y, 4.6e-245], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-121}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-245}:\\
\;\;\;\;y \cdot \frac{x}{y}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.5499999999999999e-121 or 4.6000000000000003e-245 < y

    1. Initial program 83.9%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Step-by-step derivation
      1. associate-*r/98.5%

        \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    3. Simplified98.5%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
    4. Taylor expanded in y around inf 61.9%

      \[\leadsto \color{blue}{x} \]

    if -1.5499999999999999e-121 < y < 4.6000000000000003e-245

    1. Initial program 93.1%

      \[\frac{x \cdot \left(y - z\right)}{y} \]
    2. Taylor expanded in y around inf 9.0%

      \[\leadsto \frac{\color{blue}{y \cdot x}}{y} \]
    3. Step-by-step derivation
      1. associate-/l*24.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{y}{x}}} \]
      2. div-inv24.8%

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{y}{x}}} \]
      3. clear-num24.9%

        \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    4. Applied egg-rr24.9%

      \[\leadsto \color{blue}{y \cdot \frac{x}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-121}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-245}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 96.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \frac{y - z}{y} \end{array} \]
(FPCore (x y z) :precision binary64 (* x (/ (- y z) y)))
double code(double x, double y, double z) {
	return x * ((y - z) / y);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x * ((y - z) / y)
end function
public static double code(double x, double y, double z) {
	return x * ((y - z) / y);
}
def code(x, y, z):
	return x * ((y - z) / y)
function code(x, y, z)
	return Float64(x * Float64(Float64(y - z) / y))
end
function tmp = code(x, y, z)
	tmp = x * ((y - z) / y);
end
code[x_, y_, z_] := N[(x * N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \frac{y - z}{y}
\end{array}
Derivation
  1. Initial program 86.0%

    \[\frac{x \cdot \left(y - z\right)}{y} \]
  2. Step-by-step derivation
    1. associate-*r/95.5%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
  3. Simplified95.5%

    \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
  4. Final simplification95.5%

    \[\leadsto x \cdot \frac{y - z}{y} \]

Alternative 8: 96.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - x \cdot \frac{z}{y} \end{array} \]
(FPCore (x y z) :precision binary64 (- x (* x (/ z y))))
double code(double x, double y, double z) {
	return x - (x * (z / y));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x - (x * (z / y))
end function
public static double code(double x, double y, double z) {
	return x - (x * (z / y));
}
def code(x, y, z):
	return x - (x * (z / y))
function code(x, y, z)
	return Float64(x - Float64(x * Float64(z / y)))
end
function tmp = code(x, y, z)
	tmp = x - (x * (z / y));
end
code[x_, y_, z_] := N[(x - N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - x \cdot \frac{z}{y}
\end{array}
Derivation
  1. Initial program 86.0%

    \[\frac{x \cdot \left(y - z\right)}{y} \]
  2. Step-by-step derivation
    1. --rgt-identity86.0%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{y} - 0} \]
    2. associate-*l/83.6%

      \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(y - z\right)} - 0 \]
    3. sub-neg83.6%

      \[\leadsto \frac{x}{y} \cdot \color{blue}{\left(y + \left(-z\right)\right)} - 0 \]
    4. distribute-rgt-in77.2%

      \[\leadsto \color{blue}{\left(y \cdot \frac{x}{y} + \left(-z\right) \cdot \frac{x}{y}\right)} - 0 \]
    5. *-commutative77.2%

      \[\leadsto \left(\color{blue}{\frac{x}{y} \cdot y} + \left(-z\right) \cdot \frac{x}{y}\right) - 0 \]
    6. distribute-lft-neg-out77.2%

      \[\leadsto \left(\frac{x}{y} \cdot y + \color{blue}{\left(-z \cdot \frac{x}{y}\right)}\right) - 0 \]
    7. unsub-neg77.2%

      \[\leadsto \color{blue}{\left(\frac{x}{y} \cdot y - z \cdot \frac{x}{y}\right)} - 0 \]
    8. associate--r+77.2%

      \[\leadsto \color{blue}{\frac{x}{y} \cdot y - \left(z \cdot \frac{x}{y} + 0\right)} \]
    9. associate-*l/80.2%

      \[\leadsto \color{blue}{\frac{x \cdot y}{y}} - \left(z \cdot \frac{x}{y} + 0\right) \]
    10. associate-/l*92.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{y}{y}}} - \left(z \cdot \frac{x}{y} + 0\right) \]
    11. *-inverses92.6%

      \[\leadsto \frac{x}{\color{blue}{1}} - \left(z \cdot \frac{x}{y} + 0\right) \]
    12. /-rgt-identity92.6%

      \[\leadsto \color{blue}{x} - \left(z \cdot \frac{x}{y} + 0\right) \]
    13. +-rgt-identity92.6%

      \[\leadsto x - \color{blue}{z \cdot \frac{x}{y}} \]
    14. *-commutative92.6%

      \[\leadsto x - \color{blue}{\frac{x}{y} \cdot z} \]
    15. associate-/r/95.5%

      \[\leadsto x - \color{blue}{\frac{x}{\frac{y}{z}}} \]
  3. Simplified95.5%

    \[\leadsto \color{blue}{x - \frac{x}{\frac{y}{z}}} \]
  4. Step-by-step derivation
    1. clear-num95.4%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{\frac{y}{z}}{x}}} \]
    2. associate-/r/95.4%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{y}{z}} \cdot x} \]
    3. clear-num95.5%

      \[\leadsto x - \color{blue}{\frac{z}{y}} \cdot x \]
  5. Applied egg-rr95.5%

    \[\leadsto x - \color{blue}{\frac{z}{y} \cdot x} \]
  6. Final simplification95.5%

    \[\leadsto x - x \cdot \frac{z}{y} \]

Alternative 9: 50.8% accurate, 7.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
	return x;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x
end function
public static double code(double x, double y, double z) {
	return x;
}
def code(x, y, z):
	return x
function code(x, y, z)
	return x
end
function tmp = code(x, y, z)
	tmp = x;
end
code[x_, y_, z_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 86.0%

    \[\frac{x \cdot \left(y - z\right)}{y} \]
  2. Step-by-step derivation
    1. associate-*r/95.5%

      \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
  3. Simplified95.5%

    \[\leadsto \color{blue}{x \cdot \frac{y - z}{y}} \]
  4. Taylor expanded in y around inf 50.5%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification50.5%

    \[\leadsto x \]

Developer target: 96.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z < -2.060202331921739 \cdot 10^{+104}:\\ \;\;\;\;x - \frac{z \cdot x}{y}\\ \mathbf{elif}\;z < 1.6939766013828526 \cdot 10^{+213}:\\ \;\;\;\;\frac{x}{\frac{y}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (< z -2.060202331921739e+104)
   (- x (/ (* z x) y))
   (if (< z 1.6939766013828526e+213) (/ x (/ y (- y z))) (* (- y z) (/ x y)))))
double code(double x, double y, double z) {
	double tmp;
	if (z < -2.060202331921739e+104) {
		tmp = x - ((z * x) / y);
	} else if (z < 1.6939766013828526e+213) {
		tmp = x / (y / (y - z));
	} else {
		tmp = (y - z) * (x / y);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z < (-2.060202331921739d+104)) then
        tmp = x - ((z * x) / y)
    else if (z < 1.6939766013828526d+213) then
        tmp = x / (y / (y - z))
    else
        tmp = (y - z) * (x / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z < -2.060202331921739e+104) {
		tmp = x - ((z * x) / y);
	} else if (z < 1.6939766013828526e+213) {
		tmp = x / (y / (y - z));
	} else {
		tmp = (y - z) * (x / y);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z < -2.060202331921739e+104:
		tmp = x - ((z * x) / y)
	elif z < 1.6939766013828526e+213:
		tmp = x / (y / (y - z))
	else:
		tmp = (y - z) * (x / y)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z < -2.060202331921739e+104)
		tmp = Float64(x - Float64(Float64(z * x) / y));
	elseif (z < 1.6939766013828526e+213)
		tmp = Float64(x / Float64(y / Float64(y - z)));
	else
		tmp = Float64(Float64(y - z) * Float64(x / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z < -2.060202331921739e+104)
		tmp = x - ((z * x) / y);
	elseif (z < 1.6939766013828526e+213)
		tmp = x / (y / (y - z));
	else
		tmp = (y - z) * (x / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Less[z, -2.060202331921739e+104], N[(x - N[(N[(z * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Less[z, 1.6939766013828526e+213], N[(x / N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z < -2.060202331921739 \cdot 10^{+104}:\\
\;\;\;\;x - \frac{z \cdot x}{y}\\

\mathbf{elif}\;z < 1.6939766013828526 \cdot 10^{+213}:\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\

\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{y}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023279 
(FPCore (x y z)
  :name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
  :precision binary64

  :herbie-target
  (if (< z -2.060202331921739e+104) (- x (/ (* z x) y)) (if (< z 1.6939766013828526e+213) (/ x (/ y (- y z))) (* (- y z) (/ x y))))

  (/ (* x (- y z)) y))