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

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 99.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right) \end{array} \]
(FPCore (x y z) :precision binary64 (fma (- y x) (+ 4.0 (* z -6.0)) x))
double code(double x, double y, double z) {
	return fma((y - x), (4.0 + (z * -6.0)), x);
}
function code(x, y, z)
	return fma(Float64(y - x), Float64(4.0 + Float64(z * -6.0)), x)
end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\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. Step-by-step derivation
    1. +-commutative99.6%

      \[\leadsto \color{blue}{\left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) + x} \]
    2. associate-*l*99.7%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(\frac{2}{3} - z\right)\right)} + x \]
    3. fma-def99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, 6 \cdot \left(\frac{2}{3} - z\right), x\right)} \]
    4. sub-neg99.7%

      \[\leadsto \mathsf{fma}\left(y - x, 6 \cdot \color{blue}{\left(\frac{2}{3} + \left(-z\right)\right)}, x\right) \]
    5. distribute-rgt-in99.8%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{2}{3} \cdot 6 + \left(-z\right) \cdot 6}, x\right) \]
    6. metadata-eval99.8%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{0.6666666666666666} \cdot 6 + \left(-z\right) \cdot 6, x\right) \]
    7. metadata-eval99.8%

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{4} + \left(-z\right) \cdot 6, x\right) \]
    8. distribute-lft-neg-out99.8%

      \[\leadsto \mathsf{fma}\left(y - x, 4 + \color{blue}{\left(-z \cdot 6\right)}, x\right) \]
    9. distribute-rgt-neg-in99.8%

      \[\leadsto \mathsf{fma}\left(y - x, 4 + \color{blue}{z \cdot \left(-6\right)}, x\right) \]
    10. metadata-eval99.8%

      \[\leadsto \mathsf{fma}\left(y - x, 4 + z \cdot \color{blue}{-6}, x\right) \]
  3. Simplified99.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right)} \]
  4. Final simplification99.8%

    \[\leadsto \mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right) \]

Alternative 2: 50.9% accurate, 0.5× 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 -5.1 \cdot 10^{+197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-67}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-167}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-307}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-217}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-74}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.5:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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 -5.1e+197)
     t_0
     (if (<= z -1.05e+97)
       t_1
       (if (<= z -2.6e-11)
         t_0
         (if (<= z -9.5e-67)
           (* x -3.0)
           (if (<= z -1.75e-167)
             (* y 4.0)
             (if (<= z 2e-307)
               (* x -3.0)
               (if (<= z 5.4e-217)
                 (* y 4.0)
                 (if (<= z 3.6e-151)
                   (* x -3.0)
                   (if (<= z 1.1e-116)
                     (* y 4.0)
                     (if (<= z 4.4e-74)
                       (* x -3.0)
                       (if (<= z 0.5) (* y 4.0) t_1)))))))))))))
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 <= -5.1e+197) {
		tmp = t_0;
	} else if (z <= -1.05e+97) {
		tmp = t_1;
	} else if (z <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= -9.5e-67) {
		tmp = x * -3.0;
	} else if (z <= -1.75e-167) {
		tmp = y * 4.0;
	} else if (z <= 2e-307) {
		tmp = x * -3.0;
	} else if (z <= 5.4e-217) {
		tmp = y * 4.0;
	} else if (z <= 3.6e-151) {
		tmp = x * -3.0;
	} else if (z <= 1.1e-116) {
		tmp = y * 4.0;
	} else if (z <= 4.4e-74) {
		tmp = x * -3.0;
	} else if (z <= 0.5) {
		tmp = y * 4.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (-6.0d0) * (y * z)
    t_1 = 6.0d0 * (x * z)
    if (z <= (-5.1d+197)) then
        tmp = t_0
    else if (z <= (-1.05d+97)) then
        tmp = t_1
    else if (z <= (-2.6d-11)) then
        tmp = t_0
    else if (z <= (-9.5d-67)) then
        tmp = x * (-3.0d0)
    else if (z <= (-1.75d-167)) then
        tmp = y * 4.0d0
    else if (z <= 2d-307) then
        tmp = x * (-3.0d0)
    else if (z <= 5.4d-217) then
        tmp = y * 4.0d0
    else if (z <= 3.6d-151) then
        tmp = x * (-3.0d0)
    else if (z <= 1.1d-116) then
        tmp = y * 4.0d0
    else if (z <= 4.4d-74) then
        tmp = x * (-3.0d0)
    else if (z <= 0.5d0) then
        tmp = y * 4.0d0
    else
        tmp = t_1
    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 <= -5.1e+197) {
		tmp = t_0;
	} else if (z <= -1.05e+97) {
		tmp = t_1;
	} else if (z <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= -9.5e-67) {
		tmp = x * -3.0;
	} else if (z <= -1.75e-167) {
		tmp = y * 4.0;
	} else if (z <= 2e-307) {
		tmp = x * -3.0;
	} else if (z <= 5.4e-217) {
		tmp = y * 4.0;
	} else if (z <= 3.6e-151) {
		tmp = x * -3.0;
	} else if (z <= 1.1e-116) {
		tmp = y * 4.0;
	} else if (z <= 4.4e-74) {
		tmp = x * -3.0;
	} else if (z <= 0.5) {
		tmp = y * 4.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = -6.0 * (y * z)
	t_1 = 6.0 * (x * z)
	tmp = 0
	if z <= -5.1e+197:
		tmp = t_0
	elif z <= -1.05e+97:
		tmp = t_1
	elif z <= -2.6e-11:
		tmp = t_0
	elif z <= -9.5e-67:
		tmp = x * -3.0
	elif z <= -1.75e-167:
		tmp = y * 4.0
	elif z <= 2e-307:
		tmp = x * -3.0
	elif z <= 5.4e-217:
		tmp = y * 4.0
	elif z <= 3.6e-151:
		tmp = x * -3.0
	elif z <= 1.1e-116:
		tmp = y * 4.0
	elif z <= 4.4e-74:
		tmp = x * -3.0
	elif z <= 0.5:
		tmp = y * 4.0
	else:
		tmp = t_1
	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 <= -5.1e+197)
		tmp = t_0;
	elseif (z <= -1.05e+97)
		tmp = t_1;
	elseif (z <= -2.6e-11)
		tmp = t_0;
	elseif (z <= -9.5e-67)
		tmp = Float64(x * -3.0);
	elseif (z <= -1.75e-167)
		tmp = Float64(y * 4.0);
	elseif (z <= 2e-307)
		tmp = Float64(x * -3.0);
	elseif (z <= 5.4e-217)
		tmp = Float64(y * 4.0);
	elseif (z <= 3.6e-151)
		tmp = Float64(x * -3.0);
	elseif (z <= 1.1e-116)
		tmp = Float64(y * 4.0);
	elseif (z <= 4.4e-74)
		tmp = Float64(x * -3.0);
	elseif (z <= 0.5)
		tmp = Float64(y * 4.0);
	else
		tmp = t_1;
	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 <= -5.1e+197)
		tmp = t_0;
	elseif (z <= -1.05e+97)
		tmp = t_1;
	elseif (z <= -2.6e-11)
		tmp = t_0;
	elseif (z <= -9.5e-67)
		tmp = x * -3.0;
	elseif (z <= -1.75e-167)
		tmp = y * 4.0;
	elseif (z <= 2e-307)
		tmp = x * -3.0;
	elseif (z <= 5.4e-217)
		tmp = y * 4.0;
	elseif (z <= 3.6e-151)
		tmp = x * -3.0;
	elseif (z <= 1.1e-116)
		tmp = y * 4.0;
	elseif (z <= 4.4e-74)
		tmp = x * -3.0;
	elseif (z <= 0.5)
		tmp = y * 4.0;
	else
		tmp = t_1;
	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, -5.1e+197], t$95$0, If[LessEqual[z, -1.05e+97], t$95$1, If[LessEqual[z, -2.6e-11], t$95$0, If[LessEqual[z, -9.5e-67], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.75e-167], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.4e-217], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.6e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.1e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.4e-74], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], t$95$1]]]]]]]]]]]]]
