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

Percentage Accurate: 84.0% → 96.7%
Time: 9.3s
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.0% 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: 96.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+48}:\\ \;\;\;\;x - \frac{z}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -2e+48) (- x (/ z (/ y x))) (* x (- 1.0 (/ z y)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -2e+48) {
		tmp = x - (z / (y / x));
	} else {
		tmp = x * (1.0 - (z / 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 <= (-2d+48)) then
        tmp = x - (z / (y / x))
    else
        tmp = x * (1.0d0 - (z / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -2e+48) {
		tmp = x - (z / (y / x));
	} else {
		tmp = x * (1.0 - (z / y));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -2e+48:
		tmp = x - (z / (y / x))
	else:
		tmp = x * (1.0 - (z / y))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -2e+48)
		tmp = Float64(x - Float64(z / Float64(y / x)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(z / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -2e+48)
		tmp = x - (z / (y / x));
	else
		tmp = x * (1.0 - (z / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -2e+48], N[(x - N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+48}:\\
\;\;\;\;x - \frac{z}{\frac{y}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.00000000000000009e48

    1. Initial program 94.2%

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

        \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
      3. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
      6. /-lowering-/.f6490.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
    3. Simplified90.1%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. flip3--N/A

        \[\leadsto x \cdot \frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}} \]
      2. clear-numN/A

        \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}\right)}\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}}}\right)\right) \]
      6. flip3--N/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{1 - \color{blue}{\frac{z}{y}}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(1 - \frac{z}{y}\right)}\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{y}\right)}\right)\right)\right) \]
      9. /-lowering-/.f6490.1%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
    6. Applied egg-rr90.1%

      \[\leadsto \color{blue}{\frac{x}{\frac{1}{1 - \frac{z}{y}}}} \]
    7. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto \frac{x}{1} \cdot \color{blue}{\left(1 - \frac{z}{y}\right)} \]
      2. /-rgt-identityN/A

        \[\leadsto x \cdot \left(\color{blue}{1} - \frac{z}{y}\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(1 - \frac{z}{y}\right) \cdot \color{blue}{x} \]
      4. *-inversesN/A

        \[\leadsto \left(\frac{y}{y} - \frac{z}{y}\right) \cdot x \]
      5. div-subN/A

        \[\leadsto \frac{y - z}{y} \cdot x \]
      6. associate-/r/N/A

        \[\leadsto \frac{y - z}{\color{blue}{\frac{y}{x}}} \]
      7. div-subN/A

        \[\leadsto \frac{y}{\frac{y}{x}} - \color{blue}{\frac{z}{\frac{y}{x}}} \]
      8. un-div-invN/A

        \[\leadsto y \cdot \frac{1}{\frac{y}{x}} - \frac{\color{blue}{z}}{\frac{y}{x}} \]
      9. associate-/r/N/A

        \[\leadsto y \cdot \left(\frac{1}{y} \cdot x\right) - \frac{z}{\frac{y}{x}} \]
      10. associate-*r*N/A

        \[\leadsto \left(y \cdot \frac{1}{y}\right) \cdot x - \frac{\color{blue}{z}}{\frac{y}{x}} \]
      11. div-invN/A

        \[\leadsto \frac{y}{y} \cdot x - \frac{z}{\frac{y}{x}} \]
      12. *-inversesN/A

        \[\leadsto 1 \cdot x - \frac{z}{\frac{y}{x}} \]
      13. *-lft-identityN/A

        \[\leadsto x - \frac{\color{blue}{z}}{\frac{y}{x}} \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{z}{\frac{y}{x}}\right)}\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{y}{x}\right)}\right)\right) \]
      16. /-lowering-/.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
    8. Applied egg-rr99.8%

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

    if -2.00000000000000009e48 < z

    1. Initial program 84.4%

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

        \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
      3. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
      6. /-lowering-/.f6497.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
    3. Simplified97.9%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 73.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-37}:\\ \;\;\;\;z \cdot \frac{x}{0 - y}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{z \cdot x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -5e-37)
   (* z (/ x (- 0.0 y)))
   (if (<= z 1.05e+23) x (- 0.0 (/ (* z x) y)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -5e-37) {
		tmp = z * (x / (0.0 - y));
	} else if (z <= 1.05e+23) {
		tmp = x;
	} else {
		tmp = 0.0 - ((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 <= (-5d-37)) then
        tmp = z * (x / (0.0d0 - y))
    else if (z <= 1.05d+23) then
        tmp = x
    else
        tmp = 0.0d0 - ((z * x) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -5e-37) {
		tmp = z * (x / (0.0 - y));
	} else if (z <= 1.05e+23) {
		tmp = x;
	} else {
		tmp = 0.0 - ((z * x) / y);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -5e-37:
		tmp = z * (x / (0.0 - y))
	elif z <= 1.05e+23:
		tmp = x
	else:
		tmp = 0.0 - ((z * x) / y)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -5e-37)
		tmp = Float64(z * Float64(x / Float64(0.0 - y)));
	elseif (z <= 1.05e+23)
		tmp = x;
	else
		tmp = Float64(0.0 - Float64(Float64(z * x) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -5e-37)
		tmp = z * (x / (0.0 - y));
	elseif (z <= 1.05e+23)
		tmp = x;
	else
		tmp = 0.0 - ((z * x) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -5e-37], N[(z * N[(x / N[(0.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+23], x, N[(0.0 - N[(N[(z * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-37}:\\
\;\;\;\;z \cdot \frac{x}{0 - y}\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{+23}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.9999999999999997e-37

    1. Initial program 95.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
      3. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
      6. /-lowering-/.f6491.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. flip3--N/A

        \[\leadsto x \cdot \frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}} \]
      2. clear-numN/A

        \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}\right)}\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}}}\right)\right) \]
      6. flip3--N/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{1 - \color{blue}{\frac{z}{y}}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(1 - \frac{z}{y}\right)}\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{y}\right)}\right)\right)\right) \]
      9. /-lowering-/.f6491.7%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
    6. Applied egg-rr91.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{1}{1 - \frac{z}{y}}}} \]
    7. Taylor expanded in z around inf

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y}{z}\right)}\right) \]
    8. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(0 - \color{blue}{\frac{y}{z}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      4. /-lowering-/.f6464.4%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    9. Simplified64.4%

      \[\leadsto \frac{x}{\color{blue}{0 - \frac{y}{z}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{0 - \frac{y}{z}}{x}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{1}{0 - \frac{y}{z}} \cdot \color{blue}{x} \]
      3. sub0-negN/A

        \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{y}{z}\right)} \cdot x \]
      4. distribute-frac-neg2N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{y}{z}}\right)\right) \cdot x \]
      5. clear-numN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{z}{y}\right)\right) \cdot x \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{neg}\left(\frac{z}{y} \cdot x\right) \]
      7. associate-/r/N/A

        \[\leadsto \mathsf{neg}\left(\frac{z}{\frac{y}{x}}\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{neg}\left(z \cdot \frac{1}{\frac{y}{x}}\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{neg}\left(z \cdot \frac{x}{y}\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)} \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)}\right) \]
      12. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{neg.f64}\left(\left(\frac{x}{y}\right)\right)\right) \]
      13. /-lowering-/.f6481.5%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, y\right)\right)\right) \]
    11. Applied egg-rr81.5%

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

    if -4.9999999999999997e-37 < z < 1.0500000000000001e23

    1. Initial program 80.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
      3. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
      6. /-lowering-/.f6499.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0

      \[\leadsto \color{blue}{x} \]
    6. Step-by-step derivation
      1. Simplified74.6%

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

      if 1.0500000000000001e23 < z

      1. Initial program 88.5%

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

          \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
        3. div-subN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
        5. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
        6. /-lowering-/.f6493.4%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
      3. Simplified93.4%

        \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. flip3--N/A

          \[\leadsto x \cdot \frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}} \]
        2. clear-numN/A

          \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
        3. un-div-invN/A

          \[\leadsto \frac{x}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}\right)}\right) \]
        5. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}}}\right)\right) \]
        6. flip3--N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{1 - \color{blue}{\frac{z}{y}}}\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(1 - \frac{z}{y}\right)}\right)\right) \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{y}\right)}\right)\right)\right) \]
        9. /-lowering-/.f6493.2%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
      6. Applied egg-rr93.2%

        \[\leadsto \color{blue}{\frac{x}{\frac{1}{1 - \frac{z}{y}}}} \]
      7. Taylor expanded in z around inf

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y}{z}\right)}\right) \]
      8. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right) \]
        2. neg-sub0N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(0 - \color{blue}{\frac{y}{z}}\right)\right) \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        4. /-lowering-/.f6466.2%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      9. Simplified66.2%

        \[\leadsto \frac{x}{\color{blue}{0 - \frac{y}{z}}} \]
      10. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{0 - \frac{y}{z}}{x}}} \]
        2. associate-/r/N/A

          \[\leadsto \frac{1}{0 - \frac{y}{z}} \cdot \color{blue}{x} \]
        3. sub0-negN/A

          \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{y}{z}\right)} \cdot x \]
        4. distribute-frac-neg2N/A

          \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{y}{z}}\right)\right) \cdot x \]
        5. clear-numN/A

          \[\leadsto \left(\mathsf{neg}\left(\frac{z}{y}\right)\right) \cdot x \]
        6. distribute-lft-neg-inN/A

          \[\leadsto \mathsf{neg}\left(\frac{z}{y} \cdot x\right) \]
        7. associate-/r/N/A

          \[\leadsto \mathsf{neg}\left(\frac{z}{\frac{y}{x}}\right) \]
        8. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{\frac{y}{x}}\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \left(\frac{y}{x}\right)\right)\right) \]
        10. /-lowering-/.f6474.2%

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \mathsf{/.f64}\left(y, x\right)\right)\right) \]
      11. Applied egg-rr74.2%

        \[\leadsto \color{blue}{-\frac{z}{\frac{y}{x}}} \]
      12. Step-by-step derivation
        1. associate-/r/N/A

          \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{y} \cdot x\right)\right) \]
        2. associate-*l/N/A

          \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z \cdot x}{y}\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(z \cdot x\right), y\right)\right) \]
        4. *-lowering-*.f6476.0%

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(z, x\right), y\right)\right) \]
      13. Applied egg-rr76.0%

        \[\leadsto -\color{blue}{\frac{z \cdot x}{y}} \]
    7. Recombined 3 regimes into one program.
    8. Final simplification77.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-37}:\\ \;\;\;\;z \cdot \frac{x}{0 - y}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{z \cdot x}{y}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 73.3% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.9 \cdot 10^{-36}:\\ \;\;\;\;\frac{z}{\frac{0 - y}{x}}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{z \cdot x}{y}\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= z -5.9e-36)
       (/ z (/ (- 0.0 y) x))
       (if (<= z 6.8e+21) x (- 0.0 (/ (* z x) y)))))
    double code(double x, double y, double z) {
    	double tmp;
    	if (z <= -5.9e-36) {
    		tmp = z / ((0.0 - y) / x);
    	} else if (z <= 6.8e+21) {
    		tmp = x;
    	} else {
    		tmp = 0.0 - ((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 <= (-5.9d-36)) then
            tmp = z / ((0.0d0 - y) / x)
        else if (z <= 6.8d+21) then
            tmp = x
        else
            tmp = 0.0d0 - ((z * x) / y)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if (z <= -5.9e-36) {
    		tmp = z / ((0.0 - y) / x);
    	} else if (z <= 6.8e+21) {
    		tmp = x;
    	} else {
    		tmp = 0.0 - ((z * x) / y);
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if z <= -5.9e-36:
    		tmp = z / ((0.0 - y) / x)
    	elif z <= 6.8e+21:
    		tmp = x
    	else:
    		tmp = 0.0 - ((z * x) / y)
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (z <= -5.9e-36)
    		tmp = Float64(z / Float64(Float64(0.0 - y) / x));
    	elseif (z <= 6.8e+21)
    		tmp = x;
    	else
    		tmp = Float64(0.0 - Float64(Float64(z * x) / y));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if (z <= -5.9e-36)
    		tmp = z / ((0.0 - y) / x);
    	elseif (z <= 6.8e+21)
    		tmp = x;
    	else
    		tmp = 0.0 - ((z * x) / y);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[z, -5.9e-36], N[(z / N[(N[(0.0 - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+21], x, N[(0.0 - N[(N[(z * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -5.9 \cdot 10^{-36}:\\
    \;\;\;\;\frac{z}{\frac{0 - y}{x}}\\
    
    \mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\
    \;\;\;\;x\\
    
    \mathbf{else}:\\
    \;\;\;\;0 - \frac{z \cdot x}{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -5.89999999999999995e-36

      1. Initial program 95.1%

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

          \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
        3. div-subN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
        5. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
        6. /-lowering-/.f6491.8%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
      3. Simplified91.8%

        \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. flip3--N/A

          \[\leadsto x \cdot \frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}} \]
        2. clear-numN/A

          \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
        3. un-div-invN/A

          \[\leadsto \frac{x}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}\right)}\right) \]
        5. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}}}\right)\right) \]
        6. flip3--N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{1 - \color{blue}{\frac{z}{y}}}\right)\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(1 - \frac{z}{y}\right)}\right)\right) \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{y}\right)}\right)\right)\right) \]
        9. /-lowering-/.f6491.7%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
      6. Applied egg-rr91.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{1}{1 - \frac{z}{y}}}} \]
      7. Taylor expanded in z around inf

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y}{z}\right)}\right) \]
      8. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right) \]
        2. neg-sub0N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(0 - \color{blue}{\frac{y}{z}}\right)\right) \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        4. /-lowering-/.f6464.4%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      9. Simplified64.4%

        \[\leadsto \frac{x}{\color{blue}{0 - \frac{y}{z}}} \]
      10. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{0 - \frac{y}{z}}{x}}} \]
        2. associate-/r/N/A

          \[\leadsto \frac{1}{0 - \frac{y}{z}} \cdot \color{blue}{x} \]
        3. sub0-negN/A

          \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{y}{z}\right)} \cdot x \]
        4. distribute-frac-neg2N/A

          \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{y}{z}}\right)\right) \cdot x \]
        5. clear-numN/A

          \[\leadsto \left(\mathsf{neg}\left(\frac{z}{y}\right)\right) \cdot x \]
        6. distribute-lft-neg-inN/A

          \[\leadsto \mathsf{neg}\left(\frac{z}{y} \cdot x\right) \]
        7. associate-/r/N/A

          \[\leadsto \mathsf{neg}\left(\frac{z}{\frac{y}{x}}\right) \]
        8. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{\frac{y}{x}}\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \left(\frac{y}{x}\right)\right)\right) \]
        10. /-lowering-/.f6481.5%

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \mathsf{/.f64}\left(y, x\right)\right)\right) \]
      11. Applied egg-rr81.5%

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

      if -5.89999999999999995e-36 < z < 6.8e21

      1. Initial program 80.5%

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

          \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
        3. div-subN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
        5. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
        6. /-lowering-/.f6499.9%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
      3. Simplified99.9%

        \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in z around 0

        \[\leadsto \color{blue}{x} \]
      6. Step-by-step derivation
        1. Simplified74.6%

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

        if 6.8e21 < z

        1. Initial program 88.5%

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

            \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
          3. div-subN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
          4. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
          5. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
          6. /-lowering-/.f6493.4%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
        3. Simplified93.4%

          \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
        4. Add Preprocessing
        5. Step-by-step derivation
          1. flip3--N/A

            \[\leadsto x \cdot \frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}} \]
          2. clear-numN/A

            \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
          3. un-div-invN/A

            \[\leadsto \frac{x}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}\right)}\right) \]
          5. clear-numN/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}}}\right)\right) \]
          6. flip3--N/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{1 - \color{blue}{\frac{z}{y}}}\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(1 - \frac{z}{y}\right)}\right)\right) \]
          8. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{y}\right)}\right)\right)\right) \]
          9. /-lowering-/.f6493.2%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
        6. Applied egg-rr93.2%

          \[\leadsto \color{blue}{\frac{x}{\frac{1}{1 - \frac{z}{y}}}} \]
        7. Taylor expanded in z around inf

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y}{z}\right)}\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right) \]
          2. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(0 - \color{blue}{\frac{y}{z}}\right)\right) \]
          3. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
          4. /-lowering-/.f6466.2%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
        9. Simplified66.2%

          \[\leadsto \frac{x}{\color{blue}{0 - \frac{y}{z}}} \]
        10. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \frac{1}{\color{blue}{\frac{0 - \frac{y}{z}}{x}}} \]
          2. associate-/r/N/A

            \[\leadsto \frac{1}{0 - \frac{y}{z}} \cdot \color{blue}{x} \]
          3. sub0-negN/A

            \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{y}{z}\right)} \cdot x \]
          4. distribute-frac-neg2N/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{y}{z}}\right)\right) \cdot x \]
          5. clear-numN/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{z}{y}\right)\right) \cdot x \]
          6. distribute-lft-neg-inN/A

            \[\leadsto \mathsf{neg}\left(\frac{z}{y} \cdot x\right) \]
          7. associate-/r/N/A

            \[\leadsto \mathsf{neg}\left(\frac{z}{\frac{y}{x}}\right) \]
          8. neg-lowering-neg.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{\frac{y}{x}}\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \left(\frac{y}{x}\right)\right)\right) \]
          10. /-lowering-/.f6474.2%

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \mathsf{/.f64}\left(y, x\right)\right)\right) \]
        11. Applied egg-rr74.2%

          \[\leadsto \color{blue}{-\frac{z}{\frac{y}{x}}} \]
        12. Step-by-step derivation
          1. associate-/r/N/A

            \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{y} \cdot x\right)\right) \]
          2. associate-*l/N/A

            \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z \cdot x}{y}\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(z \cdot x\right), y\right)\right) \]
          4. *-lowering-*.f6476.0%

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(z, x\right), y\right)\right) \]
        13. Applied egg-rr76.0%

          \[\leadsto -\color{blue}{\frac{z \cdot x}{y}} \]
      7. Recombined 3 regimes into one program.
      8. Final simplification77.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.9 \cdot 10^{-36}:\\ \;\;\;\;\frac{z}{\frac{0 - y}{x}}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{z \cdot x}{y}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 72.2% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{z}{\frac{0 - y}{x}}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \frac{z}{y}\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (<= z -8.5e-36)
         (/ z (/ (- 0.0 y) x))
         (if (<= z 3.3e+22) x (- 0.0 (* x (/ z y))))))
      double code(double x, double y, double z) {
      	double tmp;
      	if (z <= -8.5e-36) {
      		tmp = z / ((0.0 - y) / x);
      	} else if (z <= 3.3e+22) {
      		tmp = x;
      	} else {
      		tmp = 0.0 - (x * (z / 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 <= (-8.5d-36)) then
              tmp = z / ((0.0d0 - y) / x)
          else if (z <= 3.3d+22) then
              tmp = x
          else
              tmp = 0.0d0 - (x * (z / y))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double tmp;
      	if (z <= -8.5e-36) {
      		tmp = z / ((0.0 - y) / x);
      	} else if (z <= 3.3e+22) {
      		tmp = x;
      	} else {
      		tmp = 0.0 - (x * (z / y));
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	tmp = 0
      	if z <= -8.5e-36:
      		tmp = z / ((0.0 - y) / x)
      	elif z <= 3.3e+22:
      		tmp = x
      	else:
      		tmp = 0.0 - (x * (z / y))
      	return tmp
      
      function code(x, y, z)
      	tmp = 0.0
      	if (z <= -8.5e-36)
      		tmp = Float64(z / Float64(Float64(0.0 - y) / x));
      	elseif (z <= 3.3e+22)
      		tmp = x;
      	else
      		tmp = Float64(0.0 - Float64(x * Float64(z / y)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if (z <= -8.5e-36)
      		tmp = z / ((0.0 - y) / x);
      	elseif (z <= 3.3e+22)
      		tmp = x;
      	else
      		tmp = 0.0 - (x * (z / y));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := If[LessEqual[z, -8.5e-36], N[(z / N[(N[(0.0 - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+22], x, N[(0.0 - N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -8.5 \cdot 10^{-36}:\\
      \;\;\;\;\frac{z}{\frac{0 - y}{x}}\\
      
      \mathbf{elif}\;z \leq 3.3 \cdot 10^{+22}:\\
      \;\;\;\;x\\
      
      \mathbf{else}:\\
      \;\;\;\;0 - x \cdot \frac{z}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -8.5000000000000007e-36

        1. Initial program 95.1%

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

            \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
          3. div-subN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
          4. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
          5. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
          6. /-lowering-/.f6491.8%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
        3. Simplified91.8%

          \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
        4. Add Preprocessing
        5. Step-by-step derivation
          1. flip3--N/A

            \[\leadsto x \cdot \frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}} \]
          2. clear-numN/A

            \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
          3. un-div-invN/A

            \[\leadsto \frac{x}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}\right)}\right) \]
          5. clear-numN/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}}}\right)\right) \]
          6. flip3--N/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{1 - \color{blue}{\frac{z}{y}}}\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(1 - \frac{z}{y}\right)}\right)\right) \]
          8. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{y}\right)}\right)\right)\right) \]
          9. /-lowering-/.f6491.7%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
        6. Applied egg-rr91.7%

          \[\leadsto \color{blue}{\frac{x}{\frac{1}{1 - \frac{z}{y}}}} \]
        7. Taylor expanded in z around inf

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y}{z}\right)}\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right) \]
          2. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(0 - \color{blue}{\frac{y}{z}}\right)\right) \]
          3. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
          4. /-lowering-/.f6464.4%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
        9. Simplified64.4%

          \[\leadsto \frac{x}{\color{blue}{0 - \frac{y}{z}}} \]
        10. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \frac{1}{\color{blue}{\frac{0 - \frac{y}{z}}{x}}} \]
          2. associate-/r/N/A

            \[\leadsto \frac{1}{0 - \frac{y}{z}} \cdot \color{blue}{x} \]
          3. sub0-negN/A

            \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{y}{z}\right)} \cdot x \]
          4. distribute-frac-neg2N/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{y}{z}}\right)\right) \cdot x \]
          5. clear-numN/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{z}{y}\right)\right) \cdot x \]
          6. distribute-lft-neg-inN/A

            \[\leadsto \mathsf{neg}\left(\frac{z}{y} \cdot x\right) \]
          7. associate-/r/N/A

            \[\leadsto \mathsf{neg}\left(\frac{z}{\frac{y}{x}}\right) \]
          8. neg-lowering-neg.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{\frac{y}{x}}\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \left(\frac{y}{x}\right)\right)\right) \]
          10. /-lowering-/.f6481.5%

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \mathsf{/.f64}\left(y, x\right)\right)\right) \]
        11. Applied egg-rr81.5%

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

        if -8.5000000000000007e-36 < z < 3.2999999999999998e22

        1. Initial program 80.5%

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

            \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
          3. div-subN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
          4. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
          5. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
          6. /-lowering-/.f6499.9%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
        3. Simplified99.9%

          \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in z around 0

          \[\leadsto \color{blue}{x} \]
        6. Step-by-step derivation
          1. Simplified74.6%

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

          if 3.2999999999999998e22 < z

          1. Initial program 88.5%

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

              \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
            3. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
            5. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
            6. /-lowering-/.f6493.4%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
          3. Simplified93.4%

            \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. flip3--N/A

              \[\leadsto x \cdot \frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}} \]
            2. clear-numN/A

              \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
            3. un-div-invN/A

              \[\leadsto \frac{x}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}\right)}\right) \]
            5. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}}}\right)\right) \]
            6. flip3--N/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{1 - \color{blue}{\frac{z}{y}}}\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(1 - \frac{z}{y}\right)}\right)\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{y}\right)}\right)\right)\right) \]
            9. /-lowering-/.f6493.2%

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
          6. Applied egg-rr93.2%

            \[\leadsto \color{blue}{\frac{x}{\frac{1}{1 - \frac{z}{y}}}} \]
          7. Taylor expanded in z around inf

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y}{z}\right)}\right) \]
          8. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right) \]
            2. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(0 - \color{blue}{\frac{y}{z}}\right)\right) \]
            3. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
            4. /-lowering-/.f6466.2%

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
          9. Simplified66.2%

            \[\leadsto \frac{x}{\color{blue}{0 - \frac{y}{z}}} \]
          10. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \frac{1}{\color{blue}{\frac{0 - \frac{y}{z}}{x}}} \]
            2. associate-/r/N/A

              \[\leadsto \frac{1}{0 - \frac{y}{z}} \cdot \color{blue}{x} \]
            3. sub0-negN/A

              \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{y}{z}\right)} \cdot x \]
            4. distribute-frac-neg2N/A

              \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{y}{z}}\right)\right) \cdot x \]
            5. clear-numN/A

              \[\leadsto \left(\mathsf{neg}\left(\frac{z}{y}\right)\right) \cdot x \]
            6. distribute-lft-neg-inN/A

              \[\leadsto \mathsf{neg}\left(\frac{z}{y} \cdot x\right) \]
            7. associate-/r/N/A

              \[\leadsto \mathsf{neg}\left(\frac{z}{\frac{y}{x}}\right) \]
            8. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{\frac{y}{x}}\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \left(\frac{y}{x}\right)\right)\right) \]
            10. /-lowering-/.f6474.2%

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \mathsf{/.f64}\left(y, x\right)\right)\right) \]
          11. Applied egg-rr74.2%

            \[\leadsto \color{blue}{-\frac{z}{\frac{y}{x}}} \]
          12. Step-by-step derivation
            1. associate-/r/N/A

              \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{y} \cdot x\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{z}{y}\right), x\right)\right) \]
            3. /-lowering-/.f6474.5%

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(z, y\right), x\right)\right) \]
          13. Applied egg-rr74.5%

            \[\leadsto -\color{blue}{\frac{z}{y} \cdot x} \]
        7. Recombined 3 regimes into one program.
        8. Final simplification76.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{z}{\frac{0 - y}{x}}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \frac{z}{y}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 5: 71.2% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0 - x \cdot \frac{z}{y}\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{-36}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (- 0.0 (* x (/ z y)))))
           (if (<= z -1.15e-36) t_0 (if (<= z 7.5e+21) x t_0))))
        double code(double x, double y, double z) {
        	double t_0 = 0.0 - (x * (z / y));
        	double tmp;
        	if (z <= -1.15e-36) {
        		tmp = t_0;
        	} else if (z <= 7.5e+21) {
        		tmp = x;
        	} else {
        		tmp = t_0;
        	}
        	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) :: t_0
            real(8) :: tmp
            t_0 = 0.0d0 - (x * (z / y))
            if (z <= (-1.15d-36)) then
                tmp = t_0
            else if (z <= 7.5d+21) then
                tmp = x
            else
                tmp = t_0
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = 0.0 - (x * (z / y));
        	double tmp;
        	if (z <= -1.15e-36) {
        		tmp = t_0;
        	} else if (z <= 7.5e+21) {
        		tmp = x;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = 0.0 - (x * (z / y))
        	tmp = 0
        	if z <= -1.15e-36:
        		tmp = t_0
        	elif z <= 7.5e+21:
        		tmp = x
        	else:
        		tmp = t_0
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(0.0 - Float64(x * Float64(z / y)))
        	tmp = 0.0
        	if (z <= -1.15e-36)
        		tmp = t_0;
        	elseif (z <= 7.5e+21)
        		tmp = x;
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = 0.0 - (x * (z / y));
        	tmp = 0.0;
        	if (z <= -1.15e-36)
        		tmp = t_0;
        	elseif (z <= 7.5e+21)
        		tmp = x;
        	else
        		tmp = t_0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(0.0 - N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e-36], t$95$0, If[LessEqual[z, 7.5e+21], x, t$95$0]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := 0 - x \cdot \frac{z}{y}\\
        \mathbf{if}\;z \leq -1.15 \cdot 10^{-36}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;z \leq 7.5 \cdot 10^{+21}:\\
        \;\;\;\;x\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.14999999999999998e-36 or 7.5e21 < z

          1. Initial program 92.3%

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

              \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
            3. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
            5. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
            6. /-lowering-/.f6492.4%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
          3. Simplified92.4%

            \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. flip3--N/A

              \[\leadsto x \cdot \frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}} \]
            2. clear-numN/A

              \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
            3. un-div-invN/A

              \[\leadsto \frac{x}{\color{blue}{\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}}} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}\right)}\right) \]
            5. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{{1}^{3} - {\left(\frac{z}{y}\right)}^{3}}{1 \cdot 1 + \left(\frac{z}{y} \cdot \frac{z}{y} + 1 \cdot \frac{z}{y}\right)}}}\right)\right) \]
            6. flip3--N/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{1 - \color{blue}{\frac{z}{y}}}\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(1 - \frac{z}{y}\right)}\right)\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{z}{y}\right)}\right)\right)\right) \]
            9. /-lowering-/.f6492.4%

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
          6. Applied egg-rr92.4%

            \[\leadsto \color{blue}{\frac{x}{\frac{1}{1 - \frac{z}{y}}}} \]
          7. Taylor expanded in z around inf

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \frac{y}{z}\right)}\right) \]
          8. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\frac{y}{z}\right)\right)\right) \]
            2. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(0 - \color{blue}{\frac{y}{z}}\right)\right) \]
            3. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
            4. /-lowering-/.f6465.2%

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
          9. Simplified65.2%

            \[\leadsto \frac{x}{\color{blue}{0 - \frac{y}{z}}} \]
          10. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \frac{1}{\color{blue}{\frac{0 - \frac{y}{z}}{x}}} \]
            2. associate-/r/N/A

              \[\leadsto \frac{1}{0 - \frac{y}{z}} \cdot \color{blue}{x} \]
            3. sub0-negN/A

              \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{y}{z}\right)} \cdot x \]
            4. distribute-frac-neg2N/A

              \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{y}{z}}\right)\right) \cdot x \]
            5. clear-numN/A

              \[\leadsto \left(\mathsf{neg}\left(\frac{z}{y}\right)\right) \cdot x \]
            6. distribute-lft-neg-inN/A

              \[\leadsto \mathsf{neg}\left(\frac{z}{y} \cdot x\right) \]
            7. associate-/r/N/A

              \[\leadsto \mathsf{neg}\left(\frac{z}{\frac{y}{x}}\right) \]
            8. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{\frac{y}{x}}\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \left(\frac{y}{x}\right)\right)\right) \]
            10. /-lowering-/.f6478.4%

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(z, \mathsf{/.f64}\left(y, x\right)\right)\right) \]
          11. Applied egg-rr78.4%

            \[\leadsto \color{blue}{-\frac{z}{\frac{y}{x}}} \]
          12. Step-by-step derivation
            1. associate-/r/N/A

              \[\leadsto \mathsf{neg.f64}\left(\left(\frac{z}{y} \cdot x\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{z}{y}\right), x\right)\right) \]
            3. /-lowering-/.f6473.9%

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(z, y\right), x\right)\right) \]
          13. Applied egg-rr73.9%

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

          if -1.14999999999999998e-36 < z < 7.5e21

          1. Initial program 80.5%

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

              \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
            3. div-subN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
            5. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
            6. /-lowering-/.f6499.9%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
          3. Simplified99.9%

            \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
          4. Add Preprocessing
          5. Taylor expanded in z around 0

            \[\leadsto \color{blue}{x} \]
          6. Step-by-step derivation
            1. Simplified74.6%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-36}:\\ \;\;\;\;0 - x \cdot \frac{z}{y}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \frac{z}{y}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 6: 95.4% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+47}:\\ \;\;\;\;\frac{x}{y} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{y}\right)\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= z -2.1e+47) (* (/ x y) (- y z)) (* x (- 1.0 (/ z y)))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -2.1e+47) {
          		tmp = (x / y) * (y - z);
          	} else {
          		tmp = x * (1.0 - (z / 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.1d+47)) then
                  tmp = (x / y) * (y - z)
              else
                  tmp = x * (1.0d0 - (z / y))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -2.1e+47) {
          		tmp = (x / y) * (y - z);
          	} else {
          		tmp = x * (1.0 - (z / y));
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if z <= -2.1e+47:
          		tmp = (x / y) * (y - z)
          	else:
          		tmp = x * (1.0 - (z / y))
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= -2.1e+47)
          		tmp = Float64(Float64(x / y) * Float64(y - z));
          	else
          		tmp = Float64(x * Float64(1.0 - Float64(z / y)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if (z <= -2.1e+47)
          		tmp = (x / y) * (y - z);
          	else
          		tmp = x * (1.0 - (z / y));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[z, -2.1e+47], N[(N[(x / y), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -2.1 \cdot 10^{+47}:\\
          \;\;\;\;\frac{x}{y} \cdot \left(y - z\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;x \cdot \left(1 - \frac{z}{y}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -2.1e47

            1. Initial program 94.2%

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

                \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
              3. div-subN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
              5. *-inversesN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
              6. /-lowering-/.f6490.1%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
            3. Simplified90.1%

              \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
            4. Add Preprocessing
            5. Step-by-step derivation
              1. *-inversesN/A

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

                \[\leadsto x \cdot \frac{y - z}{\color{blue}{y}} \]
              3. associate-/l*N/A

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

                \[\leadsto \frac{\left(y - z\right) \cdot x}{y} \]
              5. associate-/l*N/A

                \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{x}{y}} \]
              6. *-commutativeN/A

                \[\leadsto \frac{x}{y} \cdot \color{blue}{\left(y - z\right)} \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{y}\right), \color{blue}{\left(y - z\right)}\right) \]
              8. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\color{blue}{y} - z\right)\right) \]
              9. --lowering--.f6496.3%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
            6. Applied egg-rr96.3%

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

            if -2.1e47 < z

            1. Initial program 84.4%

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

                \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
              3. div-subN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
              5. *-inversesN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
              6. /-lowering-/.f6497.9%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
            3. Simplified97.9%

              \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
            4. Add Preprocessing
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 7: 52.2% accurate, 0.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \end{array} \end{array} \]
          (FPCore (x y z) :precision binary64 (if (<= x 2e+34) x (* y (/ x y))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (x <= 2e+34) {
          		tmp = x;
          	} else {
          		tmp = y * (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 (x <= 2d+34) then
                  tmp = x
              else
                  tmp = y * (x / y)
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double tmp;
          	if (x <= 2e+34) {
          		tmp = x;
          	} else {
          		tmp = y * (x / y);
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if x <= 2e+34:
          		tmp = x
          	else:
          		tmp = y * (x / y)
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (x <= 2e+34)
          		tmp = x;
          	else
          		tmp = Float64(y * Float64(x / y));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if (x <= 2e+34)
          		tmp = x;
          	else
          		tmp = y * (x / y);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[x, 2e+34], x, N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq 2 \cdot 10^{+34}:\\
          \;\;\;\;x\\
          
          \mathbf{else}:\\
          \;\;\;\;y \cdot \frac{x}{y}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 1.99999999999999989e34

            1. Initial program 88.9%

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

                \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
              3. div-subN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
              5. *-inversesN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
              6. /-lowering-/.f6494.7%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
            3. Simplified94.7%

              \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in z around 0

              \[\leadsto \color{blue}{x} \]
            6. Step-by-step derivation
              1. Simplified45.8%

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

              if 1.99999999999999989e34 < x

              1. Initial program 80.3%

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

                \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(x \cdot y\right)}, y\right) \]
              4. Step-by-step derivation
                1. *-lowering-*.f6428.6%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), y\right) \]
              5. Simplified28.6%

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

                  \[\leadsto \frac{x}{y} \cdot \color{blue}{y} \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{y}\right), \color{blue}{y}\right) \]
                3. /-lowering-/.f6450.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, y\right), y\right) \]
              7. Applied egg-rr50.0%

                \[\leadsto \color{blue}{\frac{x}{y} \cdot y} \]
            7. Recombined 2 regimes into one program.
            8. Final simplification46.8%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \end{array} \]
            9. Add Preprocessing

            Alternative 8: 96.0% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ x \cdot \left(1 - \frac{z}{y}\right) \end{array} \]
            (FPCore (x y z) :precision binary64 (* x (- 1.0 (/ z y))))
            double code(double x, double y, double z) {
            	return x * (1.0 - (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 * (1.0d0 - (z / y))
            end function
            
            public static double code(double x, double y, double z) {
            	return x * (1.0 - (z / y));
            }
            
            def code(x, y, z):
            	return x * (1.0 - (z / y))
            
            function code(x, y, z)
            	return Float64(x * Float64(1.0 - Float64(z / y)))
            end
            
            function tmp = code(x, y, z)
            	tmp = x * (1.0 - (z / y));
            end
            
            code[x_, y_, z_] := N[(x * N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            x \cdot \left(1 - \frac{z}{y}\right)
            \end{array}
            
            Derivation
            1. Initial program 86.9%

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

                \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
              3. div-subN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
              5. *-inversesN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
              6. /-lowering-/.f6495.9%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
            3. Simplified95.9%

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

            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.9%

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

                \[\leadsto x \cdot \color{blue}{\frac{y - z}{y}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y - z}{y}\right)}\right) \]
              3. div-subN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{y} - \color{blue}{\frac{z}{y}}\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(\left(\frac{y}{y}\right), \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
              5. *-inversesN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(\frac{\color{blue}{z}}{y}\right)\right)\right) \]
              6. /-lowering-/.f6495.9%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
            3. Simplified95.9%

              \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{y}\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in z around 0

              \[\leadsto \color{blue}{x} \]
            6. Step-by-step derivation
              1. Simplified45.6%

                \[\leadsto \color{blue}{x} \]
              2. Add Preprocessing

              Developer Target 1: 96.2% accurate, 0.4× 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 2024161 
              (FPCore (x y z)
                :name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
                :precision binary64
              
                :alt
                (! :herbie-platform default (if (< z -206020233192173900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- x (/ (* z x) y)) (if (< z 1693976601382852600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ x (/ y (- y z))) (* (- y z) (/ x y)))))
              
                (/ (* x (- y z)) y))