Average Error: 6.1 → 2.0
Time: 26.5s
Precision: binary64
Cost: 2504
\[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 := z \cdot t + x \cdot y\\ t_2 := a + b \cdot c\\ t_3 := \left(c \cdot t_2\right) \cdot i\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{-80}:\\ \;\;\;\;2 \cdot \left(t_1 - t_3\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - t_2 \cdot \left(c \cdot i\right)\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 (+ (* z t) (* x y))) (t_2 (+ a (* b c))) (t_3 (* (* c t_2) i)))
   (if (<= t_3 (- INFINITY))
     (* 2.0 (- t_1 (* c (* c (* b i)))))
     (if (<= t_3 2e-80) (* 2.0 (- t_1 t_3)) (* 2.0 (- t_1 (* t_2 (* 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 = (z * t) + (x * y);
	double t_2 = a + (b * c);
	double t_3 = (c * t_2) * i;
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = 2.0 * (t_1 - (c * (c * (b * i))));
	} else if (t_3 <= 2e-80) {
		tmp = 2.0 * (t_1 - t_3);
	} else {
		tmp = 2.0 * (t_1 - (t_2 * (c * i)));
	}
	return tmp;
}
public static 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));
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (z * t) + (x * y);
	double t_2 = a + (b * c);
	double t_3 = (c * t_2) * i;
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = 2.0 * (t_1 - (c * (c * (b * i))));
	} else if (t_3 <= 2e-80) {
		tmp = 2.0 * (t_1 - t_3);
	} else {
		tmp = 2.0 * (t_1 - (t_2 * (c * i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
def code(x, y, z, t, a, b, c, i):
	t_1 = (z * t) + (x * y)
	t_2 = a + (b * c)
	t_3 = (c * t_2) * i
	tmp = 0
	if t_3 <= -math.inf:
		tmp = 2.0 * (t_1 - (c * (c * (b * i))))
	elif t_3 <= 2e-80:
		tmp = 2.0 * (t_1 - t_3)
	else:
		tmp = 2.0 * (t_1 - (t_2 * (c * i)))
	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(z * t) + Float64(x * y))
	t_2 = Float64(a + Float64(b * c))
	t_3 = Float64(Float64(c * t_2) * i)
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = Float64(2.0 * Float64(t_1 - Float64(c * Float64(c * Float64(b * i)))));
	elseif (t_3 <= 2e-80)
		tmp = Float64(2.0 * Float64(t_1 - t_3));
	else
		tmp = Float64(2.0 * Float64(t_1 - Float64(t_2 * Float64(c * i))));
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (z * t) + (x * y);
	t_2 = a + (b * c);
	t_3 = (c * t_2) * i;
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = 2.0 * (t_1 - (c * (c * (b * i))));
	elseif (t_3 <= 2e-80)
		tmp = 2.0 * (t_1 - t_3);
	else
		tmp = 2.0 * (t_1 - (t_2 * (c * i)));
	end
	tmp_2 = 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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * t$95$2), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(2.0 * N[(t$95$1 - N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e-80], N[(2.0 * N[(t$95$1 - t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(t$95$2 * N[(c * i), $MachinePrecision]), $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 := z \cdot t + x \cdot y\\
t_2 := a + b \cdot c\\
t_3 := \left(c \cdot t_2\right) \cdot i\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-80}:\\
\;\;\;\;2 \cdot \left(t_1 - t_3\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 - t_2 \cdot \left(c \cdot i\right)\right)\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original6.1
Target1.8
Herbie2.0
\[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 (+.f64 a (*.f64 b c)) c) i) < -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. Taylor expanded in a around 0 43.4

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{{c}^{2} \cdot \left(i \cdot b\right)}\right) \]
    3. Simplified21.7

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{c \cdot \left(c \cdot \left(i \cdot b\right)\right)}\right) \]
      Proof
      (*.f64 c (*.f64 c (*.f64 i b))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 c c) (*.f64 i b))): 48 points increase in error, 37 points decrease in error
      (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (*.f64 i b)): 0 points increase in error, 0 points decrease in error

    if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.99999999999999992e-80

    1. Initial program 0.4

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]

    if 1.99999999999999992e-80 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 10.5

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

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]
      Proof
      (*.f64 2 (-.f64 (fma.f64 x y (*.f64 z t)) (*.f64 (+.f64 a (*.f64 b c)) (*.f64 c i)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (-.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 x y) (*.f64 z t))) (*.f64 (+.f64 a (*.f64 b c)) (*.f64 c i)))): 2 points increase in error, 0 points decrease in error
      (*.f64 2 (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)))): 34 points increase in error, 6 points decrease in error
    3. Applied egg-rr2.9

      \[\leadsto 2 \cdot \left(\color{blue}{\left(z \cdot t + x \cdot y\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification2.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq -\infty:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;\left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq 2 \cdot 10^{-80}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error13.9
Cost5604
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ t_2 := a + b \cdot c\\ t_3 := 2 \cdot \left(x \cdot y - t_2 \cdot \left(c \cdot i\right)\right)\\ t_4 := c \cdot t_2\\ t_5 := t_4 \cdot i\\ t_6 := 2 \cdot \left(z \cdot t - t_5\right)\\ t_7 := 2 \cdot \left(x \cdot y - t_5\right)\\ \mathbf{if}\;t_4 \leq -2 \cdot 10^{+68}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_4 \leq -1000:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t_4 \leq -2 \cdot 10^{-52}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_4 \leq -1 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_4 \leq -2 \cdot 10^{-109}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;t_4 \leq 5 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_4 \leq 5 \cdot 10^{-20}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{+82}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t_4 \leq 10^{+189}:\\ \;\;\;\;t_7\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(t_2 \cdot i\right)\right)\\ \end{array} \]
Alternative 2
Error10.2
Cost3536
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := \left(c \cdot t_1\right) \cdot i\\ t_3 := 2 \cdot \left(z \cdot t - t_2\right)\\ \mathbf{if}\;t_2 \leq -4 \cdot 10^{+287}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-10}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 4000000000000:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+286}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(t_1 \cdot i\right)\right)\\ \end{array} \]
Alternative 3
Error10.1
Cost3536
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := \left(c \cdot t_1\right) \cdot i\\ \mathbf{if}\;t_2 \leq -4 \cdot 10^{+287}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{-20}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_2\right)\\ \mathbf{elif}\;t_2 \leq 4000000000000:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+286}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_2\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(t_1 \cdot i\right)\right)\\ \end{array} \]
Alternative 4
Error7.7
Cost2892
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := 2 \cdot \left(x \cdot y - t_1 \cdot \left(c \cdot i\right)\right)\\ t_3 := \left(c \cdot t_1\right) \cdot i\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_3 \leq -5 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 5 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error7.5
Cost2892
\[\begin{array}{l} t_1 := z \cdot t + x \cdot y\\ t_2 := a + b \cdot c\\ t_3 := 2 \cdot \left(x \cdot y - t_2 \cdot \left(c \cdot i\right)\right)\\ t_4 := \left(c \cdot t_2\right) \cdot i\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_4 \leq -5 \cdot 10^{+111}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_4 \leq 5 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Error2.4
Cost2504
\[\begin{array}{l} t_1 := z \cdot t + x \cdot y\\ t_2 := a + b \cdot c\\ t_3 := \left(c \cdot t_2\right) \cdot i\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+286}:\\ \;\;\;\;2 \cdot \left(t_1 - t_3\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(t_2 \cdot i\right)\right)\\ \end{array} \]
Alternative 7
Error18.0
Cost1884
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ t_3 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;c \leq -4.8 \cdot 10^{-30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2.1 \cdot 10^{-137}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -2.35 \cdot 10^{-160}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.95 \cdot 10^{-195}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.7 \cdot 10^{-203}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.22 \cdot 10^{-136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{-78}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error22.8
Cost1628
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ t_2 := \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ t_3 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{+30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.22 \cdot 10^{-80}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-151}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-264}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-234}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error39.1
Cost1500
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -1.1 \cdot 10^{+120}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{+98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+30}:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 10^{-265}:\\ \;\;\;\;\left(i \cdot \left(a \cdot c\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-227}:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error38.1
Cost1500
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+120}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+39}:\\ \;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-244}:\\ \;\;\;\;\left(i \cdot \left(a \cdot c\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-227}:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error22.2
Cost1492
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ t_2 := 2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{if}\;c \leq -8.2 \cdot 10^{-29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{-204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{-136}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{-78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 7 \cdot 10^{+100}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error22.1
Cost1364
\[\begin{array}{l} t_1 := i \cdot \left(a \cdot c\right)\\ t_2 := 2 \cdot \left(x \cdot y - t_1\right)\\ t_3 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{-279}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+53}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 13
Error37.0
Cost1244
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{+119}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{+100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{+30}:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-244}:\\ \;\;\;\;\left(i \cdot \left(a \cdot c\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error36.7
Cost980
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{+121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{+30}:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error22.7
Cost968
\[\begin{array}{l} \mathbf{if}\;c \leq -1.65 \cdot 10^{+83}:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{-78}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \end{array} \]
Alternative 16
Error21.2
Cost968
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;y \leq -1.9 \cdot 10^{-160}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-18}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error36.4
Cost848
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{-36}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 255000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+160}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 18
Error22.0
Cost708
\[\begin{array}{l} \mathbf{if}\;c \leq -1.85 \cdot 10^{+82}:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \end{array} \]
Alternative 19
Error42.3
Cost320
\[2 \cdot \left(z \cdot t\right) \]

Error

Reproduce

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