\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 -5.1 \cdot 10^{+197}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq -1.05 \cdot 10^{+97}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-67}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-167}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 2 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{-217}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-74}:\\
\;\;\;\;x \cdot -3\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.09999999999999992e197 or -1.05000000000000006e97 < z < -2.6000000000000001e-11

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.5%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 69.7%

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

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

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

      \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
    10. Step-by-step derivation
      1. *-commutative61.8%

        \[\leadsto -6 \cdot \color{blue}{\left(z \cdot y\right)} \]
    11. Simplified61.8%

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

    if -5.09999999999999992e197 < z < -1.05000000000000006e97 or 0.5 < z

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg67.1%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in67.1%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval67.1%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-167.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*67.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative67.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+67.1%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval67.1%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*67.1%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval67.1%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative67.1%

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

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

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

    if -2.6000000000000001e-11 < z < -9.4999999999999994e-67 or -1.75e-167 < z < 1.99999999999999982e-307 or 5.40000000000000032e-217 < z < 3.60000000000000032e-151 or 1.10000000000000005e-116 < z < 4.40000000000000021e-74

    1. Initial program 99.2%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.2%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.2%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg71.4%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in71.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval71.4%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-171.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+71.4%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval71.4%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative71.4%

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

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

      \[\leadsto \color{blue}{-3 \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative70.8%

        \[\leadsto \color{blue}{x \cdot -3} \]
    9. Simplified70.8%

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

    if -9.4999999999999994e-67 < z < -1.75e-167 or 1.99999999999999982e-307 < z < 5.40000000000000032e-217 or 3.60000000000000032e-151 < z < 1.10000000000000005e-116 or 4.40000000000000021e-74 < z < 0.5

    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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.6%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 68.6%

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

        \[\leadsto \color{blue}{\left(6 \cdot y\right) \cdot \left(0.6666666666666666 - z\right)} \]
    8. Simplified68.9%

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

      \[\leadsto \color{blue}{4 \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative67.8%

        \[\leadsto \color{blue}{y \cdot 4} \]
    11. Simplified67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.1 \cdot 10^{+197}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+97}:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-67}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-167}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-307}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-217}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-74}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.5:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \end{array} \]

Alternative 3: 51.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -6 \cdot \left(y \cdot z\right)\\ t_1 := x \cdot \left(z \cdot 6\right)\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+198}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-66}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-167}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-307}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-222}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-115}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-69}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.66:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
   (if (<= z -3.3e+198)
     t_0
     (if (<= z -5.2e+97)
       t_1
       (if (<= z -2.6e-11)
         t_0
         (if (<= z -1.75e-66)
           (* x -3.0)
           (if (<= z -7.5e-167)
             (* y 4.0)
             (if (<= z 4.7e-307)
               (* x -3.0)
               (if (<= z 1.15e-222)
                 (* y 4.0)
                 (if (<= z 4e-151)
                   (* x -3.0)
                   (if (<= z 5.2e-115)
                     (* y 4.0)
                     (if (<= z 6.5e-69)
                       (* x -3.0)
                       (if (<= z 0.66) (* y 4.0) t_1)))))))))))))
double code(double x, double y, double z) {
	double t_0 = -6.0 * (y * z);
	double t_1 = x * (z * 6.0);
	double tmp;
	if (z <= -3.3e+198) {
		tmp = t_0;
	} else if (z <= -5.2e+97) {
		tmp = t_1;
	} else if (z <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= -1.75e-66) {
		tmp = x * -3.0;
	} else if (z <= -7.5e-167) {
		tmp = y * 4.0;
	} else if (z <= 4.7e-307) {
		tmp = x * -3.0;
	} else if (z <= 1.15e-222) {
		tmp = y * 4.0;
	} else if (z <= 4e-151) {
		tmp = x * -3.0;
	} else if (z <= 5.2e-115) {
		tmp = y * 4.0;
	} else if (z <= 6.5e-69) {
		tmp = x * -3.0;
	} else if (z <= 0.66) {
		tmp = y * 4.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (-6.0d0) * (y * z)
    t_1 = x * (z * 6.0d0)
    if (z <= (-3.3d+198)) then
        tmp = t_0
    else if (z <= (-5.2d+97)) then
        tmp = t_1
    else if (z <= (-2.6d-11)) then
        tmp = t_0
    else if (z <= (-1.75d-66)) then
        tmp = x * (-3.0d0)
    else if (z <= (-7.5d-167)) then
        tmp = y * 4.0d0
    else if (z <= 4.7d-307) then
        tmp = x * (-3.0d0)
    else if (z <= 1.15d-222) then
        tmp = y * 4.0d0
    else if (z <= 4d-151) then
        tmp = x * (-3.0d0)
    else if (z <= 5.2d-115) then
        tmp = y * 4.0d0
    else if (z <= 6.5d-69) then
        tmp = x * (-3.0d0)
    else if (z <= 0.66d0) then
        tmp = y * 4.0d0
    else
        tmp = t_1
    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 = x * (z * 6.0);
	double tmp;
	if (z <= -3.3e+198) {
		tmp = t_0;
	} else if (z <= -5.2e+97) {
		tmp = t_1;
	} else if (z <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= -1.75e-66) {
		tmp = x * -3.0;
	} else if (z <= -7.5e-167) {
		tmp = y * 4.0;
	} else if (z <= 4.7e-307) {
		tmp = x * -3.0;
	} else if (z <= 1.15e-222) {
		tmp = y * 4.0;
	} else if (z <= 4e-151) {
		tmp = x * -3.0;
	} else if (z <= 5.2e-115) {
		tmp = y * 4.0;
	} else if (z <= 6.5e-69) {
		tmp = x * -3.0;
	} else if (z <= 0.66) {
		tmp = y * 4.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = -6.0 * (y * z)
	t_1 = x * (z * 6.0)
	tmp = 0
	if z <= -3.3e+198:
		tmp = t_0
	elif z <= -5.2e+97:
		tmp = t_1
	elif z <= -2.6e-11:
		tmp = t_0
	elif z <= -1.75e-66:
		tmp = x * -3.0
	elif z <= -7.5e-167:
		tmp = y * 4.0
	elif z <= 4.7e-307:
		tmp = x * -3.0
	elif z <= 1.15e-222:
		tmp = y * 4.0
	elif z <= 4e-151:
		tmp = x * -3.0
	elif z <= 5.2e-115:
		tmp = y * 4.0
	elif z <= 6.5e-69:
		tmp = x * -3.0
	elif z <= 0.66:
		tmp = y * 4.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z)
	t_0 = Float64(-6.0 * Float64(y * z))
	t_1 = Float64(x * Float64(z * 6.0))
	tmp = 0.0
	if (z <= -3.3e+198)
		tmp = t_0;
	elseif (z <= -5.2e+97)
		tmp = t_1;
	elseif (z <= -2.6e-11)
		tmp = t_0;
	elseif (z <= -1.75e-66)
		tmp = Float64(x * -3.0);
	elseif (z <= -7.5e-167)
		tmp = Float64(y * 4.0);
	elseif (z <= 4.7e-307)
		tmp = Float64(x * -3.0);
	elseif (z <= 1.15e-222)
		tmp = Float64(y * 4.0);
	elseif (z <= 4e-151)
		tmp = Float64(x * -3.0);
	elseif (z <= 5.2e-115)
		tmp = Float64(y * 4.0);
	elseif (z <= 6.5e-69)
		tmp = Float64(x * -3.0);
	elseif (z <= 0.66)
		tmp = Float64(y * 4.0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = -6.0 * (y * z);
	t_1 = x * (z * 6.0);
	tmp = 0.0;
	if (z <= -3.3e+198)
		tmp = t_0;
	elseif (z <= -5.2e+97)
		tmp = t_1;
	elseif (z <= -2.6e-11)
		tmp = t_0;
	elseif (z <= -1.75e-66)
		tmp = x * -3.0;
	elseif (z <= -7.5e-167)
		tmp = y * 4.0;
	elseif (z <= 4.7e-307)
		tmp = x * -3.0;
	elseif (z <= 1.15e-222)
		tmp = y * 4.0;
	elseif (z <= 4e-151)
		tmp = x * -3.0;
	elseif (z <= 5.2e-115)
		tmp = y * 4.0;
	elseif (z <= 6.5e-69)
		tmp = x * -3.0;
	elseif (z <= 0.66)
		tmp = y * 4.0;
	else
		tmp = t_1;
	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[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+198], t$95$0, If[LessEqual[z, -5.2e+97], t$95$1, If[LessEqual[z, -2.6e-11], t$95$0, If[LessEqual[z, -1.75e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7.5e-167], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.7e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.15e-222], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.2e-115], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6.5e-69], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.66], N[(y * 4.0), $MachinePrecision], t$95$1]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5.2 \cdot 10^{+97}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-222}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-115}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-69}:\\
