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

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+234}:\\
\;\;\;\;2 \cdot \left(t_1 - i \cdot \left(c \cdot \left(b \cdot c\right) + a \cdot c\right)\right)\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original6.2
Target1.6
Herbie1.2
\[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. Taylor expanded in i around 0 10.1

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

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - c \cdot \color{blue}{\left(\left(i \cdot b\right) \cdot c + i \cdot a\right)}\right) \]
    4. Taylor expanded in x around inf 10.9

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

    if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 2.00000000000000004e234

    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) \]
    2. Applied egg-rr0.4

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

    if 2.00000000000000004e234 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 39.9

      \[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 i around 0 6.4

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

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

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

Alternatives

Alternative 1
Error6.2
Cost3664
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x - c \cdot \left(c \cdot \left(b \cdot i\right) + a \cdot i\right)\right)\\ t_2 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(b \cdot c\right) + a \cdot c\right)\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+64}:\\ \;\;\;\;2 \cdot \left(\left(y \cdot x + z \cdot t\right) - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq 10^{+306}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error3.9
Cost3664
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x - c \cdot \left(c \cdot \left(b \cdot i\right) + a \cdot i\right)\right)\\ t_2 := a + b \cdot c\\ t_3 := \left(c \cdot t_2\right) \cdot i\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_3 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(b \cdot c\right) + a \cdot c\right)\right)\\ \mathbf{elif}\;t_3 \leq 10^{+103}:\\ \;\;\;\;2 \cdot \left(\left(y \cdot x + z \cdot t\right) - c \cdot \left(t_2 \cdot i\right)\right)\\ \mathbf{elif}\;t_3 \leq 10^{+306}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_3\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error7.4
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 -\infty:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(t_1 \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_2\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+64}:\\ \;\;\;\;2 \cdot \left(\left(y \cdot x + z \cdot t\right) - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq 10^{+306}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]
Alternative 4
Error7.3
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 -\infty:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(t_1 \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_2\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+64}:\\ \;\;\;\;2 \cdot \left(\left(y \cdot x + z \cdot t\right) - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq 10^{+306}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]
Alternative 5
Error7.3
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 -\infty:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(t_1 \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(b \cdot c\right) + a \cdot c\right)\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+64}:\\ \;\;\;\;2 \cdot \left(\left(y \cdot x + z \cdot t\right) - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq 10^{+306}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]
Alternative 6
Error27.1
Cost2676
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := 2 \cdot \left(z \cdot t - \left(c \cdot t_1\right) \cdot i\right)\\ t_3 := 2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ t_4 := 2 \cdot \left(y \cdot x - c \cdot \left(t_1 \cdot i\right)\right)\\ t_5 := 2 \cdot \left(y \cdot x - a \cdot \left(c \cdot i\right)\right)\\ t_6 := b \cdot \left(c \cdot \left(c \cdot i\right)\right)\\ t_7 := 2 \cdot \left(y \cdot x - t_6\right)\\ \mathbf{if}\;a \leq -9.2 \cdot 10^{+191}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq -7.1 \cdot 10^{+146}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_6\right)\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{+67}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-30}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-251}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-250}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-114}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-94}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-63}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-33}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-13}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+104}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+159}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 7
Error29.7
Cost2417
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ t_2 := 2 \cdot \left(y \cdot x - a \cdot \left(c \cdot i\right)\right)\\ t_3 := 2 \cdot \left(y \cdot x - c \cdot \left(a \cdot i\right)\right)\\ t_4 := 2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{if}\;b \leq -4.1 \cdot 10^{+95}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{+32}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-93}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -1.5 \cdot 10^{-141}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-288}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{-241}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-187}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 0.00012:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{+61} \lor \neg \left(b \leq 2.6 \cdot 10^{+139}\right):\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error1.2
Cost2376
\[\begin{array}{l} t_1 := y \cdot x + z \cdot t\\ t_2 := c \cdot \left(c \cdot \left(b \cdot i\right) + a \cdot i\right)\\ t_3 := c \cdot \left(a + b \cdot c\right)\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{+234}:\\ \;\;\;\;2 \cdot \left(t_1 - t_3 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - t_2\right)\\ \end{array} \]
Alternative 9
Error37.2
Cost2288
\[\begin{array}{l} t_1 := \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ t_2 := 2 \cdot \left(y \cdot x\right)\\ t_3 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -1 \cdot 10^{+105}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -8 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{+34}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-160}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-250}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-309}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-189}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-140}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-122}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 10
Error28.7
Cost2288
\[\begin{array}{l} t_1 := b \cdot \left(c \cdot \left(c \cdot i\right)\right)\\ t_2 := 2 \cdot \left(y \cdot x - t_1\right)\\ t_3 := 2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ t_4 := 2 \cdot \left(y \cdot x - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{if}\;a \leq -1.15 \cdot 10^{+173}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{+68}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-100}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-252}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-250}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{elif}\;a \leq 10^{-115}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-94}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-41}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+112}:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+151}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 11
Error1.6
Cost2248
\[\begin{array}{l} t_1 := y \cdot x + z \cdot t\\ t_2 := a + b \cdot c\\ t_3 := c \cdot t_2\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(c \cdot \left(b \cdot i\right) + a \cdot i\right)\right)\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{+131}:\\ \;\;\;\;2 \cdot \left(t_1 - t_3 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(t_2 \cdot i\right)\right)\\ \end{array} \]
Alternative 12
Error28.0
Cost2156
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\right)\\ t_2 := 2 \cdot \left(y \cdot x - a \cdot \left(c \cdot i\right)\right)\\ t_3 := b \cdot \left(c \cdot \left(c \cdot i\right)\right)\\ t_4 := 2 \cdot \left(y \cdot x - t_3\right)\\ \mathbf{if}\;a \leq -9.2 \cdot 10^{+191}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -8.4 \cdot 10^{+145}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_3\right)\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.75 \cdot 10^{-31}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-251}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-250}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-119}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+112}:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+159}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error40.2
Cost1636
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ t_3 := 2 \cdot \left(y \cdot x\right)\\ \mathbf{if}\;a \leq -4.5 \cdot 10^{+182}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-31}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-250}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-249}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-117}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 8.4 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+82}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error29.9
Cost1234
\[\begin{array}{l} \mathbf{if}\;x \leq -9 \cdot 10^{+141} \lor \neg \left(x \leq -1.08 \cdot 10^{+74} \lor \neg \left(x \leq -2 \cdot 10^{+33}\right) \land x \leq 1.06 \cdot 10^{-58}\right):\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]
Alternative 15
Error27.5
Cost1234
\[\begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{+137} \lor \neg \left(x \leq -7.5 \cdot 10^{+81}\right) \land \left(x \leq -2.2 \cdot 10^{+34} \lor \neg \left(x \leq 1.06 \cdot 10^{-58}\right)\right):\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]
Alternative 16
Error26.2
Cost1232
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ t_2 := 2 \cdot \left(y \cdot x - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{if}\;x \leq -1.55 \cdot 10^{+138}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.3 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{+33}:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 17
Error26.8
Cost1232
\[\begin{array}{l} t_1 := i \cdot \left(a \cdot c\right)\\ t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{if}\;x \leq -3.2 \cdot 10^{+138}:\\ \;\;\;\;2 \cdot \left(y \cdot x - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{+81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{+34}:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{-58}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_1\right)\\ \end{array} \]
Alternative 18
Error36.2
Cost850
\[\begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+139} \lor \neg \left(x \leq -1.8 \cdot 10^{+91}\right) \land \left(x \leq -7.2 \cdot 10^{+19} \lor \neg \left(x \leq 7.5 \cdot 10^{-59}\right)\right):\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
Alternative 19
Error42.6
Cost320
\[2 \cdot \left(z \cdot t\right) \]

Error

Reproduce

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