Average Error: 6.3 → 1.6
Time: 47.6s
Precision: binary64
Cost: 8780
\[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
\[\begin{array}{l} t_1 := x \cdot y + z \cdot t\\ t_2 := \left(a + b \cdot c\right) \cdot c\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;2 \cdot \left(t_1 - \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + \left(c \cdot i\right) \cdot a\right)\right)\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+185}:\\ \;\;\;\;2 \cdot \left(\mathsf{fma}\left(z, t, x \cdot y\right) - t_2 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - \begin{array}{l} \mathbf{if}\;i \cdot a \ne 0:\\ \;\;\;\;\frac{c}{\frac{1}{\left(\left(c \cdot i\right) \cdot b\right) \cdot 1 + \left(i \cdot a\right) \cdot 1}}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(c, b, a\right) \cdot c\right) \cdot i\\ \end{array}\right)\\ \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* x y) (* z t))) (t_2 (* (+ a (* b c)) c)))
   (if (<= t_2 (- INFINITY))
     (* 2.0 (- t_1 (+ (* (* c i) (* b c)) (* (* c i) a))))
     (if (<= t_2 5e+185)
       (* 2.0 (- (fma z t (* x y)) (* t_2 i)))
       (*
        2.0
        (-
         t_1
         (if (!= (* i a) 0.0)
           (/ c (/ 1.0 (+ (* (* (* c i) b) 1.0) (* (* i a) 1.0))))
           (* (* (fma c b a) c) i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (x * y) + (z * t);
	double t_2 = (a + (b * c)) * c;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = 2.0 * (t_1 - (((c * i) * (b * c)) + ((c * i) * a)));
	} else if (t_2 <= 5e+185) {
		tmp = 2.0 * (fma(z, t, (x * y)) - (t_2 * i));
	} else {
		double tmp_1;
		if ((i * a) != 0.0) {
			tmp_1 = c / (1.0 / ((((c * i) * b) * 1.0) + ((i * a) * 1.0)));
		} else {
			tmp_1 = (fma(c, b, a) * c) * i;
		}
		tmp = 2.0 * (t_1 - tmp_1);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i)))
end
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * y) + Float64(z * t))
	t_2 = Float64(Float64(a + Float64(b * c)) * c)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(2.0 * Float64(t_1 - Float64(Float64(Float64(c * i) * Float64(b * c)) + Float64(Float64(c * i) * a))));
	elseif (t_2 <= 5e+185)
		tmp = Float64(2.0 * Float64(fma(z, t, Float64(x * y)) - Float64(t_2 * i)));
	else
		tmp_1 = 0.0
		if (Float64(i * a) != 0.0)
			tmp_1 = Float64(c / Float64(1.0 / Float64(Float64(Float64(Float64(c * i) * b) * 1.0) + Float64(Float64(i * a) * 1.0))));
		else
			tmp_1 = Float64(Float64(fma(c, b, a) * c) * i);
		end
		tmp = Float64(2.0 * Float64(t_1 - tmp_1));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(t$95$1 - N[(N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision] + N[(N[(c * i), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+185], N[(2.0 * N[(N[(z * t + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - If[Unequal[N[(i * a), $MachinePrecision], 0.0], N[(c / N[(1.0 / N[(N[(N[(N[(c * i), $MachinePrecision] * b), $MachinePrecision] * 1.0), $MachinePrecision] + N[(N[(i * a), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(c * b + a), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]]]]]
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
t_2 := \left(a + b \cdot c\right) \cdot c\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(t_1 - \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + \left(c \cdot i\right) \cdot a\right)\right)\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+185}:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(z, t, x \cdot y\right) - t_2 \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 - \begin{array}{l}
\mathbf{if}\;i \cdot a \ne 0:\\
\;\;\;\;\frac{c}{\frac{1}{\left(\left(c \cdot i\right) \cdot b\right) \cdot 1 + \left(i \cdot a\right) \cdot 1}}\\

\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(c, b, a\right) \cdot c\right) \cdot i\\


\end{array}\right)\\


\end{array}

Error

Target

Original6.3
Target1.6
Herbie1.6
\[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]

Derivation

  1. Split input into 3 regimes
  2. if (*.f64 (+.f64 a (*.f64 b c)) c) < -inf.0

    1. Initial program 64.0

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Applied egg-rr9.0

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + \left(c \cdot i\right) \cdot a\right)}\right) \]

    if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 4.9999999999999999e185

    1. Initial program 0.3

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Applied egg-rr0.3

      \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(z, t, x \cdot y\right)} - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]

    if 4.9999999999999999e185 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 28.3

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Applied egg-rr28.7

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(c, b, a\right)}\right)}^{3}} \cdot c\right) \cdot i\right) \]
    3. Applied egg-rr5.3

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;i \cdot \mathsf{fma}\left(c, b, a\right) \ne 0:\\ \;\;\;\;\frac{c}{\frac{1}{i \cdot \mathsf{fma}\left(c, b, a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(c, b, a\right) \cdot c\right) \cdot i\\ } \end{array}}\right) \]
    4. Taylor expanded in c around 0 10.5

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \begin{array}{l} \mathbf{if}\;\color{blue}{i \cdot a} \ne 0:\\ \;\;\;\;\frac{c}{\frac{1}{i \cdot \mathsf{fma}\left(c, b, a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(c, b, a\right) \cdot c\right) \cdot i\\ \end{array}\right) \]
    5. Applied egg-rr8.3

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \begin{array}{l} \mathbf{if}\;i \cdot a \ne 0:\\ \;\;\;\;\frac{c}{\frac{1}{\color{blue}{\left(\left(c \cdot i\right) \cdot b\right) \cdot 1 + \left(i \cdot a\right) \cdot 1}}}\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(c, b, a\right) \cdot c\right) \cdot i\\ \end{array}\right) \]
  3. Recombined 3 regimes into one program.