\;\;\;\;x \cdot -3\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.29999999999999994e198 or -5.2e97 < z < -2.6000000000000001e-11

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.5%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 69.7%

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

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

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

      \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
    10. Step-by-step derivation
      1. *-commutative61.8%

        \[\leadsto -6 \cdot \color{blue}{\left(z \cdot y\right)} \]
    11. Simplified61.8%

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

    if -3.29999999999999994e198 < z < -5.2e97 or 0.660000000000000031 < z

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg67.1%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in67.1%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval67.1%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-167.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*67.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative67.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+67.1%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval67.1%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*67.1%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval67.1%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative67.1%

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

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

      \[\leadsto \color{blue}{6 \cdot \left(x \cdot z\right)} \]
    8. Step-by-step derivation
      1. *-commutative67.0%

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

        \[\leadsto \color{blue}{x \cdot \left(z \cdot 6\right)} \]
    9. Simplified67.1%

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

    if -2.6000000000000001e-11 < z < -1.75e-66 or -7.5000000000000007e-167 < z < 4.69999999999999967e-307 or 1.1500000000000001e-222 < z < 3.9999999999999998e-151 or 5.20000000000000008e-115 < z < 6.49999999999999951e-69

    1. Initial program 99.2%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.2%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.2%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg71.4%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in71.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval71.4%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-171.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+71.4%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval71.4%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative71.4%

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

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

      \[\leadsto \color{blue}{-3 \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative70.8%

        \[\leadsto \color{blue}{x \cdot -3} \]
    9. Simplified70.8%

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

    if -1.75e-66 < z < -7.5000000000000007e-167 or 4.69999999999999967e-307 < z < 1.1500000000000001e-222 or 3.9999999999999998e-151 < z < 5.20000000000000008e-115 or 6.49999999999999951e-69 < z < 0.660000000000000031

    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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.6%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 68.6%

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

        \[\leadsto \color{blue}{\left(6 \cdot y\right) \cdot \left(0.6666666666666666 - z\right)} \]
    8. Simplified68.9%

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

      \[\leadsto \color{blue}{4 \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative67.8%

        \[\leadsto \color{blue}{y \cdot 4} \]
    11. Simplified67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+198}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+97}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-66}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-167}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-307}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-222}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-115}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-69}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.66:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \end{array} \]

Alternative 4: 50.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -6 \cdot \left(y \cdot z\right)\\ \mathbf{if}\;z \leq -1.95 \cdot 10^{+197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{+96}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-67}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-172}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-307}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-222}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 3.65 \cdot 10^{-116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-70}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.5:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* -6.0 (* y z))))
   (if (<= z -1.95e+197)
     t_0
     (if (<= z -1.85e+96)
       (* x (* z 6.0))
       (if (<= z -2.6e-11)
         t_0
         (if (<= z -4.8e-67)
           (* x -3.0)
           (if (<= z -5.4e-172)
             (* y 4.0)
             (if (<= z 1.6e-307)
               (* x -3.0)
               (if (<= z 2.3e-222)
                 (* y 4.0)
                 (if (<= z 3.8e-151)
                   (* x -3.0)
                   (if (<= z 3.65e-116)
                     (* y 4.0)
                     (if (<= z 5.2e-70)
                       (* x -3.0)
                       (if (<= z 0.5) (* y 4.0) (* z (* x 6.0)))))))))))))))
