Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D

Percentage Accurate: 99.5% → 99.8%
Time: 13.2s
Alternatives: 14
Speedup: 1.2×

Specification

?
\[\begin{array}{l} \\ x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
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 - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z):
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z)
	return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z)))
end
function tmp = code(x, y, z)
	tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\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 14 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: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
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 - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z):
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z)
	return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z)))
end
function tmp = code(x, y, z)
	tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}

Alternative 1: 99.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ x + \left(y - x\right) \cdot \left(4 + z \cdot -6\right) \end{array} \]
(FPCore (x y z) :precision binary64 (+ x (* (- y x) (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
	return x + ((y - x) * (4.0 + (z * -6.0)));
}
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 - x) * (4.0d0 + (z * (-6.0d0))))
end function
public static double code(double x, double y, double z) {
	return x + ((y - x) * (4.0 + (z * -6.0)));
}
def code(x, y, z):
	return x + ((y - x) * (4.0 + (z * -6.0)))
function code(x, y, z)
	return Float64(x + Float64(Float64(y - x) * Float64(4.0 + Float64(z * -6.0))))
end
function tmp = code(x, y, z)
	tmp = x + ((y - x) * (4.0 + (z * -6.0)));
end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - x\right) \cdot \left(4 + z \cdot -6\right)
\end{array}
Derivation
  1. Initial program 99.5%

    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
  2. Step-by-step derivation
    1. +-lowering-+.f64N/A

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

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

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
    5. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
    6. distribute-lft-inN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
    7. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
    8. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
    10. metadata-evalN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
    11. distribute-lft-neg-outN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
    12. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
    13. metadata-evalN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
    14. metadata-evalN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
    15. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
    16. metadata-eval99.7%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
  3. Simplified99.7%

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