Alternatives

Alternative 1
Error1.1
Cost8520
\[\begin{array}{l} t_1 := 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + \left(c \cdot i\right) \cdot a\right)\right)\\ t_2 := \left(a + b \cdot c\right) \cdot c\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+274}:\\ \;\;\;\;2 \cdot \left(\mathsf{fma}\left(z, t, x \cdot y\right) - t_2 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error11.8
Cost4824
\[\begin{array}{l} t_1 := -2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ t_3 := 2 \cdot \left(t \cdot z - t_2\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{+220}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{+100}:\\ \;\;\;\;2 \cdot \left(y \cdot x - \left(c \cdot a\right) \cdot i\right)\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{+41}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 10^{+112}:\\ \;\;\;\;2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+283}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error7.6
Cost3664
\[\begin{array}{l} t_1 := c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\\ t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ t_3 := 2 \cdot \left(t \cdot z - t_2\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;-2 \cdot t_1\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{+220}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+149}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot a\right) \cdot i\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+283}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(y \cdot x + -1 \cdot t_1\right)\\ \end{array} \]
Alternative 4
Error8.1
Cost3536
\[\begin{array}{l} t_1 := -2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ t_3 := 2 \cdot \left(t \cdot z - t_2\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{+156}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 10^{+112}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - c \cdot \left(i \cdot a\right)\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+283}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error7.9
Cost3536
\[\begin{array}{l} t_1 := -2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ t_3 := 2 \cdot \left(t \cdot z - t_2\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{+220}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+149}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot a\right) \cdot i\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+283}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error1.2
Cost2504
\[\begin{array}{l} t_1 := x \cdot y + z \cdot t\\ t_2 := 2 \cdot \left(t_1 - \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + \left(c \cdot i\right) \cdot a\right)\right)\\ t_3 := \left(a + b \cdot c\right) \cdot c\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 10^{+274}:\\ \;\;\;\;2 \cdot \left(t_1 - t_3 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error24.8
Cost2288
\[\begin{array}{l} t_1 := -2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ t_2 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ t_3 := 2 \cdot \left(t \cdot z - c \cdot \left(a \cdot i\right)\right)\\ t_4 := \left(c \cdot a\right) \cdot i\\ t_5 := 2 \cdot \left(y \cdot x - t_4\right)\\ \mathbf{if}\;c \leq -6.5 \cdot 10^{+155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -3 \cdot 10^{+72}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -4.35 \cdot 10^{-35}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq -2.6 \cdot 10^{-119}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.6 \cdot 10^{-134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.22 \cdot 10^{-142}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq -3.8 \cdot 10^{-201}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.05 \cdot 10^{-239}:\\ \;\;\;\;2 \cdot \left(t \cdot z - t_4\right)\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{-157}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 3.8 \cdot 10^{-39}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{+106}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{+241}:\\ \;\;\;\;\left(c \cdot \left(i \cdot b\right)\right) \cdot \left(-2 \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error23.2
Cost2284
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x - \left(c \cdot i\right) \cdot a\right)\\ t_2 := \left(c \cdot a\right) \cdot i\\ t_3 := 2 \cdot \left(t \cdot z - c \cdot \left(a \cdot i\right)\right)\\ t_4 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{if}\;c \leq -5.2 \cdot 10^{+155}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ \mathbf{elif}\;c \leq -6.2 \cdot 10^{+62}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -3.6 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -3.8 \cdot 10^{-201}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -1.05 \cdot 10^{-239}:\\ \;\;\;\;2 \cdot \left(t \cdot z - t_2\right)\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{-157}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{-38}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{elif}\;c \leq 10^{+101}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 5.6 \cdot 10^{+132}:\\ \;\;\;\;2 \cdot \left(\left(-\left(i \cdot b\right) \cdot \left(c \cdot c\right)\right) + y \cdot x\right)\\ \mathbf{elif}\;c \leq 5.7 \cdot 10^{+140}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 3.8 \cdot 10^{+251}:\\ \;\;\;\;2 \cdot \left(t \cdot z - c \cdot \left(\left(c \cdot i\right) \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error23.1
Cost2020
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x - \left(c \cdot i\right) \cdot a\right)\\ t_2 := \left(c \cdot a\right) \cdot i\\ t_3 := 2 \cdot \left(t \cdot z - c \cdot \left(a \cdot i\right)\right)\\ t_4 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{if}\;c \leq -3.1 \cdot 10^{+156}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.26 \cdot 10^{+62}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -3.6 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -3.8 \cdot 10^{-201}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -1.05 \cdot 10^{-239}:\\ \;\;\;\;2 \cdot \left(t \cdot z - t_2\right)\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{-157}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 4.5 \cdot 10^{-39}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{+103}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{+256}:\\ \;\;\;\;2 \cdot \left(t \cdot z - c \cdot \left(\left(c \cdot i\right) \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error23.8
Cost1892
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x - \left(c \cdot i\right) \cdot a\right)\\ t_2 := \left(c \cdot a\right) \cdot i\\ t_3 := 2 \cdot \left(t \cdot z - c \cdot \left(a \cdot i\right)\right)\\ t_4 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{if}\;c \leq -7.2 \cdot 10^{+157}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ \mathbf{elif}\;c \leq -2.4 \cdot 10^{+59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -3.9 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -3.8 \cdot 10^{-201}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -1.05 \cdot 10^{-239}:\\ \;\;\;\;2 \cdot \left(t \cdot z - t_2\right)\\ \mathbf{elif}\;c \leq 1.85 \cdot 10^{-157}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{-38}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{+104}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{+243}:\\ \;\;\;\;\left(c \cdot \left(i \cdot b\right)\right) \cdot \left(-2 \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error22.3
Cost1760
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ t_2 := 2 \cdot \left(t \cdot z - c \cdot \left(a \cdot i\right)\right)\\ t_3 := -2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ \mathbf{if}\;c \leq -2.5 \cdot 10^{+158}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -8.4 \cdot 10^{+80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2.1 \cdot 10^{+17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -4.5 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.05 \cdot 10^{-239}:\\ \;\;\;\;2 \cdot \left(t \cdot z - \left(c \cdot a\right) \cdot i\right)\\ \mathbf{elif}\;c \leq 2.2 \cdot 10^{-38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+102}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{+242}:\\ \;\;\;\;\left(c \cdot \left(i \cdot b\right)\right) \cdot \left(-2 \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error4.7
Cost1748
\[\begin{array}{l} t_1 := x \cdot y + z \cdot t\\ t_2 := c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\\ t_3 := 2 \cdot \left(y \cdot x + -1 \cdot t_2\right)\\ \mathbf{if}\;c \leq -9 \cdot 10^{+157}:\\ \;\;\;\;-2 \cdot t_2\\ \mathbf{elif}\;c \leq -1.75 \cdot 10^{+80}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(i \cdot a\right)\right)\\ \mathbf{elif}\;c \leq -1.3 \cdot 10^{+36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{+101}:\\ \;\;\;\;2 \cdot \left(t_1 - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)\\ \mathbf{elif}\;c \leq 4.4 \cdot 10^{+228}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(\left(c \cdot i\right) \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 13
Error42.7
Cost1636
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(t \cdot z\right)\\ t_3 := -2 \cdot \left(c \cdot \left(i \cdot a\right)\right)\\ \mathbf{if}\;c \leq -3.2 \cdot 10^{+59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -4.1 \cdot 10^{-181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -8.5 \cdot 10^{-281}:\\ \;\;\;\;\left(z + z\right) \cdot t\\ \mathbf{elif}\;c \leq 3 \cdot 10^{-302}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 9.5 \cdot 10^{-215}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 5.4 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5000000000000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5 \cdot 10^{+257}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 14
Error21.1
Cost1496
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ t_2 := -2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ \mathbf{if}\;c \leq -6.5 \cdot 10^{+141}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 2.15 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{+26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 10^{+91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.8 \cdot 10^{+129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 3.1 \cdot 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error21.4
Cost1496
\[\begin{array}{l} t_1 := 2 \cdot \left(t \cdot z - c \cdot \left(a \cdot i\right)\right)\\ t_2 := -2 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\\ \mathbf{if}\;c \leq -5.6 \cdot 10^{+155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2.55 \cdot 10^{+81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.95 \cdot 10^{+17}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{-38}:\\ \;\;\;\;2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{+104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 6 \cdot 10^{+241}:\\ \;\;\;\;\left(c \cdot \left(i \cdot b\right)\right) \cdot \left(-2 \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error38.1
Cost1244
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(-\left(c \cdot i\right) \cdot a\right)\\ t_3 := 2 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;t \leq -9.5 \cdot 10^{-80}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-240}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-136}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+15}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+20}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+35}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 17
Error23.2
Cost1104
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ t_2 := 2 \cdot \left(-\left(c \cdot i\right) \cdot a\right)\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{+183}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+197}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+262}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot a\right)\right)\\ \end{array} \]
Alternative 18
Error35.0
Cost584
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{-76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-60}:\\ \;\;\;\;2 \cdot \left(t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error35.0
Cost584
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ \mathbf{if}\;y \leq -4.5 \cdot 10^{-76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-60}:\\ \;\;\;\;\left(z + z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 20
Error42.2
Cost320
\[2 \cdot \left(t \cdot z\right) \]

Error

Reproduce

herbie shell --seed 2023010 
(FPCore (x y z t a b c i)
  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
  :precision binary64

  :herbie-target
  (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))

  (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))