double code(double x, double y, double z) {
	double t_0 = -6.0 * (y * z);
	double tmp;
	if (z <= -1.95e+197) {
		tmp = t_0;
	} else if (z <= -1.85e+96) {
		tmp = x * (z * 6.0);
	} else if (z <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= -4.8e-67) {
		tmp = x * -3.0;
	} else if (z <= -5.4e-172) {
		tmp = y * 4.0;
	} else if (z <= 1.6e-307) {
		tmp = x * -3.0;
	} else if (z <= 2.3e-222) {
		tmp = y * 4.0;
	} else if (z <= 3.8e-151) {
		tmp = x * -3.0;
	} else if (z <= 3.65e-116) {
		tmp = y * 4.0;
	} else if (z <= 5.2e-70) {
		tmp = x * -3.0;
	} else if (z <= 0.5) {
		tmp = y * 4.0;
	} else {
		tmp = z * (x * 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) * (y * z)
    if (z <= (-1.95d+197)) then
        tmp = t_0
    else if (z <= (-1.85d+96)) then
        tmp = x * (z * 6.0d0)
    else if (z <= (-2.6d-11)) then
        tmp = t_0
    else if (z <= (-4.8d-67)) then
        tmp = x * (-3.0d0)
    else if (z <= (-5.4d-172)) then
        tmp = y * 4.0d0
    else if (z <= 1.6d-307) then
        tmp = x * (-3.0d0)
    else if (z <= 2.3d-222) then
        tmp = y * 4.0d0
    else if (z <= 3.8d-151) then
        tmp = x * (-3.0d0)
    else if (z <= 3.65d-116) then
        tmp = y * 4.0d0
    else if (z <= 5.2d-70) then
        tmp = x * (-3.0d0)
    else if (z <= 0.5d0) then
        tmp = y * 4.0d0
    else
        tmp = z * (x * 6.0d0)
    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 <= -1.95e+197) {
		tmp = t_0;
	} else if (z <= -1.85e+96) {
		tmp = x * (z * 6.0);
	} else if (z <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= -4.8e-67) {
		tmp = x * -3.0;
	} else if (z <= -5.4e-172) {
		tmp = y * 4.0;
	} else if (z <= 1.6e-307) {
		tmp = x * -3.0;
	} else if (z <= 2.3e-222) {
		tmp = y * 4.0;
	} else if (z <= 3.8e-151) {
		tmp = x * -3.0;
	} else if (z <= 3.65e-116) {
		tmp = y * 4.0;
	} else if (z <= 5.2e-70) {
		tmp = x * -3.0;
	} else if (z <= 0.5) {
		tmp = y * 4.0;
	} else {
		tmp = z * (x * 6.0);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = -6.0 * (y * z)
	tmp = 0
	if z <= -1.95e+197:
		tmp = t_0
	elif z <= -1.85e+96:
		tmp = x * (z * 6.0)
	elif z <= -2.6e-11:
		tmp = t_0
	elif z <= -4.8e-67:
		tmp = x * -3.0
	elif z <= -5.4e-172:
		tmp = y * 4.0
	elif z <= 1.6e-307:
		tmp = x * -3.0
	elif z <= 2.3e-222:
		tmp = y * 4.0
	elif z <= 3.8e-151:
		tmp = x * -3.0
	elif z <= 3.65e-116:
		tmp = y * 4.0
	elif z <= 5.2e-70:
		tmp = x * -3.0
	elif z <= 0.5:
		tmp = y * 4.0
	else:
		tmp = z * (x * 6.0)
	return tmp
function code(x, y, z)
	t_0 = Float64(-6.0 * Float64(y * z))
	tmp = 0.0
	if (z <= -1.95e+197)
		tmp = t_0;
	elseif (z <= -1.85e+96)
		tmp = Float64(x * Float64(z * 6.0));
	elseif (z <= -2.6e-11)
		tmp = t_0;
	elseif (z <= -4.8e-67)
		tmp = Float64(x * -3.0);
	elseif (z <= -5.4e-172)
		tmp = Float64(y * 4.0);
	elseif (z <= 1.6e-307)
		tmp = Float64(x * -3.0);
	elseif (z <= 2.3e-222)
		tmp = Float64(y * 4.0);
	elseif (z <= 3.8e-151)
		tmp = Float64(x * -3.0);
	elseif (z <= 3.65e-116)
		tmp = Float64(y * 4.0);
	elseif (z <= 5.2e-70)
		tmp = Float64(x * -3.0);
	elseif (z <= 0.5)
		tmp = Float64(y * 4.0);
	else
		tmp = Float64(z * Float64(x * 6.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = -6.0 * (y * z);
	tmp = 0.0;
	if (z <= -1.95e+197)
		tmp = t_0;
	elseif (z <= -1.85e+96)
		tmp = x * (z * 6.0);
	elseif (z <= -2.6e-11)
		tmp = t_0;
	elseif (z <= -4.8e-67)
		tmp = x * -3.0;
	elseif (z <= -5.4e-172)
		tmp = y * 4.0;
	elseif (z <= 1.6e-307)
		tmp = x * -3.0;
	elseif (z <= 2.3e-222)
		tmp = y * 4.0;
	elseif (z <= 3.8e-151)
		tmp = x * -3.0;
	elseif (z <= 3.65e-116)
		tmp = y * 4.0;
	elseif (z <= 5.2e-70)
		tmp = x * -3.0;
	elseif (z <= 0.5)
		tmp = y * 4.0;
	else
		tmp = z * (x * 6.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, -1.95e+197], t$95$0, If[LessEqual[z, -1.85e+96], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-11], t$95$0, If[LessEqual[z, -4.8e-67], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -5.4e-172], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.6e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.3e-222], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.8e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.65e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.2e-70], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-67}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq -5.4 \cdot 10^{-172}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-222}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 3.65 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-70}:\\
\;\;\;\;x \cdot -3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.95e197 or -1.84999999999999996e96 < z < -2.6000000000000001e-11

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.5%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 69.7%

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

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

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

      \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
    10. Step-by-step derivation
      1. *-commutative61.8%

        \[\leadsto -6 \cdot \color{blue}{\left(z \cdot y\right)} \]
    11. Simplified61.8%

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

    if -1.95e197 < z < -1.84999999999999996e96

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

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.5%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg69.9%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in69.9%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval69.9%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-169.9%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*69.9%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative69.9%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+69.9%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval69.9%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*69.9%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval69.9%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative69.9%

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

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

      \[\leadsto \color{blue}{6 \cdot \left(x \cdot z\right)} \]
    8. Step-by-step derivation
      1. *-commutative69.7%

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

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

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

    if -2.6000000000000001e-11 < z < -4.8e-67 or -5.40000000000000051e-172 < z < 1.60000000000000005e-307 or 2.3000000000000001e-222 < z < 3.7999999999999997e-151 or 3.6500000000000003e-116 < z < 5.20000000000000004e-70

    1. Initial program 99.2%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.2%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.2%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg71.4%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in71.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval71.4%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-171.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+71.4%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval71.4%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative71.4%

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

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

      \[\leadsto \color{blue}{-3 \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative70.8%

        \[\leadsto \color{blue}{x \cdot -3} \]
    9. Simplified70.8%

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

    if -4.8e-67 < z < -5.40000000000000051e-172 or 1.60000000000000005e-307 < z < 2.3000000000000001e-222 or 3.7999999999999997e-151 < z < 3.6500000000000003e-116 or 5.20000000000000004e-70 < z < 0.5

    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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.6%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 68.6%

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

        \[\leadsto \color{blue}{\left(6 \cdot y\right) \cdot \left(0.6666666666666666 - z\right)} \]
    8. Simplified68.9%

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

      \[\leadsto \color{blue}{4 \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative67.8%

        \[\leadsto \color{blue}{y \cdot 4} \]
    11. Simplified67.8%

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

    if 0.5 < z

    1. Initial program 99.8%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.8%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.8%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg66.1%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in66.1%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval66.1%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-166.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*66.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative66.1%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+66.1%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval66.1%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*66.1%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval66.1%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative66.1%

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

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

      \[\leadsto \color{blue}{6 \cdot \left(x \cdot z\right)} \]
    8. Step-by-step derivation
      1. *-commutative66.1%

        \[\leadsto 6 \cdot \color{blue}{\left(z \cdot x\right)} \]
      2. associate-*l*66.1%

        \[\leadsto \color{blue}{\left(6 \cdot z\right) \cdot x} \]
      3. *-commutative66.1%

        \[\leadsto \color{blue}{\left(z \cdot 6\right)} \cdot x \]
      4. associate-*l*66.3%

        \[\leadsto \color{blue}{z \cdot \left(6 \cdot x\right)} \]
    9. Simplified66.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+197}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{+96}:\\ \;\;\;\;x \cdot \left(z \cdot 6\right)\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-67}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-172}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-307}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-222}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 3.65 \cdot 10^{-116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-70}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.5:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \end{array} \]