Alternative 2: 51.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+195}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \mathbf{elif}\;z \leq -0.13:\\ \;\;\;\;z \cdot \left(y \cdot -6\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-293}:\\ \;\;\;\;\frac{1}{\frac{-0.3333333333333333}{x}}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 10^{+182}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -7.6e+195)
   (* z (* x 6.0))
   (if (<= z -0.13)
     (* z (* y -6.0))
     (if (<= z -3e-293)
       (/ 1.0 (/ -0.3333333333333333 x))
       (if (<= z 7.5e-125)
         (* y 4.0)
         (if (<= z 1.4e-6)
           (* x -3.0)
           (if (<= z 1e+182) (* x (* z 6.0)) (* y (* z -6.0)))))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -7.6e+195) {
		tmp = z * (x * 6.0);
	} else if (z <= -0.13) {
		tmp = z * (y * -6.0);
	} else if (z <= -3e-293) {
		tmp = 1.0 / (-0.3333333333333333 / x);
	} else if (z <= 7.5e-125) {
		tmp = y * 4.0;
	} else if (z <= 1.4e-6) {
		tmp = x * -3.0;
	} else if (z <= 1e+182) {
		tmp = x * (z * 6.0);
	} else {
		tmp = y * (z * -6.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) :: tmp
    if (z <= (-7.6d+195)) then
        tmp = z * (x * 6.0d0)
    else if (z <= (-0.13d0)) then
        tmp = z * (y * (-6.0d0))
    else if (z <= (-3d-293)) then
        tmp = 1.0d0 / ((-0.3333333333333333d0) / x)
    else if (z <= 7.5d-125) then
        tmp = y * 4.0d0
    else if (z <= 1.4d-6) then
        tmp = x * (-3.0d0)
    else if (z <= 1d+182) then
        tmp = x * (z * 6.0d0)
    else
        tmp = y * (z * (-6.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -7.6e+195) {
		tmp = z * (x * 6.0);
	} else if (z <= -0.13) {
		tmp = z * (y * -6.0);
	} else if (z <= -3e-293) {
		tmp = 1.0 / (-0.3333333333333333 / x);
	} else if (z <= 7.5e-125) {
		tmp = y * 4.0;
	} else if (z <= 1.4e-6) {
		tmp = x * -3.0;
	} else if (z <= 1e+182) {
		tmp = x * (z * 6.0);
	} else {
		tmp = y * (z * -6.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -7.6e+195:
		tmp = z * (x * 6.0)
	elif z <= -0.13:
		tmp = z * (y * -6.0)
	elif z <= -3e-293:
		tmp = 1.0 / (-0.3333333333333333 / x)
	elif z <= 7.5e-125:
		tmp = y * 4.0
	elif z <= 1.4e-6:
		tmp = x * -3.0
	elif z <= 1e+182:
		tmp = x * (z * 6.0)
	else:
		tmp = y * (z * -6.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -7.6e+195)
		tmp = Float64(z * Float64(x * 6.0));
	elseif (z <= -0.13)
		tmp = Float64(z * Float64(y * -6.0));
	elseif (z <= -3e-293)
		tmp = Float64(1.0 / Float64(-0.3333333333333333 / x));
	elseif (z <= 7.5e-125)
		tmp = Float64(y * 4.0);
	elseif (z <= 1.4e-6)
		tmp = Float64(x * -3.0);
	elseif (z <= 1e+182)
		tmp = Float64(x * Float64(z * 6.0));
	else
		tmp = Float64(y * Float64(z * -6.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -7.6e+195)
		tmp = z * (x * 6.0);
	elseif (z <= -0.13)
		tmp = z * (y * -6.0);
	elseif (z <= -3e-293)
		tmp = 1.0 / (-0.3333333333333333 / x);
	elseif (z <= 7.5e-125)
		tmp = y * 4.0;
	elseif (z <= 1.4e-6)
		tmp = x * -3.0;
	elseif (z <= 1e+182)
		tmp = x * (z * 6.0);
	else
		tmp = y * (z * -6.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -7.6e+195], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.13], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3e-293], N[(1.0 / N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-6], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1e+182], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+195}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\

\mathbf{elif}\;z \leq -0.13:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-293}:\\
\;\;\;\;\frac{1}{\frac{-0.3333333333333333}{x}}\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-125}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 10^{+182}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -7.6e195

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
      6. distribute-lft-inN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
      10. associate-+l+N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
      15. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
      16. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
      18. metadata-eval63.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
    5. Simplified63.2%

      \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
    6. Taylor expanded in z around inf

      \[\leadsto \color{blue}{6 \cdot \left(x \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot x\right)}\right) \]
      4. *-lowering-*.f6463.4%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(6, \color{blue}{x}\right)\right) \]
    8. Simplified63.4%

      \[\leadsto \color{blue}{z \cdot \left(6 \cdot x\right)} \]

    if -7.6e195 < z < -0.13

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
      6. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
      16. metadata-eval99.6%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
    3. Simplified99.6%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(y - x\right), \color{blue}{\left(4 + z \cdot -6\right)}\right)\right)\right)\right) \]
    6. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{1}{x + \left(y - x\right) \cdot \left(4 + z \cdot -6\right)}}} \]
    7. Taylor expanded in z around inf

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{-0.16666666666666666}{z \cdot \left(y - x\right)}}} \]
    10. Taylor expanded in y around inf

      \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
    11. Step-by-step derivation
      1. associate-*r*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(-6 \cdot y\right)}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(y \cdot \color{blue}{-6}\right)\right) \]
      5. *-lowering-*.f6458.9%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(y, \color{blue}{-6}\right)\right) \]
    12. Simplified58.9%

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

    if -0.13 < z < -3.0000000000000002e-293

    1. Initial program 99.1%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
      6. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
      16. metadata-eval99.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
    3. Simplified99.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{1}{x + \left(y - x\right) \cdot \left(4 + z \cdot -6\right)}}} \]
    7. Taylor expanded in x around inf

      \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{1}{x \cdot \left(1 + -1 \cdot \left(4 + -6 \cdot z\right)\right)}\right)}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{x}}{\color{blue}{1 + -1 \cdot \left(4 + -6 \cdot z\right)}}\right)\right) \]
      2. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \left(\color{blue}{1} + -1 \cdot \left(4 + -6 \cdot z\right)\right)\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \left(1 + \left(-1 \cdot 4 + \color{blue}{-1 \cdot \left(-6 \cdot z\right)}\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \left(1 + \left(-4 + \color{blue}{-1} \cdot \left(-6 \cdot z\right)\right)\right)\right)\right) \]
      6. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \left(\left(1 + -4\right) + \color{blue}{-1 \cdot \left(-6 \cdot z\right)}\right)\right)\right) \]
      7. metadata-evalN/A

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(-3, \color{blue}{\left(-1 \cdot \left(-6 \cdot z\right)\right)}\right)\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(-3, \left(\left(-1 \cdot -6\right) \cdot \color{blue}{z}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(-3, \left(6 \cdot z\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(-3, \left(z \cdot \color{blue}{6}\right)\right)\right)\right) \]
      12. *-lowering-*.f6453.8%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(-3, \mathsf{*.f64}\left(z, \color{blue}{6}\right)\right)\right)\right) \]
    9. Simplified53.8%

      \[\leadsto \frac{1}{\color{blue}{\frac{\frac{1}{x}}{-3 + z \cdot 6}}} \]
    10. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{-1}{3}}{x}\right)}\right) \]
    11. Step-by-step derivation
      1. /-lowering-/.f6453.9%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\frac{-1}{3}, \color{blue}{x}\right)\right) \]
    12. Simplified53.9%

      \[\leadsto \frac{1}{\color{blue}{\frac{-0.3333333333333333}{x}}} \]

    if -3.0000000000000002e-293 < z < 7.5e-125

    1. Initial program 99.3%

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

      \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
      3. --lowering--.f6464.9%

        \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
    5. Simplified64.9%

      \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
    6. Taylor expanded in z around 0

      \[\leadsto \color{blue}{4 \cdot y} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{4} \]
      2. *-lowering-*.f6465.1%

        \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{4}\right) \]
    8. Simplified65.1%

      \[\leadsto \color{blue}{y \cdot 4} \]

    if 7.5e-125 < z < 1.39999999999999994e-6

    1. Initial program 99.2%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
      6. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
      16. metadata-eval99.9%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
    3. Simplified99.9%

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

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

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
      2. Taylor expanded in x around inf

        \[\leadsto \color{blue}{-3 \cdot x} \]
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto x \cdot \color{blue}{-3} \]
        2. *-lowering-*.f6463.2%

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{-3}\right) \]
      4. Simplified63.2%

        \[\leadsto \color{blue}{x \cdot -3} \]

      if 1.39999999999999994e-6 < z < 1.0000000000000001e182

      1. Initial program 99.5%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
        2. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
        4. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
        6. distribute-lft-inN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
        8. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
        10. associate-+l+N/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
        15. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
        18. metadata-eval57.5%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
      5. Simplified57.5%

        \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
      6. Taylor expanded in z around inf

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(6 \cdot z\right)}\right) \]
      7. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(z \cdot \color{blue}{6}\right)\right) \]
        2. *-lowering-*.f6456.0%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{6}\right)\right) \]
      8. Simplified56.0%

        \[\leadsto x \cdot \color{blue}{\left(z \cdot 6\right)} \]

      if 1.0000000000000001e182 < z

      1. Initial program 99.8%

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

        \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
        3. --lowering--.f6464.9%

          \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
      5. Simplified64.9%

        \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
      6. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
      7. Step-by-step derivation
        1. associate-*r*N/A

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

          \[\leadsto \left(y \cdot -6\right) \cdot z \]
        3. associate-*r*N/A

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

          \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(-6 \cdot z\right)}\right) \]
        5. *-lowering-*.f6464.9%

          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(-6, \color{blue}{z}\right)\right) \]
      8. Simplified64.9%

        \[\leadsto \color{blue}{y \cdot \left(-6 \cdot z\right)} \]
    7. Recombined 7 regimes into one program.
    8. Final simplification59.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+195}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \mathbf{elif}\;z \leq -0.13:\\ \;\;\;\;z \cdot \left(y \cdot -6\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-293}:\\ \;\;\;\;\frac{1}{\frac{-0.3333333333333333}{x}}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 10^{+182}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 51.0% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+197}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \mathbf{elif}\;z \leq -0.36:\\ \;\;\;\;z \cdot \left(y \cdot -6\right)\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-296}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+181}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= z -3.8e+197)
       (* z (* x 6.0))
       (if (<= z -0.36)
         (* z (* y -6.0))
         (if (<= z -1.8e-296)
           (* x -3.0)
           (if (<= z 8.2e-125)
             (* y 4.0)
             (if (<= z 1.4e-6)
               (* x -3.0)
               (if (<= z 6.1e+181) (* x (* z 6.0)) (* y (* z -6.0)))))))))
    double code(double x, double y, double z) {
    	double tmp;
    	if (z <= -3.8e+197) {
    		tmp = z * (x * 6.0);
    	} else if (z <= -0.36) {
    		tmp = z * (y * -6.0);
    	} else if (z <= -1.8e-296) {
    		tmp = x * -3.0;
    	} else if (z <= 8.2e-125) {
    		tmp = y * 4.0;
    	} else if (z <= 1.4e-6) {
    		tmp = x * -3.0;
    	} else if (z <= 6.1e+181) {
    		tmp = x * (z * 6.0);
    	} else {
    		tmp = y * (z * -6.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) :: tmp
        if (z <= (-3.8d+197)) then
            tmp = z * (x * 6.0d0)
        else if (z <= (-0.36d0)) then
            tmp = z * (y * (-6.0d0))
        else if (z <= (-1.8d-296)) then
            tmp = x * (-3.0d0)
        else if (z <= 8.2d-125) then
            tmp = y * 4.0d0
        else if (z <= 1.4d-6) then
            tmp = x * (-3.0d0)
        else if (z <= 6.1d+181) then
            tmp = x * (z * 6.0d0)
        else
            tmp = y * (z * (-6.0d0))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if (z <= -3.8e+197) {
    		tmp = z * (x * 6.0);
    	} else if (z <= -0.36) {
    		tmp = z * (y * -6.0);
    	} else if (z <= -1.8e-296) {
    		tmp = x * -3.0;
    	} else if (z <= 8.2e-125) {
    		tmp = y * 4.0;
    	} else if (z <= 1.4e-6) {
    		tmp = x * -3.0;
    	} else if (z <= 6.1e+181) {
    		tmp = x * (z * 6.0);
    	} else {
    		tmp = y * (z * -6.0);
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if z <= -3.8e+197:
    		tmp = z * (x * 6.0)
    	elif z <= -0.36:
    		tmp = z * (y * -6.0)
    	elif z <= -1.8e-296:
    		tmp = x * -3.0
    	elif z <= 8.2e-125:
    		tmp = y * 4.0
    	elif z <= 1.4e-6:
    		tmp = x * -3.0
    	elif z <= 6.1e+181:
    		tmp = x * (z * 6.0)
    	else:
    		tmp = y * (z * -6.0)
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (z <= -3.8e+197)
    		tmp = Float64(z * Float64(x * 6.0));
    	elseif (z <= -0.36)
    		tmp = Float64(z * Float64(y * -6.0));
    	elseif (z <= -1.8e-296)
    		tmp = Float64(x * -3.0);
    	elseif (z <= 8.2e-125)
    		tmp = Float64(y * 4.0);
    	elseif (z <= 1.4e-6)
    		tmp = Float64(x * -3.0);
    	elseif (z <= 6.1e+181)
    		tmp = Float64(x * Float64(z * 6.0));
    	else
    		tmp = Float64(y * Float64(z * -6.0));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if (z <= -3.8e+197)
    		tmp = z * (x * 6.0);
    	elseif (z <= -0.36)
    		tmp = z * (y * -6.0);
    	elseif (z <= -1.8e-296)
    		tmp = x * -3.0;
    	elseif (z <= 8.2e-125)
    		tmp = y * 4.0;
    	elseif (z <= 1.4e-6)
    		tmp = x * -3.0;
    	elseif (z <= 6.1e+181)
    		tmp = x * (z * 6.0);
    	else
    		tmp = y * (z * -6.0);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[z, -3.8e+197], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.36], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.8e-296], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8.2e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-6], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.1e+181], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -3.8 \cdot 10^{+197}:\\
    \;\;\;\;z \cdot \left(x \cdot 6\right)\\
    
    \mathbf{elif}\;z \leq -0.36:\\
    \;\;\;\;z \cdot \left(y \cdot -6\right)\\
    
    \mathbf{elif}\;z \leq -1.8 \cdot 10^{-296}:\\
    \;\;\;\;x \cdot -3\\
    
    \mathbf{elif}\;z \leq 8.2 \cdot 10^{-125}:\\
    \;\;\;\;y \cdot 4\\
    
    \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\
    \;\;\;\;x \cdot -3\\
    
    \mathbf{elif}\;z \leq 6.1 \cdot 10^{+181}:\\
    \;\;\;\;x \cdot \left(z \cdot 6\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;y \cdot \left(z \cdot -6\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if z < -3.8000000000000001e197

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
        2. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
        4. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
        6. distribute-lft-inN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
        8. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
        10. associate-+l+N/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
        15. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
        16. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
        18. metadata-eval63.2%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
      5. Simplified63.2%

        \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
      6. Taylor expanded in z around inf

        \[\leadsto \color{blue}{6 \cdot \left(x \cdot z\right)} \]
      7. Step-by-step derivation
        1. associate-*r*N/A

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

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

          \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot x\right)}\right) \]
        4. *-lowering-*.f6463.4%

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(6, \color{blue}{x}\right)\right) \]
      8. Simplified63.4%

        \[\leadsto \color{blue}{z \cdot \left(6 \cdot x\right)} \]

      if -3.8000000000000001e197 < z < -0.35999999999999999

      1. Initial program 99.7%

        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
        5. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
        6. distribute-lft-inN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
        11. distribute-lft-neg-outN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
        12. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
        13. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
        14. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
        16. metadata-eval99.6%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
      3. Simplified99.6%

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(y - x\right), \color{blue}{\left(4 + z \cdot -6\right)}\right)\right)\right)\right) \]
      6. Applied egg-rr99.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{x + \left(y - x\right) \cdot \left(4 + z \cdot -6\right)}}} \]
      7. Taylor expanded in z around inf

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{-0.16666666666666666}{z \cdot \left(y - x\right)}}} \]
      10. Taylor expanded in y around inf

        \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
      11. Step-by-step derivation
        1. associate-*r*N/A

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

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

          \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(-6 \cdot y\right)}\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(z, \left(y \cdot \color{blue}{-6}\right)\right) \]
        5. *-lowering-*.f6458.9%

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(y, \color{blue}{-6}\right)\right) \]
      12. Simplified58.9%

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

      if -0.35999999999999999 < z < -1.7999999999999999e-296 or 8.1999999999999995e-125 < z < 1.39999999999999994e-6

      1. Initial program 99.2%

        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
        5. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
        6. distribute-lft-inN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
        11. distribute-lft-neg-outN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
        12. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
        13. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
        14. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
        16. metadata-eval99.7%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
      3. Simplified99.7%

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
      6. Step-by-step derivation
        1. Simplified98.5%

          \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
        2. Taylor expanded in x around inf

          \[\leadsto \color{blue}{-3 \cdot x} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto x \cdot \color{blue}{-3} \]
          2. *-lowering-*.f6457.3%

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{-3}\right) \]
        4. Simplified57.3%

          \[\leadsto \color{blue}{x \cdot -3} \]

        if -1.7999999999999999e-296 < z < 8.1999999999999995e-125

        1. Initial program 99.3%

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

          \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
          3. --lowering--.f6464.9%

            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
        5. Simplified64.9%

          \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
        6. Taylor expanded in z around 0

          \[\leadsto \color{blue}{4 \cdot y} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto y \cdot \color{blue}{4} \]
          2. *-lowering-*.f6465.1%

            \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{4}\right) \]
        8. Simplified65.1%

          \[\leadsto \color{blue}{y \cdot 4} \]

        if 1.39999999999999994e-6 < z < 6.10000000000000001e181

        1. Initial program 99.5%

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

          \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
          2. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
          3. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
          4. mul-1-negN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
          5. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
          6. distribute-lft-inN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
          8. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
          9. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
          10. associate-+l+N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
          15. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
          16. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
          17. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
          18. metadata-eval57.5%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
        5. Simplified57.5%

          \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
        6. Taylor expanded in z around inf

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(6 \cdot z\right)}\right) \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(z \cdot \color{blue}{6}\right)\right) \]
          2. *-lowering-*.f6456.0%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{6}\right)\right) \]
        8. Simplified56.0%

          \[\leadsto x \cdot \color{blue}{\left(z \cdot 6\right)} \]

        if 6.10000000000000001e181 < z

        1. Initial program 99.8%

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

          \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
          3. --lowering--.f6464.9%

            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
        5. Simplified64.9%

          \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
        6. Taylor expanded in z around inf

          \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

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

            \[\leadsto \left(y \cdot -6\right) \cdot z \]
          3. associate-*r*N/A

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

            \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(-6 \cdot z\right)}\right) \]
          5. *-lowering-*.f6464.9%

            \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(-6, \color{blue}{z}\right)\right) \]
        8. Simplified64.9%

          \[\leadsto \color{blue}{y \cdot \left(-6 \cdot z\right)} \]
      7. Recombined 6 regimes into one program.
      8. Final simplification59.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+197}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \mathbf{elif}\;z \leq -0.36:\\ \;\;\;\;z \cdot \left(y \cdot -6\right)\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-296}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+181}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 51.0% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := y \cdot \left(z \cdot -6\right)\\ \mathbf{if}\;z \leq -1.6 \cdot 10^{+195}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \mathbf{elif}\;z \leq -0.03:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-296}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+182}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (* y (* z -6.0))))
         (if (<= z -1.6e+195)
           (* z (* x 6.0))
           (if (<= z -0.03)
             t_0
             (if (<= z -1.5e-296)
               (* x -3.0)
               (if (<= z 5.2e-125)
                 (* y 4.0)
                 (if (<= z 1.4e-6)
                   (* x -3.0)
                   (if (<= z 3.6e+182) (* x (* z 6.0)) t_0))))))))
      double code(double x, double y, double z) {
      	double t_0 = y * (z * -6.0);
      	double tmp;
      	if (z <= -1.6e+195) {
      		tmp = z * (x * 6.0);
      	} else if (z <= -0.03) {
      		tmp = t_0;
      	} else if (z <= -1.5e-296) {
      		tmp = x * -3.0;
      	} else if (z <= 5.2e-125) {
      		tmp = y * 4.0;
      	} else if (z <= 1.4e-6) {
      		tmp = x * -3.0;
      	} else if (z <= 3.6e+182) {
      		tmp = x * (z * 6.0);
      	} 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 = y * (z * (-6.0d0))
          if (z <= (-1.6d+195)) then
              tmp = z * (x * 6.0d0)
          else if (z <= (-0.03d0)) then
              tmp = t_0
          else if (z <= (-1.5d-296)) then
              tmp = x * (-3.0d0)
          else if (z <= 5.2d-125) then
              tmp = y * 4.0d0
          else if (z <= 1.4d-6) then
              tmp = x * (-3.0d0)
          else if (z <= 3.6d+182) then
              tmp = x * (z * 6.0d0)
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = y * (z * -6.0);
      	double tmp;
      	if (z <= -1.6e+195) {
      		tmp = z * (x * 6.0);
      	} else if (z <= -0.03) {
      		tmp = t_0;
      	} else if (z <= -1.5e-296) {
      		tmp = x * -3.0;
      	} else if (z <= 5.2e-125) {
      		tmp = y * 4.0;
      	} else if (z <= 1.4e-6) {
      		tmp = x * -3.0;
      	} else if (z <= 3.6e+182) {
      		tmp = x * (z * 6.0);
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = y * (z * -6.0)
      	tmp = 0
      	if z <= -1.6e+195:
      		tmp = z * (x * 6.0)
      	elif z <= -0.03:
      		tmp = t_0
      	elif z <= -1.5e-296:
      		tmp = x * -3.0
      	elif z <= 5.2e-125:
      		tmp = y * 4.0
      	elif z <= 1.4e-6:
      		tmp = x * -3.0
      	elif z <= 3.6e+182:
      		tmp = x * (z * 6.0)
      	else:
      		tmp = t_0
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(y * Float64(z * -6.0))
      	tmp = 0.0
      	if (z <= -1.6e+195)
      		tmp = Float64(z * Float64(x * 6.0));
      	elseif (z <= -0.03)
      		tmp = t_0;
      	elseif (z <= -1.5e-296)
      		tmp = Float64(x * -3.0);
      	elseif (z <= 5.2e-125)
      		tmp = Float64(y * 4.0);
      	elseif (z <= 1.4e-6)
      		tmp = Float64(x * -3.0);
      	elseif (z <= 3.6e+182)
      		tmp = Float64(x * Float64(z * 6.0));
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = y * (z * -6.0);
      	tmp = 0.0;
      	if (z <= -1.6e+195)
      		tmp = z * (x * 6.0);
      	elseif (z <= -0.03)
      		tmp = t_0;
      	elseif (z <= -1.5e-296)
      		tmp = x * -3.0;
      	elseif (z <= 5.2e-125)
      		tmp = y * 4.0;
      	elseif (z <= 1.4e-6)
      		tmp = x * -3.0;
      	elseif (z <= 3.6e+182)
      		tmp = x * (z * 6.0);
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+195], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.03], t$95$0, If[LessEqual[z, -1.5e-296], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.2e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-6], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.6e+182], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := y \cdot \left(z \cdot -6\right)\\
      \mathbf{if}\;z \leq -1.6 \cdot 10^{+195}:\\
      \;\;\;\;z \cdot \left(x \cdot 6\right)\\
      
      \mathbf{elif}\;z \leq -0.03:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;z \leq -1.5 \cdot 10^{-296}:\\
      \;\;\;\;x \cdot -3\\
      
      \mathbf{elif}\;z \leq 5.2 \cdot 10^{-125}:\\
      \;\;\;\;y \cdot 4\\
      
      \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\
      \;\;\;\;x \cdot -3\\
      
      \mathbf{elif}\;z \leq 3.6 \cdot 10^{+182}:\\
      \;\;\;\;x \cdot \left(z \cdot 6\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if z < -1.59999999999999991e195

        1. Initial program 99.9%

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

          \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
          2. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
          3. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
          4. mul-1-negN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
          5. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
          6. distribute-lft-inN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
          8. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
          9. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
          10. associate-+l+N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
          13. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
          15. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
          16. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
          17. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
          18. metadata-eval63.2%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
        5. Simplified63.2%

          \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
        6. Taylor expanded in z around inf

          \[\leadsto \color{blue}{6 \cdot \left(x \cdot z\right)} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

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

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

            \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot x\right)}\right) \]
          4. *-lowering-*.f6463.4%

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(6, \color{blue}{x}\right)\right) \]
        8. Simplified63.4%

          \[\leadsto \color{blue}{z \cdot \left(6 \cdot x\right)} \]

        if -1.59999999999999991e195 < z < -0.029999999999999999 or 3.6e182 < z

        1. Initial program 99.8%

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

          \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
          3. --lowering--.f6462.4%

            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
        5. Simplified62.4%

          \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
        6. Taylor expanded in z around inf

          \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

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

            \[\leadsto \left(y \cdot -6\right) \cdot z \]
          3. associate-*r*N/A

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

            \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(-6 \cdot z\right)}\right) \]
          5. *-lowering-*.f6461.1%

            \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(-6, \color{blue}{z}\right)\right) \]
        8. Simplified61.1%

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

        if -0.029999999999999999 < z < -1.4999999999999999e-296 or 5.20000000000000011e-125 < z < 1.39999999999999994e-6

        1. Initial program 99.2%

          \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
        2. Step-by-step derivation
          1. +-lowering-+.f64N/A

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
          5. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
          6. distribute-lft-inN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
          8. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
          9. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
          11. distribute-lft-neg-outN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
          12. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
          13. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
          14. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
          16. metadata-eval99.7%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
        3. Simplified99.7%

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
        6. Step-by-step derivation
          1. Simplified98.5%

            \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
          2. Taylor expanded in x around inf

            \[\leadsto \color{blue}{-3 \cdot x} \]
          3. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto x \cdot \color{blue}{-3} \]
            2. *-lowering-*.f6457.3%

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{-3}\right) \]
          4. Simplified57.3%

            \[\leadsto \color{blue}{x \cdot -3} \]

          if -1.4999999999999999e-296 < z < 5.20000000000000011e-125

          1. Initial program 99.3%

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

            \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

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

              \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
            3. --lowering--.f6464.9%

              \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
          5. Simplified64.9%

            \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
          6. Taylor expanded in z around 0

            \[\leadsto \color{blue}{4 \cdot y} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto y \cdot \color{blue}{4} \]
            2. *-lowering-*.f6465.1%

              \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{4}\right) \]
          8. Simplified65.1%

            \[\leadsto \color{blue}{y \cdot 4} \]

          if 1.39999999999999994e-6 < z < 3.6e182

          1. Initial program 99.5%

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

            \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
            2. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
            3. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
            4. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
            5. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
            6. distribute-lft-inN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
            8. associate-*l*N/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
            9. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
            10. associate-+l+N/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
            15. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
            16. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
            17. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
            18. metadata-eval57.5%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
          5. Simplified57.5%

            \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
          6. Taylor expanded in z around inf

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(6 \cdot z\right)}\right) \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(z \cdot \color{blue}{6}\right)\right) \]
            2. *-lowering-*.f6456.0%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{6}\right)\right) \]
          8. Simplified56.0%

            \[\leadsto x \cdot \color{blue}{\left(z \cdot 6\right)} \]
        7. Recombined 5 regimes into one program.
        8. Final simplification59.8%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+195}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \mathbf{elif}\;z \leq -0.03:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-296}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+182}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 5: 50.8% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(z \cdot 6\right)\\ t_1 := y \cdot \left(z \cdot -6\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{+194}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -0.026:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-293}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+183}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (* x (* z 6.0))) (t_1 (* y (* z -6.0))))
           (if (<= z -8e+194)
             t_0
             (if (<= z -0.026)
               t_1
               (if (<= z -6.2e-293)
                 (* x -3.0)
                 (if (<= z 5.6e-125)
                   (* y 4.0)
                   (if (<= z 1.4e-6) (* x -3.0) (if (<= z 3.5e+183) t_0 t_1))))))))
        double code(double x, double y, double z) {
        	double t_0 = x * (z * 6.0);
        	double t_1 = y * (z * -6.0);
        	double tmp;
        	if (z <= -8e+194) {
        		tmp = t_0;
        	} else if (z <= -0.026) {
        		tmp = t_1;
        	} else if (z <= -6.2e-293) {
        		tmp = x * -3.0;
        	} else if (z <= 5.6e-125) {
        		tmp = y * 4.0;
        	} else if (z <= 1.4e-6) {
        		tmp = x * -3.0;
        	} else if (z <= 3.5e+183) {
        		tmp = t_0;
        	} else {
        		tmp = t_1;
        	}
        	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) :: t_1
            real(8) :: tmp
            t_0 = x * (z * 6.0d0)
            t_1 = y * (z * (-6.0d0))
            if (z <= (-8d+194)) then
                tmp = t_0
            else if (z <= (-0.026d0)) then
                tmp = t_1
            else if (z <= (-6.2d-293)) then
                tmp = x * (-3.0d0)
            else if (z <= 5.6d-125) then
                tmp = y * 4.0d0
            else if (z <= 1.4d-6) then
                tmp = x * (-3.0d0)
            else if (z <= 3.5d+183) then
                tmp = t_0
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = x * (z * 6.0);
        	double t_1 = y * (z * -6.0);
        	double tmp;
        	if (z <= -8e+194) {
        		tmp = t_0;
        	} else if (z <= -0.026) {
        		tmp = t_1;
        	} else if (z <= -6.2e-293) {
        		tmp = x * -3.0;
        	} else if (z <= 5.6e-125) {
        		tmp = y * 4.0;
        	} else if (z <= 1.4e-6) {
        		tmp = x * -3.0;
        	} else if (z <= 3.5e+183) {
        		tmp = t_0;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = x * (z * 6.0)
        	t_1 = y * (z * -6.0)
        	tmp = 0
        	if z <= -8e+194:
        		tmp = t_0
        	elif z <= -0.026:
        		tmp = t_1
        	elif z <= -6.2e-293:
        		tmp = x * -3.0
        	elif z <= 5.6e-125:
        		tmp = y * 4.0
        	elif z <= 1.4e-6:
        		tmp = x * -3.0
        	elif z <= 3.5e+183:
        		tmp = t_0
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(x * Float64(z * 6.0))
        	t_1 = Float64(y * Float64(z * -6.0))
        	tmp = 0.0
        	if (z <= -8e+194)
        		tmp = t_0;
        	elseif (z <= -0.026)
        		tmp = t_1;
        	elseif (z <= -6.2e-293)
        		tmp = Float64(x * -3.0);
        	elseif (z <= 5.6e-125)
        		tmp = Float64(y * 4.0);
        	elseif (z <= 1.4e-6)
        		tmp = Float64(x * -3.0);
        	elseif (z <= 3.5e+183)
        		tmp = t_0;
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = x * (z * 6.0);
        	t_1 = y * (z * -6.0);
        	tmp = 0.0;
        	if (z <= -8e+194)
        		tmp = t_0;
        	elseif (z <= -0.026)
        		tmp = t_1;
        	elseif (z <= -6.2e-293)
        		tmp = x * -3.0;
        	elseif (z <= 5.6e-125)
        		tmp = y * 4.0;
        	elseif (z <= 1.4e-6)
        		tmp = x * -3.0;
        	elseif (z <= 3.5e+183)
        		tmp = t_0;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+194], t$95$0, If[LessEqual[z, -0.026], t$95$1, If[LessEqual[z, -6.2e-293], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.6e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-6], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.5e+183], t$95$0, t$95$1]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := x \cdot \left(z \cdot 6\right)\\
        t_1 := y \cdot \left(z \cdot -6\right)\\
        \mathbf{if}\;z \leq -8 \cdot 10^{+194}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;z \leq -0.026:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq -6.2 \cdot 10^{-293}:\\
        \;\;\;\;x \cdot -3\\
        
        \mathbf{elif}\;z \leq 5.6 \cdot 10^{-125}:\\
        \;\;\;\;y \cdot 4\\
        
        \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\
        \;\;\;\;x \cdot -3\\
        
        \mathbf{elif}\;z \leq 3.5 \cdot 10^{+183}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if z < -7.99999999999999956e194 or 1.39999999999999994e-6 < z < 3.49999999999999987e183

          1. Initial program 99.7%

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

            \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
            2. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
            3. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
            4. mul-1-negN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
            5. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
            6. distribute-lft-inN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
            8. associate-*l*N/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
            9. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
            10. associate-+l+N/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
            15. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
            16. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
            17. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
            18. metadata-eval59.8%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
          5. Simplified59.8%

            \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
          6. Taylor expanded in z around inf

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(6 \cdot z\right)}\right) \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(z \cdot \color{blue}{6}\right)\right) \]
            2. *-lowering-*.f6458.8%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{6}\right)\right) \]
          8. Simplified58.8%

            \[\leadsto x \cdot \color{blue}{\left(z \cdot 6\right)} \]

          if -7.99999999999999956e194 < z < -0.0259999999999999988 or 3.49999999999999987e183 < z

          1. Initial program 99.8%

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

            \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

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

              \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
            3. --lowering--.f6462.4%

              \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
          5. Simplified62.4%

            \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
          6. Taylor expanded in z around inf

            \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
          7. Step-by-step derivation
            1. associate-*r*N/A

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

              \[\leadsto \left(y \cdot -6\right) \cdot z \]
            3. associate-*r*N/A

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

              \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(-6 \cdot z\right)}\right) \]
            5. *-lowering-*.f6461.1%

              \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(-6, \color{blue}{z}\right)\right) \]
          8. Simplified61.1%

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

          if -0.0259999999999999988 < z < -6.19999999999999965e-293 or 5.6e-125 < z < 1.39999999999999994e-6

          1. Initial program 99.2%

            \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

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

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

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
            5. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
            6. distribute-lft-inN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
            9. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
            11. distribute-lft-neg-outN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
            12. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
            13. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
            14. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
            16. metadata-eval99.7%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
          3. Simplified99.7%

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
          6. Step-by-step derivation
            1. Simplified98.5%

              \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
            2. Taylor expanded in x around inf

              \[\leadsto \color{blue}{-3 \cdot x} \]
            3. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto x \cdot \color{blue}{-3} \]
              2. *-lowering-*.f6457.3%

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{-3}\right) \]
            4. Simplified57.3%

              \[\leadsto \color{blue}{x \cdot -3} \]

            if -6.19999999999999965e-293 < z < 5.6e-125

            1. Initial program 99.3%

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

              \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

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

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
              3. --lowering--.f6464.9%

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
            5. Simplified64.9%

              \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
            6. Taylor expanded in z around 0

              \[\leadsto \color{blue}{4 \cdot y} \]
            7. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto y \cdot \color{blue}{4} \]
              2. *-lowering-*.f6465.1%

                \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{4}\right) \]
            8. Simplified65.1%

              \[\leadsto \color{blue}{y \cdot 4} \]
          7. Recombined 4 regimes into one program.
          8. Final simplification59.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+194}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{elif}\;z \leq -0.026:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-293}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+183}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 6: 50.5% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(z \cdot 6\right)\\ \mathbf{if}\;z \leq -0.52:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-295}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot -3\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (let* ((t_0 (* x (* z 6.0))))
             (if (<= z -0.52)
               t_0
               (if (<= z -5.6e-295)
                 (* x -3.0)
                 (if (<= z 1.7e-125) (* y 4.0) (if (<= z 1.4e-6) (* x -3.0) t_0))))))
          double code(double x, double y, double z) {
          	double t_0 = x * (z * 6.0);
          	double tmp;
          	if (z <= -0.52) {
          		tmp = t_0;
          	} else if (z <= -5.6e-295) {
          		tmp = x * -3.0;
          	} else if (z <= 1.7e-125) {
          		tmp = y * 4.0;
          	} else if (z <= 1.4e-6) {
          		tmp = x * -3.0;
          	} 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 = x * (z * 6.0d0)
              if (z <= (-0.52d0)) then
                  tmp = t_0
              else if (z <= (-5.6d-295)) then
                  tmp = x * (-3.0d0)
              else if (z <= 1.7d-125) then
                  tmp = y * 4.0d0
              else if (z <= 1.4d-6) then
                  tmp = x * (-3.0d0)
              else
                  tmp = t_0
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double t_0 = x * (z * 6.0);
          	double tmp;
          	if (z <= -0.52) {
          		tmp = t_0;
          	} else if (z <= -5.6e-295) {
          		tmp = x * -3.0;
          	} else if (z <= 1.7e-125) {
          		tmp = y * 4.0;
          	} else if (z <= 1.4e-6) {
          		tmp = x * -3.0;
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	t_0 = x * (z * 6.0)
          	tmp = 0
          	if z <= -0.52:
          		tmp = t_0
          	elif z <= -5.6e-295:
          		tmp = x * -3.0
          	elif z <= 1.7e-125:
          		tmp = y * 4.0
          	elif z <= 1.4e-6:
          		tmp = x * -3.0
          	else:
          		tmp = t_0
          	return tmp
          
          function code(x, y, z)
          	t_0 = Float64(x * Float64(z * 6.0))
          	tmp = 0.0
          	if (z <= -0.52)
          		tmp = t_0;
          	elseif (z <= -5.6e-295)
          		tmp = Float64(x * -3.0);
          	elseif (z <= 1.7e-125)
          		tmp = Float64(y * 4.0);
          	elseif (z <= 1.4e-6)
          		tmp = Float64(x * -3.0);
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	t_0 = x * (z * 6.0);
          	tmp = 0.0;
          	if (z <= -0.52)
          		tmp = t_0;
          	elseif (z <= -5.6e-295)
          		tmp = x * -3.0;
          	elseif (z <= 1.7e-125)
          		tmp = y * 4.0;
          	elseif (z <= 1.4e-6)
          		tmp = x * -3.0;
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.52], t$95$0, If[LessEqual[z, -5.6e-295], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.7e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-6], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := x \cdot \left(z \cdot 6\right)\\
          \mathbf{if}\;z \leq -0.52:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;z \leq -5.6 \cdot 10^{-295}:\\
          \;\;\;\;x \cdot -3\\
          
          \mathbf{elif}\;z \leq 1.7 \cdot 10^{-125}:\\
          \;\;\;\;y \cdot 4\\
          
          \mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\
          \;\;\;\;x \cdot -3\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -0.52000000000000002 or 1.39999999999999994e-6 < z

            1. Initial program 99.7%

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

              \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
              2. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
              3. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
              4. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
              5. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
              6. distribute-lft-inN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
              8. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
              9. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
              10. associate-+l+N/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
              11. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
              15. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
              16. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
              17. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
              18. metadata-eval52.6%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
            5. Simplified52.6%

              \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
            6. Taylor expanded in z around inf

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(6 \cdot z\right)}\right) \]
            7. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(x, \left(z \cdot \color{blue}{6}\right)\right) \]
              2. *-lowering-*.f6451.7%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{6}\right)\right) \]
            8. Simplified51.7%

              \[\leadsto x \cdot \color{blue}{\left(z \cdot 6\right)} \]

            if -0.52000000000000002 < z < -5.5999999999999998e-295 or 1.69999999999999988e-125 < z < 1.39999999999999994e-6

            1. Initial program 99.2%

              \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
            2. Step-by-step derivation
              1. +-lowering-+.f64N/A

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

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

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

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
              5. sub-negN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
              6. distribute-lft-inN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
              8. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
              9. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
              11. distribute-lft-neg-outN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
              12. distribute-rgt-neg-inN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
              13. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
              14. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
              16. metadata-eval99.7%

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
            3. Simplified99.7%

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

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
            6. Step-by-step derivation
              1. Simplified97.7%

                \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
              2. Taylor expanded in x around inf

                \[\leadsto \color{blue}{-3 \cdot x} \]
              3. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto x \cdot \color{blue}{-3} \]
                2. *-lowering-*.f6456.6%

                  \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{-3}\right) \]
              4. Simplified56.6%

                \[\leadsto \color{blue}{x \cdot -3} \]

              if -5.5999999999999998e-295 < z < 1.69999999999999988e-125

              1. Initial program 99.3%

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

                \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
              4. Step-by-step derivation
                1. *-lowering-*.f64N/A

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

                  \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
                3. --lowering--.f6464.9%

                  \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
              5. Simplified64.9%

                \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{4 \cdot y} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto y \cdot \color{blue}{4} \]
                2. *-lowering-*.f6465.1%

                  \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{4}\right) \]
              8. Simplified65.1%

                \[\leadsto \color{blue}{y \cdot 4} \]
            7. Recombined 3 regimes into one program.
            8. Add Preprocessing

            Alternative 7: 58.9% accurate, 0.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+105}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{+56}:\\ \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+262}:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot -3\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -3.4e+105)
               (* x -3.0)
               (if (<= x 1.95e+56)
                 (* 6.0 (* y (- 0.6666666666666666 z)))
                 (if (<= x 6e+262) (* 6.0 (* x z)) (* x -3.0)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -3.4e+105) {
            		tmp = x * -3.0;
            	} else if (x <= 1.95e+56) {
            		tmp = 6.0 * (y * (0.6666666666666666 - z));
            	} else if (x <= 6e+262) {
            		tmp = 6.0 * (x * z);
            	} else {
            		tmp = x * -3.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) :: tmp
                if (x <= (-3.4d+105)) then
                    tmp = x * (-3.0d0)
                else if (x <= 1.95d+56) then
                    tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
                else if (x <= 6d+262) then
                    tmp = 6.0d0 * (x * z)
                else
                    tmp = x * (-3.0d0)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -3.4e+105) {
            		tmp = x * -3.0;
            	} else if (x <= 1.95e+56) {
            		tmp = 6.0 * (y * (0.6666666666666666 - z));
            	} else if (x <= 6e+262) {
            		tmp = 6.0 * (x * z);
            	} else {
            		tmp = x * -3.0;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if x <= -3.4e+105:
            		tmp = x * -3.0
            	elif x <= 1.95e+56:
            		tmp = 6.0 * (y * (0.6666666666666666 - z))
            	elif x <= 6e+262:
            		tmp = 6.0 * (x * z)
            	else:
            		tmp = x * -3.0
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -3.4e+105)
            		tmp = Float64(x * -3.0);
            	elseif (x <= 1.95e+56)
            		tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z)));
            	elseif (x <= 6e+262)
            		tmp = Float64(6.0 * Float64(x * z));
            	else
            		tmp = Float64(x * -3.0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (x <= -3.4e+105)
            		tmp = x * -3.0;
            	elseif (x <= 1.95e+56)
            		tmp = 6.0 * (y * (0.6666666666666666 - z));
            	elseif (x <= 6e+262)
            		tmp = 6.0 * (x * z);
            	else
            		tmp = x * -3.0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -3.4e+105], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, 1.95e+56], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e+262], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -3.4 \cdot 10^{+105}:\\
            \;\;\;\;x \cdot -3\\
            
            \mathbf{elif}\;x \leq 1.95 \cdot 10^{+56}:\\
            \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
            
            \mathbf{elif}\;x \leq 6 \cdot 10^{+262}:\\
            \;\;\;\;6 \cdot \left(x \cdot z\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;x \cdot -3\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -3.3999999999999999e105 or 6.0000000000000001e262 < x

              1. Initial program 99.3%

                \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
              2. Step-by-step derivation
                1. +-lowering-+.f64N/A

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                5. sub-negN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                6. distribute-lft-inN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                9. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                10. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                11. distribute-lft-neg-outN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                12. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                13. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                14. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                15. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                16. metadata-eval99.7%

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
              3. Simplified99.7%

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

                \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
              6. Step-by-step derivation
                1. Simplified62.7%

                  \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
                2. Taylor expanded in x around inf

                  \[\leadsto \color{blue}{-3 \cdot x} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto x \cdot \color{blue}{-3} \]
                  2. *-lowering-*.f6455.2%

                    \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{-3}\right) \]
                4. Simplified55.2%

                  \[\leadsto \color{blue}{x \cdot -3} \]

                if -3.3999999999999999e105 < x < 1.94999999999999997e56

                1. Initial program 99.5%

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

                  \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
                4. Step-by-step derivation
                  1. *-lowering-*.f64N/A

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

                    \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
                  3. --lowering--.f6470.8%

                    \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
                5. Simplified70.8%

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

                if 1.94999999999999997e56 < x < 6.0000000000000001e262

                1. Initial program 99.5%

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
                4. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
                  2. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
                  3. sub-negN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
                  4. mul-1-negN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
                  5. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
                  6. distribute-lft-inN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
                  7. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
                  8. associate-*l*N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
                  9. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
                  10. associate-+l+N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
                  11. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
                  12. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
                  13. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
                  14. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
                  15. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
                  16. metadata-evalN/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
                  17. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
                  18. metadata-eval84.3%

                    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
                5. Simplified84.3%

                  \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]
                6. Taylor expanded in z around inf

                  \[\leadsto \color{blue}{6 \cdot \left(x \cdot z\right)} \]
                7. Step-by-step derivation
                  1. associate-*r*N/A

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

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

                    \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot x\right)}\right) \]
                  4. *-lowering-*.f6457.4%

                    \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(6, \color{blue}{x}\right)\right) \]
                8. Simplified57.4%

                  \[\leadsto \color{blue}{z \cdot \left(6 \cdot x\right)} \]
                9. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto z \cdot \left(x \cdot \color{blue}{6}\right) \]
                  2. associate-*r*N/A

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

                    \[\leadsto \mathsf{*.f64}\left(\left(z \cdot x\right), \color{blue}{6}\right) \]
                  4. *-lowering-*.f6457.5%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), 6\right) \]
                10. Applied egg-rr57.5%

                  \[\leadsto \color{blue}{\left(z \cdot x\right) \cdot 6} \]
              7. Recombined 3 regimes into one program.
              8. Final simplification65.5%

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+105}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{+56}:\\ \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+262}:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot -3\\ \end{array} \]
              9. Add Preprocessing

              Alternative 8: 98.0% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.6:\\ \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\ \mathbf{elif}\;z \leq 0.6:\\ \;\;\;\;y \cdot 4 + x \cdot -3\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \left(z \cdot -6\right)\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (if (<= z -0.6)
                 (* z (* (- y x) -6.0))
                 (if (<= z 0.6) (+ (* y 4.0) (* x -3.0)) (+ x (* (- y x) (* z -6.0))))))
              double code(double x, double y, double z) {
              	double tmp;
              	if (z <= -0.6) {
              		tmp = z * ((y - x) * -6.0);
              	} else if (z <= 0.6) {
              		tmp = (y * 4.0) + (x * -3.0);
              	} else {
              		tmp = x + ((y - x) * (z * -6.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) :: tmp
                  if (z <= (-0.6d0)) then
                      tmp = z * ((y - x) * (-6.0d0))
                  else if (z <= 0.6d0) then
                      tmp = (y * 4.0d0) + (x * (-3.0d0))
                  else
                      tmp = x + ((y - x) * (z * (-6.0d0)))
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z) {
              	double tmp;
              	if (z <= -0.6) {
              		tmp = z * ((y - x) * -6.0);
              	} else if (z <= 0.6) {
              		tmp = (y * 4.0) + (x * -3.0);
              	} else {
              		tmp = x + ((y - x) * (z * -6.0));
              	}
              	return tmp;
              }
              
              def code(x, y, z):
              	tmp = 0
              	if z <= -0.6:
              		tmp = z * ((y - x) * -6.0)
              	elif z <= 0.6:
              		tmp = (y * 4.0) + (x * -3.0)
              	else:
              		tmp = x + ((y - x) * (z * -6.0))
              	return tmp
              
              function code(x, y, z)
              	tmp = 0.0
              	if (z <= -0.6)
              		tmp = Float64(z * Float64(Float64(y - x) * -6.0));
              	elseif (z <= 0.6)
              		tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0));
              	else
              		tmp = Float64(x + Float64(Float64(y - x) * Float64(z * -6.0)));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z)
              	tmp = 0.0;
              	if (z <= -0.6)
              		tmp = z * ((y - x) * -6.0);
              	elseif (z <= 0.6)
              		tmp = (y * 4.0) + (x * -3.0);
              	else
              		tmp = x + ((y - x) * (z * -6.0));
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.6], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -0.6:\\
              \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
              
              \mathbf{elif}\;z \leq 0.6:\\
              \;\;\;\;y \cdot 4 + x \cdot -3\\
              
              \mathbf{else}:\\
              \;\;\;\;x + \left(y - x\right) \cdot \left(z \cdot -6\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < -0.599999999999999978

                1. Initial program 99.8%

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

                  \[\leadsto \color{blue}{-6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
                4. Step-by-step derivation
                  1. associate-*r*N/A

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

                    \[\leadsto \left(z \cdot -6\right) \cdot \left(\color{blue}{y} - x\right) \]
                  3. associate-*r*N/A

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(-6, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
                5. Simplified99.0%

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

                if -0.599999999999999978 < z < 0.599999999999999978

                1. Initial program 99.2%

                  \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                2. Step-by-step derivation
                  1. +-lowering-+.f64N/A

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                  5. sub-negN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                  6. distribute-lft-inN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                  7. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                  8. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                  9. metadata-evalN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                  10. metadata-evalN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                  11. distribute-lft-neg-outN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                  12. distribute-rgt-neg-inN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                  13. metadata-evalN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                  14. metadata-evalN/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                  15. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                  16. metadata-eval99.8%

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
                3. Simplified99.8%

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

                  \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
                6. Step-by-step derivation
                  1. Simplified97.9%

                    \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
                  2. Taylor expanded in x around 0

                    \[\leadsto \color{blue}{-3 \cdot x + 4 \cdot y} \]
                  3. Step-by-step derivation
                    1. metadata-evalN/A

                      \[\leadsto \left(-4 + 1\right) \cdot x + 4 \cdot y \]
                    2. distribute-rgt1-inN/A

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

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

                      \[\leadsto \mathsf{+.f64}\left(\left(4 \cdot y\right), \color{blue}{\left(x + -4 \cdot x\right)}\right) \]
                    5. *-commutativeN/A

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \left(\color{blue}{x} + -4 \cdot x\right)\right) \]
                    7. distribute-rgt1-inN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \left(\left(-4 + 1\right) \cdot \color{blue}{x}\right)\right) \]
                    8. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \left(-3 \cdot x\right)\right) \]
                    9. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \left(x \cdot \color{blue}{-3}\right)\right) \]
                    10. *-lowering-*.f6497.9%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \mathsf{*.f64}\left(x, \color{blue}{-3}\right)\right) \]
                  4. Simplified97.9%

                    \[\leadsto \color{blue}{y \cdot 4 + x \cdot -3} \]

                  if 0.599999999999999978 < z

                  1. Initial program 99.6%

                    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                  2. Step-by-step derivation
                    1. +-lowering-+.f64N/A

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                    5. sub-negN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                    6. distribute-lft-inN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                    7. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                    8. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                    9. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                    10. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                    11. distribute-lft-neg-outN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                    12. distribute-rgt-neg-inN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                    13. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                    14. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                    15. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                    16. metadata-eval99.7%

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
                  3. Simplified99.7%

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

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
                  6. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(z \cdot \color{blue}{-6}\right)\right)\right) \]
                    2. *-lowering-*.f6498.4%

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{*.f64}\left(z, \color{blue}{-6}\right)\right)\right) \]
                  7. Simplified98.4%

                    \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\left(z \cdot -6\right)} \]
                7. Recombined 3 regimes into one program.
                8. Final simplification98.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.6:\\ \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\ \mathbf{elif}\;z \leq 0.6:\\ \;\;\;\;y \cdot 4 + x \cdot -3\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot \left(z \cdot -6\right)\\ \end{array} \]
                9. Add Preprocessing

                Alternative 9: 98.0% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.58:\\ \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\ \mathbf{elif}\;z \leq 0.58:\\ \;\;\;\;y \cdot 4 + x \cdot -3\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= z -0.58)
                   (* z (* (- y x) -6.0))
                   (if (<= z 0.58) (+ (* y 4.0) (* x -3.0)) (* -6.0 (* (- y x) z)))))
                double code(double x, double y, double z) {
                	double tmp;
                	if (z <= -0.58) {
                		tmp = z * ((y - x) * -6.0);
                	} else if (z <= 0.58) {
                		tmp = (y * 4.0) + (x * -3.0);
                	} else {
                		tmp = -6.0 * ((y - x) * z);
                	}
                	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 <= (-0.58d0)) then
                        tmp = z * ((y - x) * (-6.0d0))
                    else if (z <= 0.58d0) then
                        tmp = (y * 4.0d0) + (x * (-3.0d0))
                    else
                        tmp = (-6.0d0) * ((y - x) * z)
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if (z <= -0.58) {
                		tmp = z * ((y - x) * -6.0);
                	} else if (z <= 0.58) {
                		tmp = (y * 4.0) + (x * -3.0);
                	} else {
                		tmp = -6.0 * ((y - x) * z);
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if z <= -0.58:
                		tmp = z * ((y - x) * -6.0)
                	elif z <= 0.58:
                		tmp = (y * 4.0) + (x * -3.0)
                	else:
                		tmp = -6.0 * ((y - x) * z)
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if (z <= -0.58)
                		tmp = Float64(z * Float64(Float64(y - x) * -6.0));
                	elseif (z <= 0.58)
                		tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0));
                	else
                		tmp = Float64(-6.0 * Float64(Float64(y - x) * z));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if (z <= -0.58)
                		tmp = z * ((y - x) * -6.0);
                	elseif (z <= 0.58)
                		tmp = (y * 4.0) + (x * -3.0);
                	else
                		tmp = -6.0 * ((y - x) * z);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[LessEqual[z, -0.58], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.58], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -0.58:\\
                \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
                
                \mathbf{elif}\;z \leq 0.58:\\
                \;\;\;\;y \cdot 4 + x \cdot -3\\
                
                \mathbf{else}:\\
                \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if z < -0.57999999999999996

                  1. Initial program 99.8%

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

                    \[\leadsto \color{blue}{-6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
                  4. Step-by-step derivation
                    1. associate-*r*N/A

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

                      \[\leadsto \left(z \cdot -6\right) \cdot \left(\color{blue}{y} - x\right) \]
                    3. associate-*r*N/A

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(-6, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
                  5. Simplified99.0%

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

                  if -0.57999999999999996 < z < 0.57999999999999996

                  1. Initial program 99.2%

                    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                  2. Step-by-step derivation
                    1. +-lowering-+.f64N/A

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                    5. sub-negN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                    6. distribute-lft-inN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                    7. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                    8. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                    9. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                    10. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                    11. distribute-lft-neg-outN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                    12. distribute-rgt-neg-inN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                    13. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                    14. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                    15. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                    16. metadata-eval99.8%

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
                  3. Simplified99.8%

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

                    \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
                  6. Step-by-step derivation
                    1. Simplified97.9%

                      \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
                    2. Taylor expanded in x around 0

                      \[\leadsto \color{blue}{-3 \cdot x + 4 \cdot y} \]
                    3. Step-by-step derivation
                      1. metadata-evalN/A

                        \[\leadsto \left(-4 + 1\right) \cdot x + 4 \cdot y \]
                      2. distribute-rgt1-inN/A

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

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

                        \[\leadsto \mathsf{+.f64}\left(\left(4 \cdot y\right), \color{blue}{\left(x + -4 \cdot x\right)}\right) \]
                      5. *-commutativeN/A

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \left(\color{blue}{x} + -4 \cdot x\right)\right) \]
                      7. distribute-rgt1-inN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \left(\left(-4 + 1\right) \cdot \color{blue}{x}\right)\right) \]
                      8. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \left(-3 \cdot x\right)\right) \]
                      9. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \left(x \cdot \color{blue}{-3}\right)\right) \]
                      10. *-lowering-*.f6497.9%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, 4\right), \mathsf{*.f64}\left(x, \color{blue}{-3}\right)\right) \]
                    4. Simplified97.9%

                      \[\leadsto \color{blue}{y \cdot 4 + x \cdot -3} \]

                    if 0.57999999999999996 < z

                    1. Initial program 99.6%

                      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                    2. Step-by-step derivation
                      1. +-lowering-+.f64N/A

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

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

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

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                      5. sub-negN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                      6. distribute-lft-inN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                      7. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                      8. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                      9. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                      10. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                      11. distribute-lft-neg-outN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                      12. distribute-rgt-neg-inN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                      13. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                      14. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                      15. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                      16. metadata-eval99.7%

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
                    3. Simplified99.7%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{1}{\frac{1}{x + \left(y - x\right) \cdot \left(4 + z \cdot -6\right)}}} \]
                    7. Taylor expanded in z around inf

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

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

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

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

                      \[\leadsto \frac{1}{\color{blue}{\frac{-0.16666666666666666}{z \cdot \left(y - x\right)}}} \]
                    10. Step-by-step derivation
                      1. clear-numN/A

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

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

                        \[\leadsto \left(z \cdot \left(y - x\right)\right) \cdot -6 \]
                      4. *-lowering-*.f64N/A

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(y - x\right), z\right), -6\right) \]
                      7. --lowering--.f6498.3%

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

                      \[\leadsto \color{blue}{\left(\left(y - x\right) \cdot z\right) \cdot -6} \]
                  7. Recombined 3 regimes into one program.
                  8. Final simplification98.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.58:\\ \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\ \mathbf{elif}\;z \leq 0.58:\\ \;\;\;\;y \cdot 4 + x \cdot -3\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \end{array} \]
                  9. Add Preprocessing

                  Alternative 10: 98.0% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.58:\\ \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\ \mathbf{elif}\;z \leq 0.55:\\ \;\;\;\;x + \left(y - x\right) \cdot 4\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (if (<= z -0.58)
                     (* z (* (- y x) -6.0))
                     (if (<= z 0.55) (+ x (* (- y x) 4.0)) (* -6.0 (* (- y x) z)))))
                  double code(double x, double y, double z) {
                  	double tmp;
                  	if (z <= -0.58) {
                  		tmp = z * ((y - x) * -6.0);
                  	} else if (z <= 0.55) {
                  		tmp = x + ((y - x) * 4.0);
                  	} else {
                  		tmp = -6.0 * ((y - x) * z);
                  	}
                  	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 <= (-0.58d0)) then
                          tmp = z * ((y - x) * (-6.0d0))
                      else if (z <= 0.55d0) then
                          tmp = x + ((y - x) * 4.0d0)
                      else
                          tmp = (-6.0d0) * ((y - x) * z)
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z) {
                  	double tmp;
                  	if (z <= -0.58) {
                  		tmp = z * ((y - x) * -6.0);
                  	} else if (z <= 0.55) {
                  		tmp = x + ((y - x) * 4.0);
                  	} else {
                  		tmp = -6.0 * ((y - x) * z);
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	tmp = 0
                  	if z <= -0.58:
                  		tmp = z * ((y - x) * -6.0)
                  	elif z <= 0.55:
                  		tmp = x + ((y - x) * 4.0)
                  	else:
                  		tmp = -6.0 * ((y - x) * z)
                  	return tmp
                  
                  function code(x, y, z)
                  	tmp = 0.0
                  	if (z <= -0.58)
                  		tmp = Float64(z * Float64(Float64(y - x) * -6.0));
                  	elseif (z <= 0.55)
                  		tmp = Float64(x + Float64(Float64(y - x) * 4.0));
                  	else
                  		tmp = Float64(-6.0 * Float64(Float64(y - x) * z));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	tmp = 0.0;
                  	if (z <= -0.58)
                  		tmp = z * ((y - x) * -6.0);
                  	elseif (z <= 0.55)
                  		tmp = x + ((y - x) * 4.0);
                  	else
                  		tmp = -6.0 * ((y - x) * z);
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := If[LessEqual[z, -0.58], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.55], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -0.58:\\
                  \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
                  
                  \mathbf{elif}\;z \leq 0.55:\\
                  \;\;\;\;x + \left(y - x\right) \cdot 4\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if z < -0.57999999999999996

                    1. Initial program 99.8%

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

                      \[\leadsto \color{blue}{-6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate-*r*N/A

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

                        \[\leadsto \left(z \cdot -6\right) \cdot \left(\color{blue}{y} - x\right) \]
                      3. associate-*r*N/A

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(-6, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
                    5. Simplified99.0%

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

                    if -0.57999999999999996 < z < 0.55000000000000004

                    1. Initial program 99.2%

                      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                    2. Step-by-step derivation
                      1. +-lowering-+.f64N/A

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

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

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

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                      5. sub-negN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                      6. distribute-lft-inN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                      7. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                      8. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                      9. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                      10. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                      11. distribute-lft-neg-outN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                      12. distribute-rgt-neg-inN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                      13. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                      14. metadata-evalN/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                      15. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                      16. metadata-eval99.8%

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
                    3. Simplified99.8%

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

                      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
                    6. Step-by-step derivation
                      1. Simplified97.9%

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

                      if 0.55000000000000004 < z

                      1. Initial program 99.6%

                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                      2. Step-by-step derivation
                        1. +-lowering-+.f64N/A

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

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

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

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                        5. sub-negN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                        6. distribute-lft-inN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                        7. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                        8. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                        9. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                        10. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                        11. distribute-lft-neg-outN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                        12. distribute-rgt-neg-inN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                        13. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                        14. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                        15. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                        16. metadata-eval99.7%

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
                      3. Simplified99.7%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{1}{\frac{1}{x + \left(y - x\right) \cdot \left(4 + z \cdot -6\right)}}} \]
                      7. Taylor expanded in z around inf

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

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

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

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

                        \[\leadsto \frac{1}{\color{blue}{\frac{-0.16666666666666666}{z \cdot \left(y - x\right)}}} \]
                      10. Step-by-step derivation
                        1. clear-numN/A

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

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

                          \[\leadsto \left(z \cdot \left(y - x\right)\right) \cdot -6 \]
                        4. *-lowering-*.f64N/A

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(y - x\right), z\right), -6\right) \]
                        7. --lowering--.f6498.3%

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

                        \[\leadsto \color{blue}{\left(\left(y - x\right) \cdot z\right) \cdot -6} \]
                    7. Recombined 3 regimes into one program.
                    8. Final simplification98.3%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.58:\\ \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\ \mathbf{elif}\;z \leq 0.55:\\ \;\;\;\;x + \left(y - x\right) \cdot 4\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 11: 75.4% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(-3 + z \cdot 6\right)\\ \mathbf{if}\;x \leq -1 \cdot 10^{-23}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+26}:\\ \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                    (FPCore (x y z)
                     :precision binary64
                     (let* ((t_0 (* x (+ -3.0 (* z 6.0)))))
                       (if (<= x -1e-23)
                         t_0
                         (if (<= x 3.5e+26) (* 6.0 (* y (- 0.6666666666666666 z))) t_0))))
                    double code(double x, double y, double z) {
                    	double t_0 = x * (-3.0 + (z * 6.0));
                    	double tmp;
                    	if (x <= -1e-23) {
                    		tmp = t_0;
                    	} else if (x <= 3.5e+26) {
                    		tmp = 6.0 * (y * (0.6666666666666666 - z));
                    	} 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 = x * ((-3.0d0) + (z * 6.0d0))
                        if (x <= (-1d-23)) then
                            tmp = t_0
                        else if (x <= 3.5d+26) then
                            tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
                        else
                            tmp = t_0
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z) {
                    	double t_0 = x * (-3.0 + (z * 6.0));
                    	double tmp;
                    	if (x <= -1e-23) {
                    		tmp = t_0;
                    	} else if (x <= 3.5e+26) {
                    		tmp = 6.0 * (y * (0.6666666666666666 - z));
                    	} else {
                    		tmp = t_0;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z):
                    	t_0 = x * (-3.0 + (z * 6.0))
                    	tmp = 0
                    	if x <= -1e-23:
                    		tmp = t_0
                    	elif x <= 3.5e+26:
                    		tmp = 6.0 * (y * (0.6666666666666666 - z))
                    	else:
                    		tmp = t_0
                    	return tmp
                    
                    function code(x, y, z)
                    	t_0 = Float64(x * Float64(-3.0 + Float64(z * 6.0)))
                    	tmp = 0.0
                    	if (x <= -1e-23)
                    		tmp = t_0;
                    	elseif (x <= 3.5e+26)
                    		tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z)));
                    	else
                    		tmp = t_0;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z)
                    	t_0 = x * (-3.0 + (z * 6.0));
                    	tmp = 0.0;
                    	if (x <= -1e-23)
                    		tmp = t_0;
                    	elseif (x <= 3.5e+26)
                    		tmp = 6.0 * (y * (0.6666666666666666 - z));
                    	else
                    		tmp = t_0;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e-23], t$95$0, If[LessEqual[x, 3.5e+26], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := x \cdot \left(-3 + z \cdot 6\right)\\
                    \mathbf{if}\;x \leq -1 \cdot 10^{-23}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;x \leq 3.5 \cdot 10^{+26}:\\
                    \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_0\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -9.9999999999999996e-24 or 3.4999999999999999e26 < x

                      1. Initial program 99.4%

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

                        \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)} \]
                      4. Step-by-step derivation
                        1. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right)}\right) \]
                        2. +-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} - z\right) + \color{blue}{1}\right)\right) \]
                        3. sub-negN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right)\right) + 1\right)\right) \]
                        4. mul-1-negN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(\frac{2}{3} + -1 \cdot z\right) + 1\right)\right) \]
                        5. +-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(-6 \cdot \left(-1 \cdot z + \frac{2}{3}\right) + 1\right)\right) \]
                        6. distribute-lft-inN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(-1 \cdot z\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
                        7. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot \left(z \cdot -1\right) + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
                        8. associate-*l*N/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -6 \cdot \frac{2}{3}\right) + 1\right)\right) \]
                        9. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(-6 \cdot z\right) \cdot -1 + -4\right) + 1\right)\right) \]
                        10. associate-+l+N/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \color{blue}{\left(-4 + 1\right)}\right)\right) \]
                        11. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + -3\right)\right) \]
                        12. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \left(\left(-6 \cdot z\right) \cdot -1 + \left(1 + \color{blue}{-4}\right)\right)\right) \]
                        13. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-6 \cdot z\right) \cdot -1\right), \color{blue}{\left(1 + -4\right)}\right)\right) \]
                        14. *-commutativeN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \left(-6 \cdot z\right)\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
                        15. associate-*r*N/A

                          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(-1 \cdot -6\right) \cdot z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
                        16. metadata-evalN/A

                          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(6 \cdot z\right), \left(1 + -4\right)\right)\right) \]
                        17. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), \left(\color{blue}{1} + -4\right)\right)\right) \]
                        18. metadata-eval79.5%

                          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(6, z\right), -3\right)\right) \]
                      5. Simplified79.5%

                        \[\leadsto \color{blue}{x \cdot \left(6 \cdot z + -3\right)} \]

                      if -9.9999999999999996e-24 < x < 3.4999999999999999e26

                      1. Initial program 99.5%

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

                        \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
                      4. Step-by-step derivation
                        1. *-lowering-*.f64N/A

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

                          \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
                        3. --lowering--.f6478.0%

                          \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
                      5. Simplified78.0%

                        \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification78.8%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{-23}:\\ \;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+26}:\\ \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 12: 36.2% accurate, 1.0× speedup?

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

                      1. Initial program 99.4%

                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                      2. Step-by-step derivation
                        1. +-lowering-+.f64N/A

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

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

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

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                        5. sub-negN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                        6. distribute-lft-inN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                        7. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                        8. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                        9. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                        10. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                        11. distribute-lft-neg-outN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                        12. distribute-rgt-neg-inN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                        13. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                        14. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                        15. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                        16. metadata-eval99.7%

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
                      3. Simplified99.7%

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

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
                      6. Step-by-step derivation
                        1. Simplified50.0%

                          \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
                        2. Taylor expanded in x around inf

                          \[\leadsto \color{blue}{-3 \cdot x} \]
                        3. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto x \cdot \color{blue}{-3} \]
                          2. *-lowering-*.f6440.9%

                            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{-3}\right) \]
                        4. Simplified40.9%

                          \[\leadsto \color{blue}{x \cdot -3} \]

                        if -2.9000000000000001e105 < x < 5.7999999999999998e-86

                        1. Initial program 99.5%

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

                          \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(\frac{2}{3} - z\right)\right)} \]
                        4. Step-by-step derivation
                          1. *-lowering-*.f64N/A

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

                            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{2}{3} - z\right)}\right)\right) \]
                          3. --lowering--.f6475.7%

                            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
                        5. Simplified75.7%

                          \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
                        6. Taylor expanded in z around 0

                          \[\leadsto \color{blue}{4 \cdot y} \]
                        7. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto y \cdot \color{blue}{4} \]
                          2. *-lowering-*.f6440.4%

                            \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{4}\right) \]
                        8. Simplified40.4%

                          \[\leadsto \color{blue}{y \cdot 4} \]
                      7. Recombined 2 regimes into one program.
                      8. Add Preprocessing

                      Alternative 13: 99.5% accurate, 1.2× speedup?

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

                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. *-commutativeN/A

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

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

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

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{2}{3} - z\right), \left(y - x\right)\right), 6\right)\right) \]
                        5. --lowering--.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\left(\frac{2}{3}\right), z\right), \left(y - x\right)\right), 6\right)\right) \]
                        6. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6\right)\right) \]
                        7. --lowering--.f6499.5%

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6\right)\right) \]
                      4. Applied egg-rr99.5%

                        \[\leadsto x + \color{blue}{\left(\left(0.6666666666666666 - z\right) \cdot \left(y - x\right)\right) \cdot 6} \]
                      5. Final simplification99.5%

                        \[\leadsto x + \left(\left(y - x\right) \cdot \left(0.6666666666666666 - z\right)\right) \cdot 6 \]
                      6. Add Preprocessing

                      Alternative 14: 25.8% accurate, 4.3× speedup?

                      \[\begin{array}{l} \\ x \cdot -3 \end{array} \]
                      (FPCore (x y z) :precision binary64 (* x -3.0))
                      double code(double x, double y, double z) {
                      	return x * -3.0;
                      }
                      
                      real(8) function code(x, y, z)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          code = x * (-3.0d0)
                      end function
                      
                      public static double code(double x, double y, double z) {
                      	return x * -3.0;
                      }
                      
                      def code(x, y, z):
                      	return x * -3.0
                      
                      function code(x, y, z)
                      	return Float64(x * -3.0)
                      end
                      
                      function tmp = code(x, y, z)
                      	tmp = x * -3.0;
                      end
                      
                      code[x_, y_, z_] := N[(x * -3.0), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      x \cdot -3
                      \end{array}
                      
                      Derivation
                      1. Initial program 99.5%

                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                      2. Step-by-step derivation
                        1. +-lowering-+.f64N/A

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

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

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

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot \left(\frac{2}{3} - z\right)\right)\right)\right) \]
                        5. sub-negN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \left(\frac{2}{3} + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                        6. distribute-lft-inN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \color{blue}{6 \cdot \left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
                        7. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(6 \cdot \frac{2}{3} + \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{6}\right)\right)\right) \]
                        8. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)}\right)\right)\right) \]
                        9. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(6 \cdot \frac{2}{3}\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot 6\right)\right)\right)\right) \]
                        10. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot 6\right)\right)\right)\right) \]
                        11. distribute-lft-neg-outN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(\mathsf{neg}\left(z \cdot 6\right)\right)\right)\right)\right) \]
                        12. distribute-rgt-neg-inN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right) \]
                        13. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot -6\right)\right)\right)\right) \]
                        14. metadata-evalN/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \left(z \cdot \left(6 \cdot \color{blue}{-1}\right)\right)\right)\right)\right) \]
                        15. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot -1\right)}\right)\right)\right)\right) \]
                        16. metadata-eval99.7%

                          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{+.f64}\left(4, \mathsf{*.f64}\left(z, -6\right)\right)\right)\right) \]
                      3. Simplified99.7%

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

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{4}\right)\right) \]
                      6. Step-by-step derivation
                        1. Simplified49.5%

                          \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
                        2. Taylor expanded in x around inf

                          \[\leadsto \color{blue}{-3 \cdot x} \]
                        3. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto x \cdot \color{blue}{-3} \]
                          2. *-lowering-*.f6426.0%

                            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{-3}\right) \]
                        4. Simplified26.0%

                          \[\leadsto \color{blue}{x \cdot -3} \]
                        5. Add Preprocessing

                        Reproduce

                        ?
                        herbie shell --seed 2024150 
                        (FPCore (x y z)
                          :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D"
                          :precision binary64
                          (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))