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

Percentage Accurate: 99.6% → 99.6%
Time: 26.3s
Alternatives: 14
Speedup: 1.0×

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.6% 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.6% 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}
Derivation
  1. Initial program 99.6%

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

Alternative 2: 51.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 6 \cdot \left(x \cdot z\right)\\ \mathbf{if}\;z \leq -2 \cdot 10^{+198}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \mathbf{elif}\;z \leq -0.5:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-275}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.5:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+187}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot -6\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* 6.0 (* x z))))
   (if (<= z -2e+198)
     (* y (* z -6.0))
     (if (<= z -0.5)
       t_0
       (if (<= z 2.55e-275)
         (* x -3.0)
         (if (<= z 0.5)
           (* y 4.0)
           (if (<= z 4.1e+187) t_0 (* z (* y -6.0)))))))))
double code(double x, double y, double z) {
	double t_0 = 6.0 * (x * z);
	double tmp;
	if (z <= -2e+198) {
		tmp = y * (z * -6.0);
	} else if (z <= -0.5) {
		tmp = t_0;
	} else if (z <= 2.55e-275) {
		tmp = x * -3.0;
	} else if (z <= 0.5) {
		tmp = y * 4.0;
	} else if (z <= 4.1e+187) {
		tmp = t_0;
	} else {
		tmp = z * (y * -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) :: t_0
    real(8) :: tmp
    t_0 = 6.0d0 * (x * z)
    if (z <= (-2d+198)) then
        tmp = y * (z * (-6.0d0))
    else if (z <= (-0.5d0)) then
        tmp = t_0
    else if (z <= 2.55d-275) then
        tmp = x * (-3.0d0)
    else if (z <= 0.5d0) then
        tmp = y * 4.0d0
    else if (z <= 4.1d+187) then
        tmp = t_0
    else
        tmp = z * (y * (-6.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = 6.0 * (x * z);
	double tmp;
	if (z <= -2e+198) {
		tmp = y * (z * -6.0);
	} else if (z <= -0.5) {
		tmp = t_0;
	} else if (z <= 2.55e-275) {
		tmp = x * -3.0;
	} else if (z <= 0.5) {
		tmp = y * 4.0;
	} else if (z <= 4.1e+187) {
		tmp = t_0;
	} else {
		tmp = z * (y * -6.0);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 6.0 * (x * z)
	tmp = 0
	if z <= -2e+198:
		tmp = y * (z * -6.0)
	elif z <= -0.5:
		tmp = t_0
	elif z <= 2.55e-275:
		tmp = x * -3.0
	elif z <= 0.5:
		tmp = y * 4.0
	elif z <= 4.1e+187:
		tmp = t_0
	else:
		tmp = z * (y * -6.0)
	return tmp
function code(x, y, z)
	t_0 = Float64(6.0 * Float64(x * z))
	tmp = 0.0
	if (z <= -2e+198)
		tmp = Float64(y * Float64(z * -6.0));
	elseif (z <= -0.5)
		tmp = t_0;
	elseif (z <= 2.55e-275)
		tmp = Float64(x * -3.0);
	elseif (z <= 0.5)
		tmp = Float64(y * 4.0);
	elseif (z <= 4.1e+187)
		tmp = t_0;
	else
		tmp = Float64(z * Float64(y * -6.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 6.0 * (x * z);
	tmp = 0.0;
	if (z <= -2e+198)
		tmp = y * (z * -6.0);
	elseif (z <= -0.5)
		tmp = t_0;
	elseif (z <= 2.55e-275)
		tmp = x * -3.0;
	elseif (z <= 0.5)
		tmp = y * 4.0;
	elseif (z <= 4.1e+187)
		tmp = t_0;
	else
		tmp = z * (y * -6.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+198], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.5], t$95$0, If[LessEqual[z, 2.55e-275], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.1e+187], t$95$0, N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+198}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\

\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-275}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+187}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.00000000000000004e198

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

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

      \[\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-*.f6474.8%

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

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

    if -2.00000000000000004e198 < z < -0.5 or 0.5 < z < 4.1e187

    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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \left(\left(\frac{2}{3} - z\right) \cdot \left(y - x\right)\right) \cdot 6 + x \]
      4. fma-defineN/A

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6, x\right) \]
      9. --lowering--.f6499.6%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6, x\right) \]
    4. Applied egg-rr99.6%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(-6, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), z\right)\right) \]
    7. Simplified95.0%

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

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

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

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

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

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

    if -0.5 < z < 2.54999999999999992e-275

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

        \[\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-*.f6458.0%

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

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

      if 2.54999999999999992e-275 < z < 0.5

      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--.f6460.2%

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

        \[\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. *-lowering-*.f6459.3%

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

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

      if 4.1e187 < z

      1. Initial program 100.0%

        \[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 \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) + \color{blue}{x} \]
        2. *-commutativeN/A

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

          \[\leadsto \left(\left(\frac{2}{3} - z\right) \cdot \left(y - x\right)\right) \cdot 6 + x \]
        4. fma-defineN/A

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

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

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

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

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6, x\right) \]
        9. --lowering--.f6499.9%

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6, x\right) \]
      4. Applied egg-rr99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(z, \color{blue}{-6}\right)\right) \]
      10. Simplified66.4%

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, -6\right), z\right) \]
      12. Applied egg-rr66.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+198}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \mathbf{elif}\;z \leq -0.5:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-275}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.5:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+187}:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot -6\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 51.5% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := y \cdot \left(z \cdot -6\right)\\ t_1 := 6 \cdot \left(x \cdot z\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{+195}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -0.5:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-288}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.55:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+193}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (* y (* z -6.0))) (t_1 (* 6.0 (* x z))))
       (if (<= z -8e+195)
         t_0
         (if (<= z -0.5)
           t_1
           (if (<= z 1.15e-288)
             (* x -3.0)
             (if (<= z 0.55) (* y 4.0) (if (<= z 1.12e+193) t_1 t_0)))))))
    double code(double x, double y, double z) {
    	double t_0 = y * (z * -6.0);
    	double t_1 = 6.0 * (x * z);
    	double tmp;
    	if (z <= -8e+195) {
    		tmp = t_0;
    	} else if (z <= -0.5) {
    		tmp = t_1;
    	} else if (z <= 1.15e-288) {
    		tmp = x * -3.0;
    	} else if (z <= 0.55) {
    		tmp = y * 4.0;
    	} else if (z <= 1.12e+193) {
    		tmp = t_1;
    	} 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) :: t_1
        real(8) :: tmp
        t_0 = y * (z * (-6.0d0))
        t_1 = 6.0d0 * (x * z)
        if (z <= (-8d+195)) then
            tmp = t_0
        else if (z <= (-0.5d0)) then
            tmp = t_1
        else if (z <= 1.15d-288) then
            tmp = x * (-3.0d0)
        else if (z <= 0.55d0) then
            tmp = y * 4.0d0
        else if (z <= 1.12d+193) then
            tmp = t_1
        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 t_1 = 6.0 * (x * z);
    	double tmp;
    	if (z <= -8e+195) {
    		tmp = t_0;
    	} else if (z <= -0.5) {
    		tmp = t_1;
    	} else if (z <= 1.15e-288) {
    		tmp = x * -3.0;
    	} else if (z <= 0.55) {
    		tmp = y * 4.0;
    	} else if (z <= 1.12e+193) {
    		tmp = t_1;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = y * (z * -6.0)
    	t_1 = 6.0 * (x * z)
    	tmp = 0
    	if z <= -8e+195:
    		tmp = t_0
    	elif z <= -0.5:
    		tmp = t_1
    	elif z <= 1.15e-288:
    		tmp = x * -3.0
    	elif z <= 0.55:
    		tmp = y * 4.0
    	elif z <= 1.12e+193:
    		tmp = t_1
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(y * Float64(z * -6.0))
    	t_1 = Float64(6.0 * Float64(x * z))
    	tmp = 0.0
    	if (z <= -8e+195)
    		tmp = t_0;
    	elseif (z <= -0.5)
    		tmp = t_1;
    	elseif (z <= 1.15e-288)
    		tmp = Float64(x * -3.0);
    	elseif (z <= 0.55)
    		tmp = Float64(y * 4.0);
    	elseif (z <= 1.12e+193)
    		tmp = t_1;
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = y * (z * -6.0);
    	t_1 = 6.0 * (x * z);
    	tmp = 0.0;
    	if (z <= -8e+195)
    		tmp = t_0;
    	elseif (z <= -0.5)
    		tmp = t_1;
    	elseif (z <= 1.15e-288)
    		tmp = x * -3.0;
    	elseif (z <= 0.55)
    		tmp = y * 4.0;
    	elseif (z <= 1.12e+193)
    		tmp = t_1;
    	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]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+195], t$95$0, If[LessEqual[z, -0.5], t$95$1, If[LessEqual[z, 1.15e-288], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.55], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.12e+193], t$95$1, t$95$0]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := y \cdot \left(z \cdot -6\right)\\
    t_1 := 6 \cdot \left(x \cdot z\right)\\
    \mathbf{if}\;z \leq -8 \cdot 10^{+195}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;z \leq -0.5:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.15 \cdot 10^{-288}:\\
    \;\;\;\;x \cdot -3\\
    
    \mathbf{elif}\;z \leq 0.55:\\
    \;\;\;\;y \cdot 4\\
    
    \mathbf{elif}\;z \leq 1.12 \cdot 10^{+193}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if z < -7.99999999999999982e195 or 1.1199999999999999e193 < z

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

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

        \[\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-*.f6470.6%

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

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

      if -7.99999999999999982e195 < z < -0.5 or 0.55000000000000004 < z < 1.1199999999999999e193

      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. Step-by-step derivation
        1. +-commutativeN/A

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

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

          \[\leadsto \left(\left(\frac{2}{3} - z\right) \cdot \left(y - x\right)\right) \cdot 6 + x \]
        4. fma-defineN/A

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

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

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

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

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6, x\right) \]
        9. --lowering--.f6499.6%

          \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6, x\right) \]
      4. Applied egg-rr99.6%

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(-6, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), z\right)\right) \]
      7. Simplified95.0%

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

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

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

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

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

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

      if -0.5 < z < 1.15e-288

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

          \[\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-*.f6458.0%

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

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

        if 1.15e-288 < z < 0.55000000000000004

        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--.f6460.2%

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

          \[\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. *-lowering-*.f6459.3%

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+195}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \mathbf{elif}\;z \leq -0.5:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-288}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.55:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+193}:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 51.5% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := -6 \cdot \left(y \cdot z\right)\\ t_1 := 6 \cdot \left(x \cdot z\right)\\ \mathbf{if}\;z \leq -6 \cdot 10^{+195}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -0.5:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-288}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.68:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+193}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
         (if (<= z -6e+195)
           t_0
           (if (<= z -0.5)
             t_1
             (if (<= z 1.75e-288)
               (* x -3.0)
               (if (<= z 0.68) (* y 4.0) (if (<= z 6.4e+193) t_1 t_0)))))))
      double code(double x, double y, double z) {
      	double t_0 = -6.0 * (y * z);
      	double t_1 = 6.0 * (x * z);
      	double tmp;
      	if (z <= -6e+195) {
      		tmp = t_0;
      	} else if (z <= -0.5) {
      		tmp = t_1;
      	} else if (z <= 1.75e-288) {
      		tmp = x * -3.0;
      	} else if (z <= 0.68) {
      		tmp = y * 4.0;
      	} else if (z <= 6.4e+193) {
      		tmp = t_1;
      	} 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) :: t_1
          real(8) :: tmp
          t_0 = (-6.0d0) * (y * z)
          t_1 = 6.0d0 * (x * z)
          if (z <= (-6d+195)) then
              tmp = t_0
          else if (z <= (-0.5d0)) then
              tmp = t_1
          else if (z <= 1.75d-288) then
              tmp = x * (-3.0d0)
          else if (z <= 0.68d0) then
              tmp = y * 4.0d0
          else if (z <= 6.4d+193) then
              tmp = t_1
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = -6.0 * (y * z);
      	double t_1 = 6.0 * (x * z);
      	double tmp;
      	if (z <= -6e+195) {
      		tmp = t_0;
      	} else if (z <= -0.5) {
      		tmp = t_1;
      	} else if (z <= 1.75e-288) {
      		tmp = x * -3.0;
      	} else if (z <= 0.68) {
      		tmp = y * 4.0;
      	} else if (z <= 6.4e+193) {
      		tmp = t_1;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = -6.0 * (y * z)
      	t_1 = 6.0 * (x * z)
      	tmp = 0
      	if z <= -6e+195:
      		tmp = t_0
      	elif z <= -0.5:
      		tmp = t_1
      	elif z <= 1.75e-288:
      		tmp = x * -3.0
      	elif z <= 0.68:
      		tmp = y * 4.0
      	elif z <= 6.4e+193:
      		tmp = t_1
      	else:
      		tmp = t_0
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(-6.0 * Float64(y * z))
      	t_1 = Float64(6.0 * Float64(x * z))
      	tmp = 0.0
      	if (z <= -6e+195)
      		tmp = t_0;
      	elseif (z <= -0.5)
      		tmp = t_1;
      	elseif (z <= 1.75e-288)
      		tmp = Float64(x * -3.0);
      	elseif (z <= 0.68)
      		tmp = Float64(y * 4.0);
      	elseif (z <= 6.4e+193)
      		tmp = t_1;
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = -6.0 * (y * z);
      	t_1 = 6.0 * (x * z);
      	tmp = 0.0;
      	if (z <= -6e+195)
      		tmp = t_0;
      	elseif (z <= -0.5)
      		tmp = t_1;
      	elseif (z <= 1.75e-288)
      		tmp = x * -3.0;
      	elseif (z <= 0.68)
      		tmp = y * 4.0;
      	elseif (z <= 6.4e+193)
      		tmp = t_1;
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+195], t$95$0, If[LessEqual[z, -0.5], t$95$1, If[LessEqual[z, 1.75e-288], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6.4e+193], t$95$1, t$95$0]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := -6 \cdot \left(y \cdot z\right)\\
      t_1 := 6 \cdot \left(x \cdot z\right)\\
      \mathbf{if}\;z \leq -6 \cdot 10^{+195}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;z \leq -0.5:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 1.75 \cdot 10^{-288}:\\
      \;\;\;\;x \cdot -3\\
      
      \mathbf{elif}\;z \leq 0.68:\\
      \;\;\;\;y \cdot 4\\
      
      \mathbf{elif}\;z \leq 6.4 \cdot 10^{+193}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if z < -6.0000000000000001e195 or 6.40000000000000026e193 < z

        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. Step-by-step derivation
          1. +-commutativeN/A

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

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

            \[\leadsto \left(\left(\frac{2}{3} - z\right) \cdot \left(y - x\right)\right) \cdot 6 + x \]
          4. fma-defineN/A

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

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

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

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

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6, x\right) \]
          9. --lowering--.f6499.8%

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6, x\right) \]
        4. Applied egg-rr99.8%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(-6, \color{blue}{\left(y \cdot z\right)}\right) \]
        9. Step-by-step derivation
          1. *-lowering-*.f6470.5%

            \[\leadsto \mathsf{*.f64}\left(-6, \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right) \]
        10. Simplified70.5%

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

        if -6.0000000000000001e195 < z < -0.5 or 0.680000000000000049 < z < 6.40000000000000026e193

        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. Step-by-step derivation
          1. +-commutativeN/A

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

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

            \[\leadsto \left(\left(\frac{2}{3} - z\right) \cdot \left(y - x\right)\right) \cdot 6 + x \]
          4. fma-defineN/A

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

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

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

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

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6, x\right) \]
          9. --lowering--.f6499.6%

            \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6, x\right) \]
        4. Applied egg-rr99.6%

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(-6, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), z\right)\right) \]
        7. Simplified95.0%

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

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

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

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

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

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

        if -0.5 < z < 1.7500000000000001e-288

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

            \[\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-*.f6458.0%

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

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

          if 1.7500000000000001e-288 < z < 0.680000000000000049

          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--.f6460.2%

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

            \[\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. *-lowering-*.f6459.3%

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+195}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -0.5:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-288}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.68:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+193}:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 5: 74.4% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{if}\;z \leq -0.00033:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-283}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 660000:\\ \;\;\;\;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 (* -6.0 (* (- y x) z))))
           (if (<= z -0.00033)
             t_0
             (if (<= z 3.9e-283)
               (* x -3.0)
               (if (<= z 660000.0) (* 6.0 (* y (- 0.6666666666666666 z))) t_0)))))
        double code(double x, double y, double z) {
        	double t_0 = -6.0 * ((y - x) * z);
        	double tmp;
        	if (z <= -0.00033) {
        		tmp = t_0;
        	} else if (z <= 3.9e-283) {
        		tmp = x * -3.0;
        	} else if (z <= 660000.0) {
        		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 = (-6.0d0) * ((y - x) * z)
            if (z <= (-0.00033d0)) then
                tmp = t_0
            else if (z <= 3.9d-283) then
                tmp = x * (-3.0d0)
            else if (z <= 660000.0d0) 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 = -6.0 * ((y - x) * z);
        	double tmp;
        	if (z <= -0.00033) {
        		tmp = t_0;
        	} else if (z <= 3.9e-283) {
        		tmp = x * -3.0;
        	} else if (z <= 660000.0) {
        		tmp = 6.0 * (y * (0.6666666666666666 - z));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = -6.0 * ((y - x) * z)
        	tmp = 0
        	if z <= -0.00033:
        		tmp = t_0
        	elif z <= 3.9e-283:
        		tmp = x * -3.0
        	elif z <= 660000.0:
        		tmp = 6.0 * (y * (0.6666666666666666 - z))
        	else:
        		tmp = t_0
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(-6.0 * Float64(Float64(y - x) * z))
        	tmp = 0.0
        	if (z <= -0.00033)
        		tmp = t_0;
        	elseif (z <= 3.9e-283)
        		tmp = Float64(x * -3.0);
        	elseif (z <= 660000.0)
        		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 = -6.0 * ((y - x) * z);
        	tmp = 0.0;
        	if (z <= -0.00033)
        		tmp = t_0;
        	elseif (z <= 3.9e-283)
        		tmp = x * -3.0;
        	elseif (z <= 660000.0)
        		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[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.00033], t$95$0, If[LessEqual[z, 3.9e-283], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 660000.0], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
        \mathbf{if}\;z \leq -0.00033:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;z \leq 3.9 \cdot 10^{-283}:\\
        \;\;\;\;x \cdot -3\\
        
        \mathbf{elif}\;z \leq 660000:\\
        \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -3.3e-4 or 6.6e5 < 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. Step-by-step derivation
            1. +-commutativeN/A

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

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

              \[\leadsto \left(\left(\frac{2}{3} - z\right) \cdot \left(y - x\right)\right) \cdot 6 + x \]
            4. fma-defineN/A

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

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

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

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

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6, x\right) \]
            9. --lowering--.f6499.7%

              \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6, x\right) \]
          4. Applied egg-rr99.7%

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

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

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

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

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

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

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

          if -3.3e-4 < z < 3.9000000000000002e-283

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

              \[\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-*.f6459.3%

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

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

            if 3.9000000000000002e-283 < z < 6.6e5

            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--.f6460.6%

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

              \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
          7. Recombined 3 regimes into one program.
          8. Add Preprocessing

          Alternative 6: 74.1% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{if}\;z \leq -0.000115:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{-288}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.56:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (let* ((t_0 (* -6.0 (* (- y x) z))))
             (if (<= z -0.000115)
               t_0
               (if (<= z 1.42e-288) (* x -3.0) (if (<= z 0.56) (* y 4.0) t_0)))))
          double code(double x, double y, double z) {
          	double t_0 = -6.0 * ((y - x) * z);
          	double tmp;
          	if (z <= -0.000115) {
          		tmp = t_0;
          	} else if (z <= 1.42e-288) {
          		tmp = x * -3.0;
          	} else if (z <= 0.56) {
          		tmp = y * 4.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 = (-6.0d0) * ((y - x) * z)
              if (z <= (-0.000115d0)) then
                  tmp = t_0
              else if (z <= 1.42d-288) then
                  tmp = x * (-3.0d0)
              else if (z <= 0.56d0) then
                  tmp = y * 4.0d0
              else
                  tmp = t_0
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double t_0 = -6.0 * ((y - x) * z);
          	double tmp;
          	if (z <= -0.000115) {
          		tmp = t_0;
          	} else if (z <= 1.42e-288) {
          		tmp = x * -3.0;
          	} else if (z <= 0.56) {
          		tmp = y * 4.0;
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	t_0 = -6.0 * ((y - x) * z)
          	tmp = 0
          	if z <= -0.000115:
          		tmp = t_0
          	elif z <= 1.42e-288:
          		tmp = x * -3.0
          	elif z <= 0.56:
          		tmp = y * 4.0
          	else:
          		tmp = t_0
          	return tmp
          
          function code(x, y, z)
          	t_0 = Float64(-6.0 * Float64(Float64(y - x) * z))
          	tmp = 0.0
          	if (z <= -0.000115)
          		tmp = t_0;
          	elseif (z <= 1.42e-288)
          		tmp = Float64(x * -3.0);
          	elseif (z <= 0.56)
          		tmp = Float64(y * 4.0);
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	t_0 = -6.0 * ((y - x) * z);
          	tmp = 0.0;
          	if (z <= -0.000115)
          		tmp = t_0;
          	elseif (z <= 1.42e-288)
          		tmp = x * -3.0;
          	elseif (z <= 0.56)
          		tmp = y * 4.0;
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.000115], t$95$0, If[LessEqual[z, 1.42e-288], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.56], N[(y * 4.0), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
          \mathbf{if}\;z \leq -0.000115:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;z \leq 1.42 \cdot 10^{-288}:\\
          \;\;\;\;x \cdot -3\\
          
          \mathbf{elif}\;z \leq 0.56:\\
          \;\;\;\;y \cdot 4\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -1.15e-4 or 0.56000000000000005 < 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. Step-by-step derivation
              1. +-commutativeN/A

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

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

                \[\leadsto \left(\left(\frac{2}{3} - z\right) \cdot \left(y - x\right)\right) \cdot 6 + x \]
              4. fma-defineN/A

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

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

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

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

                \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6, x\right) \]
              9. --lowering--.f6499.7%

                \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6, x\right) \]
            4. Applied egg-rr99.7%

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

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

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

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

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

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

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

            if -1.15e-4 < z < 1.42e-288

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

                \[\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-*.f6459.3%

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

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

              if 1.42e-288 < z < 0.56000000000000005

              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--.f6460.2%

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

                \[\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. *-lowering-*.f6459.3%

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

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

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

            Alternative 7: 51.2% accurate, 0.6× speedup?

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

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

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

                  \[\leadsto \left(\left(\frac{2}{3} - z\right) \cdot \left(y - x\right)\right) \cdot 6 + x \]
                4. fma-defineN/A

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

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

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

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

                  \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \left(y - x\right)\right), 6, x\right) \]
                9. --lowering--.f6499.7%

                  \[\leadsto \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{\_.f64}\left(y, x\right)\right), 6, x\right) \]
              4. Applied egg-rr99.7%

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(-6, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), z\right)\right) \]
              7. Simplified96.5%

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

                \[\leadsto \mathsf{*.f64}\left(-6, \color{blue}{\left(y \cdot z\right)}\right) \]
              9. Step-by-step derivation
                1. *-lowering-*.f6450.7%

                  \[\leadsto \mathsf{*.f64}\left(-6, \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right) \]
              10. Simplified50.7%

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

              if -2.4500000000000002 < z < 1.7e-271

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

                  \[\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.5%

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

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

                if 1.7e-271 < z < 0.00145

                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--.f6461.3%

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

                  \[\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. *-lowering-*.f6460.4%

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

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

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

              Alternative 8: 97.7% accurate, 0.8× speedup?

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

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

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

                if -0.56000000000000005 < z < 0.56000000000000005

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

                    \[\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. *-lowering-*.f64N/A

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

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

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

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

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

                    \[\leadsto \color{blue}{4 \cdot y + x \cdot -3} \]
                7. Recombined 2 regimes into one program.
                8. Final simplification97.3%

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

                Alternative 9: 97.7% accurate, 0.8× speedup?

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

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

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

                  if -0.599999999999999978 < z < 0.619999999999999996

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

                      \[\leadsto x + \left(y - x\right) \cdot \color{blue}{4} \]
                  7. Recombined 2 regimes into one program.
                  8. Final simplification97.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.62:\\ \;\;\;\;x + \left(y - x\right) \cdot 4\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\ \end{array} \]
                  9. Add Preprocessing

                  Alternative 10: 75.9% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(-3 + 6 \cdot z\right)\\ \mathbf{if}\;x \leq -9.5 \cdot 10^{-39}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+55}:\\ \;\;\;\;\left(0.6666666666666666 - z\right) \cdot \left(y \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (let* ((t_0 (* x (+ -3.0 (* 6.0 z)))))
                     (if (<= x -9.5e-39)
                       t_0
                       (if (<= x 1.12e+55) (* (- 0.6666666666666666 z) (* y 6.0)) t_0))))
                  double code(double x, double y, double z) {
                  	double t_0 = x * (-3.0 + (6.0 * z));
                  	double tmp;
                  	if (x <= -9.5e-39) {
                  		tmp = t_0;
                  	} else if (x <= 1.12e+55) {
                  		tmp = (0.6666666666666666 - z) * (y * 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 = x * ((-3.0d0) + (6.0d0 * z))
                      if (x <= (-9.5d-39)) then
                          tmp = t_0
                      else if (x <= 1.12d+55) then
                          tmp = (0.6666666666666666d0 - z) * (y * 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 = x * (-3.0 + (6.0 * z));
                  	double tmp;
                  	if (x <= -9.5e-39) {
                  		tmp = t_0;
                  	} else if (x <= 1.12e+55) {
                  		tmp = (0.6666666666666666 - z) * (y * 6.0);
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	t_0 = x * (-3.0 + (6.0 * z))
                  	tmp = 0
                  	if x <= -9.5e-39:
                  		tmp = t_0
                  	elif x <= 1.12e+55:
                  		tmp = (0.6666666666666666 - z) * (y * 6.0)
                  	else:
                  		tmp = t_0
                  	return tmp
                  
                  function code(x, y, z)
                  	t_0 = Float64(x * Float64(-3.0 + Float64(6.0 * z)))
                  	tmp = 0.0
                  	if (x <= -9.5e-39)
                  		tmp = t_0;
                  	elseif (x <= 1.12e+55)
                  		tmp = Float64(Float64(0.6666666666666666 - z) * Float64(y * 6.0));
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	t_0 = x * (-3.0 + (6.0 * z));
                  	tmp = 0.0;
                  	if (x <= -9.5e-39)
                  		tmp = t_0;
                  	elseif (x <= 1.12e+55)
                  		tmp = (0.6666666666666666 - z) * (y * 6.0);
                  	else
                  		tmp = t_0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(-3.0 + N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.5e-39], t$95$0, If[LessEqual[x, 1.12e+55], N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(y * 6.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := x \cdot \left(-3 + 6 \cdot z\right)\\
                  \mathbf{if}\;x \leq -9.5 \cdot 10^{-39}:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;x \leq 1.12 \cdot 10^{+55}:\\
                  \;\;\;\;\left(0.6666666666666666 - z\right) \cdot \left(y \cdot 6\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -9.4999999999999999e-39 or 1.12000000000000006e55 < x

                    1. Initial program 99.6%

                      \[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-eval83.6%

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

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

                    if -9.4999999999999999e-39 < x < 1.12000000000000006e55

                    1. Initial program 99.6%

                      \[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--.f6477.9%

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{2}{3}, z\right), \mathsf{*.f64}\left(y, \color{blue}{6}\right)\right) \]
                    7. Applied egg-rr78.0%

                      \[\leadsto \color{blue}{\left(0.6666666666666666 - z\right) \cdot \left(y \cdot 6\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification80.7%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-39}:\\ \;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+55}:\\ \;\;\;\;\left(0.6666666666666666 - z\right) \cdot \left(y \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 11: 75.9% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(-3 + 6 \cdot z\right)\\ \mathbf{if}\;x \leq -2 \cdot 10^{-38}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+55}:\\ \;\;\;\;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 (* 6.0 z)))))
                     (if (<= x -2e-38)
                       t_0
                       (if (<= x 1.12e+55) (* 6.0 (* y (- 0.6666666666666666 z))) t_0))))
                  double code(double x, double y, double z) {
                  	double t_0 = x * (-3.0 + (6.0 * z));
                  	double tmp;
                  	if (x <= -2e-38) {
                  		tmp = t_0;
                  	} else if (x <= 1.12e+55) {
                  		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) + (6.0d0 * z))
                      if (x <= (-2d-38)) then
                          tmp = t_0
                      else if (x <= 1.12d+55) 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 + (6.0 * z));
                  	double tmp;
                  	if (x <= -2e-38) {
                  		tmp = t_0;
                  	} else if (x <= 1.12e+55) {
                  		tmp = 6.0 * (y * (0.6666666666666666 - z));
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	t_0 = x * (-3.0 + (6.0 * z))
                  	tmp = 0
                  	if x <= -2e-38:
                  		tmp = t_0
                  	elif x <= 1.12e+55:
                  		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(6.0 * z)))
                  	tmp = 0.0
                  	if (x <= -2e-38)
                  		tmp = t_0;
                  	elseif (x <= 1.12e+55)
                  		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 + (6.0 * z));
                  	tmp = 0.0;
                  	if (x <= -2e-38)
                  		tmp = t_0;
                  	elseif (x <= 1.12e+55)
                  		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[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e-38], t$95$0, If[LessEqual[x, 1.12e+55], 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 + 6 \cdot z\right)\\
                  \mathbf{if}\;x \leq -2 \cdot 10^{-38}:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;x \leq 1.12 \cdot 10^{+55}:\\
                  \;\;\;\;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 < -1.9999999999999999e-38 or 1.12000000000000006e55 < x

                    1. Initial program 99.6%

                      \[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-eval83.6%

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

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

                    if -1.9999999999999999e-38 < x < 1.12000000000000006e55

                    1. Initial program 99.6%

                      \[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--.f6477.9%

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

                      \[\leadsto \color{blue}{6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification80.7%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+55}:\\ \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 12: 37.5% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{-17}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-64}:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;x \cdot -3\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (if (<= x -3.7e-17) (* x -3.0) (if (<= x 5.8e-64) (* y 4.0) (* x -3.0))))
                  double code(double x, double y, double z) {
                  	double tmp;
                  	if (x <= -3.7e-17) {
                  		tmp = x * -3.0;
                  	} else if (x <= 5.8e-64) {
                  		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 <= (-3.7d-17)) then
                          tmp = x * (-3.0d0)
                      else if (x <= 5.8d-64) 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 <= -3.7e-17) {
                  		tmp = x * -3.0;
                  	} else if (x <= 5.8e-64) {
                  		tmp = y * 4.0;
                  	} else {
                  		tmp = x * -3.0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	tmp = 0
                  	if x <= -3.7e-17:
                  		tmp = x * -3.0
                  	elif x <= 5.8e-64:
                  		tmp = y * 4.0
                  	else:
                  		tmp = x * -3.0
                  	return tmp
                  
                  function code(x, y, z)
                  	tmp = 0.0
                  	if (x <= -3.7e-17)
                  		tmp = Float64(x * -3.0);
                  	elseif (x <= 5.8e-64)
                  		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 <= -3.7e-17)
                  		tmp = x * -3.0;
                  	elseif (x <= 5.8e-64)
                  		tmp = y * 4.0;
                  	else
                  		tmp = x * -3.0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := If[LessEqual[x, -3.7e-17], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, 5.8e-64], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq -3.7 \cdot 10^{-17}:\\
                  \;\;\;\;x \cdot -3\\
                  
                  \mathbf{elif}\;x \leq 5.8 \cdot 10^{-64}:\\
                  \;\;\;\;y \cdot 4\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x \cdot -3\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -3.6999999999999997e-17 or 5.7999999999999998e-64 < x

                    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.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. Simplified50.2%

                        \[\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.0%

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

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

                      if -3.6999999999999997e-17 < x < 5.7999999999999998e-64

                      1. Initial program 99.6%

                        \[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--.f6479.3%

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

                        \[\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. *-lowering-*.f6442.6%

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{-17}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-64}:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;x \cdot -3\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 13: 99.5% accurate, 1.2× speedup?

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

                      \[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 + 6 \cdot \left(\left(y - x\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
                    6. Add Preprocessing

                    Alternative 14: 27.0% accurate, 4.3× speedup?

                    \[\begin{array}{l} \\ y \cdot 4 \end{array} \]
                    (FPCore (x y z) :precision binary64 (* y 4.0))
                    double code(double x, double y, double z) {
                    	return y * 4.0;
                    }
                    
                    real(8) function code(x, y, z)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        code = y * 4.0d0
                    end function
                    
                    public static double code(double x, double y, double z) {
                    	return y * 4.0;
                    }
                    
                    def code(x, y, z):
                    	return y * 4.0
                    
                    function code(x, y, z)
                    	return Float64(y * 4.0)
                    end
                    
                    function tmp = code(x, y, z)
                    	tmp = y * 4.0;
                    end
                    
                    code[x_, y_, z_] := N[(y * 4.0), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    y \cdot 4
                    \end{array}
                    
                    Derivation
                    1. Initial program 99.6%

                      \[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--.f6450.9%

                        \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\frac{2}{3}, \color{blue}{z}\right)\right)\right) \]
                    5. Simplified50.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. *-lowering-*.f6425.6%

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

                      \[\leadsto \color{blue}{4 \cdot y} \]
                    9. Final simplification25.6%

                      \[\leadsto y \cdot 4 \]
                    10. Add Preprocessing

                    Reproduce

                    ?
                    herbie shell --seed 2024141 
                    (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))))