Alternative 5: 74.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-69}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-178}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-306}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-219}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-68}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.6:\\ \;\;\;\;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 -2.6e-11)
     t_0
     (if (<= z -1.95e-69)
       (* x -3.0)
       (if (<= z -8e-178)
         (* y 4.0)
         (if (<= z 1.45e-306)
           (* x -3.0)
           (if (<= z 5.8e-219)
             (* y 4.0)
             (if (<= z 2.25e-151)
               (* x -3.0)
               (if (<= z 2.25e-116)
                 (* y 4.0)
                 (if (<= z 2.5e-68)
                   (* x -3.0)
                   (if (<= z 0.6) (* 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 <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= -1.95e-69) {
		tmp = x * -3.0;
	} else if (z <= -8e-178) {
		tmp = y * 4.0;
	} else if (z <= 1.45e-306) {
		tmp = x * -3.0;
	} else if (z <= 5.8e-219) {
		tmp = y * 4.0;
	} else if (z <= 2.25e-151) {
		tmp = x * -3.0;
	} else if (z <= 2.25e-116) {
		tmp = y * 4.0;
	} else if (z <= 2.5e-68) {
		tmp = x * -3.0;
	} else if (z <= 0.6) {
		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 <= (-2.6d-11)) then
        tmp = t_0
    else if (z <= (-1.95d-69)) then
        tmp = x * (-3.0d0)
    else if (z <= (-8d-178)) then
        tmp = y * 4.0d0
    else if (z <= 1.45d-306) then
        tmp = x * (-3.0d0)
    else if (z <= 5.8d-219) then
        tmp = y * 4.0d0
    else if (z <= 2.25d-151) then
        tmp = x * (-3.0d0)
    else if (z <= 2.25d-116) then
        tmp = y * 4.0d0
    else if (z <= 2.5d-68) then
        tmp = x * (-3.0d0)
    else if (z <= 0.6d0) 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 <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= -1.95e-69) {
		tmp = x * -3.0;
	} else if (z <= -8e-178) {
		tmp = y * 4.0;
	} else if (z <= 1.45e-306) {
		tmp = x * -3.0;
	} else if (z <= 5.8e-219) {
		tmp = y * 4.0;
	} else if (z <= 2.25e-151) {
		tmp = x * -3.0;
	} else if (z <= 2.25e-116) {
		tmp = y * 4.0;
	} else if (z <= 2.5e-68) {
		tmp = x * -3.0;
	} else if (z <= 0.6) {
		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 <= -2.6e-11:
		tmp = t_0
	elif z <= -1.95e-69:
		tmp = x * -3.0
	elif z <= -8e-178:
		tmp = y * 4.0
	elif z <= 1.45e-306:
		tmp = x * -3.0
	elif z <= 5.8e-219:
		tmp = y * 4.0
	elif z <= 2.25e-151:
		tmp = x * -3.0
	elif z <= 2.25e-116:
		tmp = y * 4.0
	elif z <= 2.5e-68:
		tmp = x * -3.0
	elif z <= 0.6:
		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 <= -2.6e-11)
		tmp = t_0;
	elseif (z <= -1.95e-69)
		tmp = Float64(x * -3.0);
	elseif (z <= -8e-178)
		tmp = Float64(y * 4.0);
	elseif (z <= 1.45e-306)
		tmp = Float64(x * -3.0);
	elseif (z <= 5.8e-219)
		tmp = Float64(y * 4.0);
	elseif (z <= 2.25e-151)
		tmp = Float64(x * -3.0);
	elseif (z <= 2.25e-116)
		tmp = Float64(y * 4.0);
	elseif (z <= 2.5e-68)
		tmp = Float64(x * -3.0);
	elseif (z <= 0.6)
		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 <= -2.6e-11)
		tmp = t_0;
	elseif (z <= -1.95e-69)
		tmp = x * -3.0;
	elseif (z <= -8e-178)
		tmp = y * 4.0;
	elseif (z <= 1.45e-306)
		tmp = x * -3.0;
	elseif (z <= 5.8e-219)
		tmp = y * 4.0;
	elseif (z <= 2.25e-151)
		tmp = x * -3.0;
	elseif (z <= 2.25e-116)
		tmp = y * 4.0;
	elseif (z <= 2.5e-68)
		tmp = x * -3.0;
	elseif (z <= 0.6)
		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, -2.6e-11], t$95$0, If[LessEqual[z, -1.95e-69], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -8e-178], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.45e-306], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.8e-219], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.25e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.25e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.5e-68], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.6], 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 -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-69}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq -8 \cdot 10^{-178}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-306}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-219}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 2.25 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 2.25 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-68}:\\
\;\;\;\;x \cdot -3\\

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

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.6000000000000001e-11 or 0.599999999999999978 < z

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.7%

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

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

    if -2.6000000000000001e-11 < z < -1.9499999999999999e-69 or -7.9999999999999996e-178 < z < 1.4499999999999999e-306 or 5.79999999999999968e-219 < z < 2.2500000000000001e-151 or 2.25000000000000006e-116 < z < 2.49999999999999986e-68

    1. Initial program 99.2%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.2%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.2%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg71.4%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in71.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval71.4%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-171.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+71.4%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval71.4%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative71.4%

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

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

      \[\leadsto \color{blue}{-3 \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative70.8%

        \[\leadsto \color{blue}{x \cdot -3} \]
    9. Simplified70.8%

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

    if -1.9499999999999999e-69 < z < -7.9999999999999996e-178 or 1.4499999999999999e-306 < z < 5.79999999999999968e-219 or 2.2500000000000001e-151 < z < 2.25000000000000006e-116 or 2.49999999999999986e-68 < z < 0.599999999999999978

    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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.6%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 68.6%

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

        \[\leadsto \color{blue}{\left(6 \cdot y\right) \cdot \left(0.6666666666666666 - z\right)} \]
    8. Simplified68.9%

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

      \[\leadsto \color{blue}{4 \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative67.8%

        \[\leadsto \color{blue}{y \cdot 4} \]
    11. Simplified67.8%

      \[\leadsto \color{blue}{y \cdot 4} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification83.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-69}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-178}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-306}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-219}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-68}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.6:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \end{array} \]

