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

\mathbf{elif}\;t_2 \leq 10^{+292}:\\
\;\;\;\;2 \cdot \left(t_1 - i \cdot t_2\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + a \cdot \left(c \cdot i\right)\right)\right)\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original6.4
Target1.9
Herbie2.1
\[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 a around 0 40.9

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

      \[\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))): 52 points increase in error, 21 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 a (*.f64 b c)) c) < 1e292

    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) \]

    if 1e292 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 56.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. Simplified8.2

      \[\leadsto \color{blue}{2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), i \cdot \left(-c\right), x \cdot y\right)\right)} \]
      Proof
      (*.f64 2 (fma.f64 z t (fma.f64 (fma.f64 b c a) (*.f64 i (neg.f64 c)) (*.f64 x y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (fma.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 b c) a)) (*.f64 i (neg.f64 c)) (*.f64 x y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (fma.f64 (Rewrite<= +-commutative_binary64 (+.f64 a (*.f64 b c))) (*.f64 i (neg.f64 c)) (*.f64 x y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (fma.f64 (+.f64 a (*.f64 b c)) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 i c))) (*.f64 x y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (fma.f64 (+.f64 a (*.f64 b c)) (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 c i))) (*.f64 x y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (+.f64 a (*.f64 b c)) (neg.f64 (*.f64 c i))) (*.f64 x y))))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (+.f64 a (*.f64 b c)) (*.f64 c i)))) (*.f64 x y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (+.f64 (neg.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i))) (*.f64 x y)))): 33 points increase in error, 13 points decrease in error
      (*.f64 2 (fma.f64 z t (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i))) (*.f64 x y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (Rewrite=> associate-+l-_binary64 (-.f64 0 (-.f64 (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) (*.f64 x y)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 z t (Rewrite<= neg-sub0_binary64 (neg.f64 (-.f64 (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) (*.f64 x y)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 z t) (-.f64 (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) (*.f64 x y))))): 1 points increase in error, 0 points decrease in error
      (*.f64 2 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 (*.f64 z t) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) (*.f64 x y)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 x y) (-.f64 (*.f64 z t) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i))))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in x around 0 14.4

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + -1 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\right)} \]
    4. Simplified14.4

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z - \mathsf{fma}\left(c, b, a\right) \cdot \left(c \cdot i\right)\right)} \]
      Proof
      (-.f64 (*.f64 t z) (*.f64 (fma.f64 c b a) (*.f64 c i))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (*.f64 (fma.f64 c b (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 a)))) (*.f64 c i))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (*.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 c b) (neg.f64 a))) (*.f64 c i))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 c i) (-.f64 (*.f64 c b) (neg.f64 a))))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 (*.f64 c i) (*.f64 c b)) (*.f64 (*.f64 c i) (neg.f64 a))))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (-.f64 (Rewrite=> associate-*l*_binary64 (*.f64 c (*.f64 i (*.f64 c b)))) (*.f64 (*.f64 c i) (neg.f64 a)))): 12 points increase in error, 4 points decrease in error
      (-.f64 (*.f64 t z) (-.f64 (*.f64 c (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 c b) i))) (*.f64 (*.f64 c i) (neg.f64 a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (-.f64 (*.f64 c (Rewrite=> associate-*l*_binary64 (*.f64 c (*.f64 b i)))) (*.f64 (*.f64 c i) (neg.f64 a)))): 18 points increase in error, 11 points decrease in error
      (-.f64 (*.f64 t z) (-.f64 (*.f64 c (*.f64 c (Rewrite<= *-commutative_binary64 (*.f64 i b)))) (*.f64 (*.f64 c i) (neg.f64 a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (-.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 c c) (*.f64 i b))) (*.f64 (*.f64 c i) (neg.f64 a)))): 31 points increase in error, 4 points decrease in error
      (-.f64 (*.f64 t z) (-.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (*.f64 i b)) (*.f64 (*.f64 c i) (neg.f64 a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (-.f64 (*.f64 (pow.f64 c 2) (*.f64 i b)) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (*.f64 c i) a))))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (-.f64 (*.f64 (pow.f64 c 2) (*.f64 i b)) (Rewrite=> distribute-lft-neg-in_binary64 (*.f64 (neg.f64 (*.f64 c i)) a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (Rewrite=> cancel-sign-sub_binary64 (+.f64 (*.f64 (pow.f64 c 2) (*.f64 i b)) (*.f64 (*.f64 c i) a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (+.f64 (*.f64 (pow.f64 c 2) (*.f64 i b)) (Rewrite<= associate-*r*_binary64 (*.f64 c (*.f64 i a))))): 20 points increase in error, 14 points decrease in error
      (-.f64 (*.f64 t z) (+.f64 (*.f64 (Rewrite=> unpow2_binary64 (*.f64 c c)) (*.f64 i b)) (*.f64 c (*.f64 i a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (+.f64 (Rewrite=> associate-*l*_binary64 (*.f64 c (*.f64 c (*.f64 i b)))) (*.f64 c (*.f64 i a)))): 4 points increase in error, 31 points decrease in error
      (-.f64 (*.f64 t z) (+.f64 (*.f64 c (*.f64 c (Rewrite=> *-commutative_binary64 (*.f64 b i)))) (*.f64 c (*.f64 i a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (+.f64 (*.f64 c (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 c b) i))) (*.f64 c (*.f64 i a)))): 11 points increase in error, 17 points decrease in error
      (-.f64 (*.f64 t z) (+.f64 (*.f64 c (Rewrite<= *-commutative_binary64 (*.f64 i (*.f64 c b)))) (*.f64 c (*.f64 i a)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (Rewrite<= distribute-lft-in_binary64 (*.f64 c (+.f64 (*.f64 i (*.f64 c b)) (*.f64 i a))))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 t z) (*.f64 c (Rewrite<= distribute-lft-in_binary64 (*.f64 i (+.f64 (*.f64 c b) a))))): 1 points increase in error, 0 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 (*.f64 t z) (neg.f64 (*.f64 c (*.f64 i (+.f64 (*.f64 c b) a)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 t z) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 c (*.f64 i (+.f64 (*.f64 c b) a)))))): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr14.4

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot \left(a + b \cdot c\right) \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}\;c \cdot \left(a + b \cdot c\right) \leq 10^{+292}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + a \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error1.9
Cost20096
\[2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(\mathsf{fma}\left(b, c, a\right), c \cdot \left(-i\right), x \cdot y\right)\right) \]
Alternative 2
Error12.8
Cost4056
\[\begin{array}{l} t_1 := 2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(a \cdot i\right)\right)\\ t_2 := c \cdot \left(a + b \cdot c\right)\\ t_3 := i \cdot t_2\\ t_4 := 2 \cdot \left(x \cdot y - t_3\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_2 \leq -5.5 \cdot 10^{-32}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_3\right)\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+142}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+292}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \end{array} \]
Alternative 3
Error12.1
Cost4056
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := c \cdot t_1\\ t_3 := z \cdot t + x \cdot y\\ t_4 := 2 \cdot \left(t_3 - c \cdot \left(a \cdot i\right)\right)\\ t_5 := i \cdot t_2\\ t_6 := 2 \cdot \left(x \cdot y - t_5\right)\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{+245}:\\ \;\;\;\;2 \cdot \left(t_3 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_2 \leq -5.5 \cdot 10^{-32}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_5\right)\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+47}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+142}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+191}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq 10^{+292}:\\ \;\;\;\;t_6\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot t_1\right)\right)\\ \end{array} \]
Alternative 4
Error9.9
Cost3536
\[\begin{array}{l} t_1 := 2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(a \cdot i\right)\right)\\ t_2 := i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{+172}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_2\right)\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{+74}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \end{array} \]
Alternative 5
Error7.4
Cost3148
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + a \cdot \left(c \cdot i\right)\right)\right)\\ t_2 := i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -4 \cdot 10^{+23}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_2\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+154}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error8.1
Cost2892
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := i \cdot \left(c \cdot t_1\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot t_1\right)\right)\\ \mathbf{elif}\;t_2 \leq -4 \cdot 10^{+23}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_2\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+154}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \end{array} \]
Alternative 7
Error15.5
Cost1992
\[\begin{array}{l} t_1 := z \cdot t + x \cdot y\\ t_2 := 2 \cdot \left(t_1 - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{if}\;t_1 \leq -4000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 10^{-229}:\\ \;\;\;\;\left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error22.2
Cost1496
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;x \leq -8472613999265231:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.4600163135976005 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -5.131454591659395 \cdot 10^{-48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -7.245977923902385 \cdot 10^{-64}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \mathbf{elif}\;x \leq -2.9249485264588236 \cdot 10^{-120}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.0134884539515243 \cdot 10^{-173}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error23.0
Cost1232
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;z \leq -2 \cdot 10^{+87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.3421086411624821 \cdot 10^{+45}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;z \leq -3.397794017850017 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.221870215316093 \cdot 10^{-214}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error21.9
Cost968
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;z \leq -8.585018389769698 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.221870215316093 \cdot 10^{-214}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error21.1
Cost968
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;x \leq -7.938777585401133 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.0134884539515243 \cdot 10^{-173}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error35.9
Cost848
\[\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.6305399547844813 \cdot 10^{+21}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.8331970254053148 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.0406243394826315 \cdot 10^{-37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 7.972510445253855 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error23.4
Cost708
\[\begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{+201}:\\ \;\;\;\;i \cdot \left(c \cdot \left(a \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \end{array} \]
Alternative 14
Error43.3
Cost320
\[2 \cdot \left(x \cdot y\right) \]

Error

Reproduce

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