Alternative 6: 51.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -6 \cdot \left(y \cdot z\right)\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-67}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-173}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 10^{-306}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-220}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-115}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-64}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.048:\\ \;\;\;\;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.6e-11)
     t_0
     (if (<= z -1.16e-67)
       (* x -3.0)
       (if (<= z -5.5e-173)
         (* y 4.0)
         (if (<= z 1e-306)
           (* x -3.0)
           (if (<= z 1.05e-220)
             (* y 4.0)
             (if (<= z 7.5e-151)
               (* x -3.0)
               (if (<= z 2.55e-115)
                 (* y 4.0)
                 (if (<= z 2.1e-64)
                   (* x -3.0)
                   (if (<= z 0.048) (* 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.6e-11) {
		tmp = t_0;
	} else if (z <= -1.16e-67) {
		tmp = x * -3.0;
	} else if (z <= -5.5e-173) {
		tmp = y * 4.0;
	} else if (z <= 1e-306) {
		tmp = x * -3.0;
	} else if (z <= 1.05e-220) {
		tmp = y * 4.0;
	} else if (z <= 7.5e-151) {
		tmp = x * -3.0;
	} else if (z <= 2.55e-115) {
		tmp = y * 4.0;
	} else if (z <= 2.1e-64) {
		tmp = x * -3.0;
	} else if (z <= 0.048) {
		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.6d-11)) then
        tmp = t_0
    else if (z <= (-1.16d-67)) then
        tmp = x * (-3.0d0)
    else if (z <= (-5.5d-173)) then
        tmp = y * 4.0d0
    else if (z <= 1d-306) then
        tmp = x * (-3.0d0)
    else if (z <= 1.05d-220) then
        tmp = y * 4.0d0
    else if (z <= 7.5d-151) then
        tmp = x * (-3.0d0)
    else if (z <= 2.55d-115) then
        tmp = y * 4.0d0
    else if (z <= 2.1d-64) then
        tmp = x * (-3.0d0)
    else if (z <= 0.048d0) 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.6e-11) {
		tmp = t_0;
	} else if (z <= -1.16e-67) {
		tmp = x * -3.0;
	} else if (z <= -5.5e-173) {
		tmp = y * 4.0;
	} else if (z <= 1e-306) {
		tmp = x * -3.0;
	} else if (z <= 1.05e-220) {
		tmp = y * 4.0;
	} else if (z <= 7.5e-151) {
		tmp = x * -3.0;
	} else if (z <= 2.55e-115) {
		tmp = y * 4.0;
	} else if (z <= 2.1e-64) {
		tmp = x * -3.0;
	} else if (z <= 0.048) {
		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.6e-11:
		tmp = t_0
	elif z <= -1.16e-67:
		tmp = x * -3.0
	elif z <= -5.5e-173:
		tmp = y * 4.0
	elif z <= 1e-306:
		tmp = x * -3.0
	elif z <= 1.05e-220:
		tmp = y * 4.0
	elif z <= 7.5e-151:
		tmp = x * -3.0
	elif z <= 2.55e-115:
		tmp = y * 4.0
	elif z <= 2.1e-64:
		tmp = x * -3.0
	elif z <= 0.048:
		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.6e-11)
		tmp = t_0;
	elseif (z <= -1.16e-67)
		tmp = Float64(x * -3.0);
	elseif (z <= -5.5e-173)
		tmp = Float64(y * 4.0);
	elseif (z <= 1e-306)
		tmp = Float64(x * -3.0);
	elseif (z <= 1.05e-220)
		tmp = Float64(y * 4.0);
	elseif (z <= 7.5e-151)
		tmp = Float64(x * -3.0);
	elseif (z <= 2.55e-115)
		tmp = Float64(y * 4.0);
	elseif (z <= 2.1e-64)
		tmp = Float64(x * -3.0);
	elseif (z <= 0.048)
		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.6e-11)
		tmp = t_0;
	elseif (z <= -1.16e-67)
		tmp = x * -3.0;
	elseif (z <= -5.5e-173)
		tmp = y * 4.0;
	elseif (z <= 1e-306)
		tmp = x * -3.0;
	elseif (z <= 1.05e-220)
		tmp = y * 4.0;
	elseif (z <= 7.5e-151)
		tmp = x * -3.0;
	elseif (z <= 2.55e-115)
		tmp = y * 4.0;
	elseif (z <= 2.1e-64)
		tmp = x * -3.0;
	elseif (z <= 0.048)
		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.6e-11], t$95$0, If[LessEqual[z, -1.16e-67], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -5.5e-173], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1e-306], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.05e-220], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.5e-151], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.55e-115], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.1e-64], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.048], 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.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq -1.16 \cdot 10^{-67}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-173}:\\
\;\;\;\;y \cdot 4\\

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-220}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-151}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-115}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-64}:\\
\;\;\;\;x \cdot -3\\

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

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.6000000000000001e-11 or 0.048000000000000001 < z

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 51.5%

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

        \[\leadsto \color{blue}{\left(6 \cdot y\right) \cdot \left(0.6666666666666666 - z\right)} \]
    8. Simplified51.5%

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

      \[\leadsto \color{blue}{-6 \cdot \left(y \cdot z\right)} \]
    10. Step-by-step derivation
      1. *-commutative47.7%

        \[\leadsto -6 \cdot \color{blue}{\left(z \cdot y\right)} \]
    11. Simplified47.7%

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

    if -2.6000000000000001e-11 < z < -1.16e-67 or -5.50000000000000022e-173 < z < 1.00000000000000003e-306 or 1.04999999999999996e-220 < z < 7.5000000000000004e-151 or 2.5499999999999999e-115 < z < 2.10000000000000011e-64

    1. Initial program 99.2%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.2%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.2%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg71.4%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in71.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval71.4%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-171.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative71.4%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+71.4%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval71.4%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval71.4%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative71.4%

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

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

      \[\leadsto \color{blue}{-3 \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative70.8%

        \[\leadsto \color{blue}{x \cdot -3} \]
    9. Simplified70.8%

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

    if -1.16e-67 < z < -5.50000000000000022e-173 or 1.00000000000000003e-306 < z < 1.04999999999999996e-220 or 7.5000000000000004e-151 < z < 2.5499999999999999e-115 or 2.10000000000000011e-64 < z < 0.048000000000000001

    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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.6%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 69.8%

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

        \[\leadsto \color{blue}{\left(6 \cdot y\right) \cdot \left(0.6666666666666666 - z\right)} \]
    8. Simplified70.0%

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

      \[\leadsto \color{blue}{4 \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative69.0%

        \[\leadsto \color{blue}{y \cdot 4} \]
    11. Simplified69.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-67}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-173}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 10^{-306}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-220}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-151}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-115}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-64}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 0.048:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \end{array} \]

Alternative 7: 74.5% 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 -2.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-307}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-218}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-152}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-60}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 112000:\\ \;\;\;\;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 -2.6e-11)
     t_0
     (if (<= z 3.2e-307)
       (* x -3.0)
       (if (<= z 1.7e-218)
         (* y 4.0)
         (if (<= z 1.4e-152)
           (* x -3.0)
           (if (<= z 1.95e-116)
             (* y 4.0)
             (if (<= z 3.3e-60)
               (* x -3.0)
               (if (<= z 112000.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 <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= 3.2e-307) {
		tmp = x * -3.0;
	} else if (z <= 1.7e-218) {
		tmp = y * 4.0;
	} else if (z <= 1.4e-152) {
		tmp = x * -3.0;
	} else if (z <= 1.95e-116) {
		tmp = y * 4.0;
	} else if (z <= 3.3e-60) {
		tmp = x * -3.0;
	} else if (z <= 112000.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 <= (-2.6d-11)) then
        tmp = t_0
    else if (z <= 3.2d-307) then
        tmp = x * (-3.0d0)
    else if (z <= 1.7d-218) then
        tmp = y * 4.0d0
    else if (z <= 1.4d-152) then
        tmp = x * (-3.0d0)
    else if (z <= 1.95d-116) then
        tmp = y * 4.0d0
    else if (z <= 3.3d-60) then
        tmp = x * (-3.0d0)
    else if (z <= 112000.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 <= -2.6e-11) {
		tmp = t_0;
	} else if (z <= 3.2e-307) {
		tmp = x * -3.0;
	} else if (z <= 1.7e-218) {
		tmp = y * 4.0;
	} else if (z <= 1.4e-152) {
		tmp = x * -3.0;
	} else if (z <= 1.95e-116) {
		tmp = y * 4.0;
	} else if (z <= 3.3e-60) {
		tmp = x * -3.0;
	} else if (z <= 112000.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 <= -2.6e-11:
		tmp = t_0
	elif z <= 3.2e-307:
		tmp = x * -3.0
	elif z <= 1.7e-218:
		tmp = y * 4.0
	elif z <= 1.4e-152:
		tmp = x * -3.0
	elif z <= 1.95e-116:
		tmp = y * 4.0
	elif z <= 3.3e-60:
		tmp = x * -3.0
	elif z <= 112000.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 <= -2.6e-11)
		tmp = t_0;
	elseif (z <= 3.2e-307)
		tmp = Float64(x * -3.0);
	elseif (z <= 1.7e-218)
		tmp = Float64(y * 4.0);
	elseif (z <= 1.4e-152)
		tmp = Float64(x * -3.0);
	elseif (z <= 1.95e-116)
		tmp = Float64(y * 4.0);
	elseif (z <= 3.3e-60)
		tmp = Float64(x * -3.0);
	elseif (z <= 112000.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 <= -2.6e-11)
		tmp = t_0;
	elseif (z <= 3.2e-307)
		tmp = x * -3.0;
	elseif (z <= 1.7e-218)
		tmp = y * 4.0;
	elseif (z <= 1.4e-152)
		tmp = x * -3.0;
	elseif (z <= 1.95e-116)
		tmp = y * 4.0;
	elseif (z <= 3.3e-60)
		tmp = x * -3.0;
	elseif (z <= 112000.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, -2.6e-11], t$95$0, If[LessEqual[z, 3.2e-307], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.7e-218], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-152], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.95e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.3e-60], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 112000.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 -2.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-307}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-218}:\\
\;\;\;\;y \cdot 4\\

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

\mathbf{elif}\;z \leq 1.95 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-60}:\\
\;\;\;\;x \cdot -3\\

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

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.6000000000000001e-11 or 112000 < z

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.7%

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

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

    if -2.6000000000000001e-11 < z < 3.20000000000000011e-307 or 1.69999999999999993e-218 < z < 1.39999999999999992e-152 or 1.95e-116 < z < 3.2999999999999998e-60

    1. Initial program 99.3%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.3%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.3%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg64.5%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in64.5%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval64.5%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-164.5%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*64.5%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative64.5%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+64.6%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval64.6%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*64.6%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval64.6%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative64.6%

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

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

      \[\leadsto \color{blue}{-3 \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative64.0%

        \[\leadsto \color{blue}{x \cdot -3} \]
    9. Simplified64.0%

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

    if 3.20000000000000011e-307 < z < 1.69999999999999993e-218 or 1.39999999999999992e-152 < z < 1.95e-116

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

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 72.1%

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

        \[\leadsto \color{blue}{\left(6 \cdot y\right) \cdot \left(0.6666666666666666 - z\right)} \]
    8. Simplified72.3%

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

      \[\leadsto \color{blue}{4 \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative72.6%

        \[\leadsto \color{blue}{y \cdot 4} \]
    11. Simplified72.6%

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

    if 3.2999999999999998e-60 < z < 112000

    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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.3%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.5%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 63.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-307}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-218}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-152}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-60}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 112000:\\ \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \end{array} \]

Alternative 8: 75.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-74} \lor \neg \left(y \leq 2200000000000\right):\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.50000000000000052e-74 or 2.2e12 < y

    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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.6%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.8%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 76.9%

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

    if -8.50000000000000052e-74 < y < 2.2e12

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

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.5%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg84.9%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in84.9%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval84.9%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-184.9%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*84.9%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative84.9%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+84.9%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval84.9%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*84.9%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval84.9%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative84.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-74} \lor \neg \left(y \leq 2200000000000\right):\\ \;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\ \end{array} \]

Alternative 9: 75.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-73} \lor \neg \left(y \leq 2.65 \cdot 10^{-5}\right):\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.80000000000000012e-73 or 2.65e-5 < y

    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. +-commutative99.6%

        \[\leadsto \color{blue}{\left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) + x} \]
      2. associate-*l*99.8%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(\frac{2}{3} - z\right)\right)} + x \]
      3. fma-def99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, 6 \cdot \left(\frac{2}{3} - z\right), x\right)} \]
      4. sub-neg99.8%

        \[\leadsto \mathsf{fma}\left(y - x, 6 \cdot \color{blue}{\left(\frac{2}{3} + \left(-z\right)\right)}, x\right) \]
      5. distribute-rgt-in99.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{2}{3} \cdot 6 + \left(-z\right) \cdot 6}, x\right) \]
      6. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{0.6666666666666666} \cdot 6 + \left(-z\right) \cdot 6, x\right) \]
      7. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{4} + \left(-z\right) \cdot 6, x\right) \]
      8. distribute-lft-neg-out99.8%

        \[\leadsto \mathsf{fma}\left(y - x, 4 + \color{blue}{\left(-z \cdot 6\right)}, x\right) \]
      9. distribute-rgt-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(y - x, 4 + \color{blue}{z \cdot \left(-6\right)}, x\right) \]
      10. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(y - x, 4 + z \cdot \color{blue}{-6}, x\right) \]
    3. Simplified99.8%

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

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

    if -2.80000000000000012e-73 < y < 2.65e-5

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

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.5%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg85.5%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in85.5%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval85.5%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-185.5%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*85.5%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative85.5%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+85.5%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval85.5%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*85.5%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval85.5%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative85.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{-73} \lor \neg \left(y \leq 2.65 \cdot 10^{-5}\right):\\ \;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\ \end{array} \]

Alternative 10: 97.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.65\right):\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot 4\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -0.58) (not (<= z 0.65)))
   (* -6.0 (* (- y x) z))
   (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.58) || !(z <= 0.65)) {
		tmp = -6.0 * ((y - x) * z);
	} else {
		tmp = x + ((y - x) * 4.0);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-0.58d0)) .or. (.not. (z <= 0.65d0))) then
        tmp = (-6.0d0) * ((y - x) * z)
    else
        tmp = x + ((y - x) * 4.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.58) || !(z <= 0.65)) {
		tmp = -6.0 * ((y - x) * z);
	} else {
		tmp = x + ((y - x) * 4.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -0.58) or not (z <= 0.65):
		tmp = -6.0 * ((y - x) * z)
	else:
		tmp = x + ((y - x) * 4.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -0.58) || !(z <= 0.65))
		tmp = Float64(-6.0 * Float64(Float64(y - x) * z));
	else
		tmp = Float64(x + Float64(Float64(y - x) * 4.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -0.58) || ~((z <= 0.65)))
		tmp = -6.0 * ((y - x) * z);
	else
		tmp = x + ((y - x) * 4.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.65]], $MachinePrecision]], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.65\right):\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.57999999999999996 or 0.650000000000000022 < z

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.7%

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

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

    if -0.57999999999999996 < z < 0.650000000000000022

    1. Initial program 99.4%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.4%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.65\right):\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - x\right) \cdot 4\\ \end{array} \]

Alternative 11: 97.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.58\right):\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot -3 + y \cdot 4\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -0.58) (not (<= z 0.58)))
   (* -6.0 (* (- y x) z))
   (+ (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.58) || !(z <= 0.58)) {
		tmp = -6.0 * ((y - x) * z);
	} else {
		tmp = (x * -3.0) + (y * 4.0);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-0.58d0)) .or. (.not. (z <= 0.58d0))) then
        tmp = (-6.0d0) * ((y - x) * z)
    else
        tmp = (x * (-3.0d0)) + (y * 4.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -0.58) || !(z <= 0.58)) {
		tmp = -6.0 * ((y - x) * z);
	} else {
		tmp = (x * -3.0) + (y * 4.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -0.58) or not (z <= 0.58):
		tmp = -6.0 * ((y - x) * z)
	else:
		tmp = (x * -3.0) + (y * 4.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -0.58) || !(z <= 0.58))
		tmp = Float64(-6.0 * Float64(Float64(y - x) * z));
	else
		tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -0.58) || ~((z <= 0.58)))
		tmp = -6.0 * ((y - x) * z);
	else
		tmp = (x * -3.0) + (y * 4.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.58]], $MachinePrecision]], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.58\right):\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\


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

    1. Initial program 99.7%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.7%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.7%

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

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

    if -0.57999999999999996 < z < 0.57999999999999996

    1. Initial program 99.4%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.4%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.58\right):\\ \;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot -3 + y \cdot 4\\ \end{array} \]

Alternative 12: 99.5% accurate, 1.2× speedup?

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

\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - 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. Step-by-step derivation
    1. metadata-eval99.6%

      \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
  4. Final simplification99.6%

    \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]

Alternative 13: 36.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9.6 \cdot 10^{+27}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;x \cdot -3\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -9.6e+27) (* x -3.0) (if (<= x 1.9e+116) (* y 4.0) (* x -3.0))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -9.6e+27) {
		tmp = x * -3.0;
	} else if (x <= 1.9e+116) {
		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 <= (-9.6d+27)) then
        tmp = x * (-3.0d0)
    else if (x <= 1.9d+116) 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 <= -9.6e+27) {
		tmp = x * -3.0;
	} else if (x <= 1.9e+116) {
		tmp = y * 4.0;
	} else {
		tmp = x * -3.0;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -9.6e+27:
		tmp = x * -3.0
	elif x <= 1.9e+116:
		tmp = y * 4.0
	else:
		tmp = x * -3.0
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -9.6e+27)
		tmp = Float64(x * -3.0);
	elseif (x <= 1.9e+116)
		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 <= -9.6e+27)
		tmp = x * -3.0;
	elseif (x <= 1.9e+116)
		tmp = y * 4.0;
	else
		tmp = x * -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -9.6e+27], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, 1.9e+116], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{+27}:\\
\;\;\;\;x \cdot -3\\

\mathbf{elif}\;x \leq 1.9 \cdot 10^{+116}:\\
\;\;\;\;y \cdot 4\\

\mathbf{else}:\\
\;\;\;\;x \cdot -3\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.59999999999999991e27 or 1.8999999999999999e116 < 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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
    5. Step-by-step derivation
      1. sub-neg83.3%

        \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
      2. distribute-rgt-in83.3%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
      3. metadata-eval83.3%

        \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
      4. neg-mul-183.3%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
      5. associate-*r*83.3%

        \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
      6. *-commutative83.3%

        \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
      7. associate-+r+83.3%

        \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
      8. metadata-eval83.3%

        \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
      9. associate-*r*83.3%

        \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
      10. metadata-eval83.3%

        \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
      11. *-commutative83.3%

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

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

      \[\leadsto \color{blue}{-3 \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative43.1%

        \[\leadsto \color{blue}{x \cdot -3} \]
    9. Simplified43.1%

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

    if -9.59999999999999991e27 < x < 1.8999999999999999e116

    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. metadata-eval99.6%

        \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt99.5%

        \[\leadsto \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}} + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right) \]
      2. fma-def99.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right)} \]
      3. pow299.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}, \sqrt[3]{x}, \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)\right) \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \color{blue}{\left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)}\right) \]
    5. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x}\right)}^{2}, \sqrt[3]{x}, \left(y - x\right) \cdot \left(6 \cdot \left(0.6666666666666666 - z\right)\right)\right)} \]
    6. Taylor expanded in x around 0 68.6%

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

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

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

      \[\leadsto \color{blue}{4 \cdot y} \]
    10. Step-by-step derivation
      1. *-commutative37.9%

        \[\leadsto \color{blue}{y \cdot 4} \]
    11. Simplified37.9%

      \[\leadsto \color{blue}{y \cdot 4} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.6 \cdot 10^{+27}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+116}:\\ \;\;\;\;y \cdot 4\\ \mathbf{else}:\\ \;\;\;\;x \cdot -3\\ \end{array} \]

Alternative 14: 25.5% accurate, 4.3× speedup?

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

\\
x \cdot -3
\end{array}
Derivation
  1. Initial program 99.6%

    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
  2. Step-by-step derivation
    1. metadata-eval99.6%

      \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\color{blue}{0.6666666666666666} - z\right) \]
  3. Simplified99.6%

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

    \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right)} \]
  5. Step-by-step derivation
    1. sub-neg54.7%

      \[\leadsto x \cdot \left(1 + -6 \cdot \color{blue}{\left(0.6666666666666666 + \left(-z\right)\right)}\right) \]
    2. distribute-rgt-in54.7%

      \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.6666666666666666 \cdot -6 + \left(-z\right) \cdot -6\right)}\right) \]
    3. metadata-eval54.7%

      \[\leadsto x \cdot \left(1 + \left(\color{blue}{-4} + \left(-z\right) \cdot -6\right)\right) \]
    4. neg-mul-154.7%

      \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{\left(-1 \cdot z\right)} \cdot -6\right)\right) \]
    5. associate-*r*54.7%

      \[\leadsto x \cdot \left(1 + \left(-4 + \color{blue}{-1 \cdot \left(z \cdot -6\right)}\right)\right) \]
    6. *-commutative54.7%

      \[\leadsto x \cdot \left(1 + \left(-4 + -1 \cdot \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
    7. associate-+r+54.7%

      \[\leadsto x \cdot \color{blue}{\left(\left(1 + -4\right) + -1 \cdot \left(-6 \cdot z\right)\right)} \]
    8. metadata-eval54.7%

      \[\leadsto x \cdot \left(\color{blue}{-3} + -1 \cdot \left(-6 \cdot z\right)\right) \]
    9. associate-*r*54.7%

      \[\leadsto x \cdot \left(-3 + \color{blue}{\left(-1 \cdot -6\right) \cdot z}\right) \]
    10. metadata-eval54.7%

      \[\leadsto x \cdot \left(-3 + \color{blue}{6} \cdot z\right) \]
    11. *-commutative54.7%

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

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

    \[\leadsto \color{blue}{-3 \cdot x} \]
  8. Step-by-step derivation
    1. *-commutative26.4%

      \[\leadsto \color{blue}{x \cdot -3} \]
  9. Simplified26.4%

    \[\leadsto \color{blue}{x \cdot -3} \]
  10. Final simplification26.4%

    \[\leadsto x \cdot -3 \]

Reproduce

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