Average Error: 6.3 → 3.5
Time: 20.2s
Precision: binary64
Cost: 20612
\[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 := c \cdot \left(a + b \cdot c\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+208}:\\ \;\;\;\;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)\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - t_1 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right) + c \cdot \left(a \cdot i\right)\right) \cdot -2\\ \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 (* c (+ a (* b c)))))
   (if (<= t_1 -2e+208)
     (* 2.0 (fma z t (fma (fma b c a) (* i (- c)) (* x y))))
     (if (<= t_1 INFINITY)
       (* 2.0 (- (+ (* z t) (* x y)) (* t_1 i)))
       (* (+ (* (* c c) (* b i)) (* c (* a i))) -2.0)))))
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 = c * (a + (b * c));
	double tmp;
	if (t_1 <= -2e+208) {
		tmp = 2.0 * fma(z, t, fma(fma(b, c, a), (i * -c), (x * y)));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = 2.0 * (((z * t) + (x * y)) - (t_1 * i));
	} else {
		tmp = (((c * c) * (b * i)) + (c * (a * i))) * -2.0;
	}
	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(c * Float64(a + Float64(b * c)))
	tmp = 0.0
	if (t_1 <= -2e+208)
		tmp = Float64(2.0 * fma(z, t, fma(fma(b, c, a), Float64(i * Float64(-c)), Float64(x * y))));
	elseif (t_1 <= Inf)
		tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(t_1 * i)));
	else
		tmp = Float64(Float64(Float64(Float64(c * c) * Float64(b * i)) + Float64(c * Float64(a * i))) * -2.0);
	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[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+208], N[(2.0 * N[(z * t + N[(N[(b * c + a), $MachinePrecision] * N[(i * (-c)), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision] + N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $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 := c \cdot \left(a + b \cdot c\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+208}:\\
\;\;\;\;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)\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - t_1 \cdot i\right)\\

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


\end{array}

Error

Target

Original6.3
Target1.7
Herbie3.5
\[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) < -2e208

    1. Initial program 35.7

      \[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. Simplified4.8

      \[\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)))): 1 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))))): 1 points increase in error, 1 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)))): 24 points increase in error, 24 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))))): 2 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

    if -2e208 < (*.f64 (+.f64 a (*.f64 b c)) c) < +inf.0

    1. Initial program 3.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 +inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 6.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. Simplified1.7

      \[\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)))): 0 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)))): 24 points increase in error, 24 points decrease in error
    3. Applied egg-rr1.7

      \[\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) \]
    4. Taylor expanded in c around inf 49.3

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right)} \]
    5. Simplified49.3

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(\left(c \cdot c\right) \cdot \left(i \cdot b\right) + c \cdot \left(i \cdot a\right)\right)\right)} \]
      Proof
      (*.f64 -1 (+.f64 (*.f64 (*.f64 c c) (*.f64 i b)) (*.f64 c (*.f64 i a)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -1 (+.f64 (Rewrite=> associate-*l*_binary64 (*.f64 c (*.f64 c (*.f64 i b)))) (*.f64 c (*.f64 i a)))): 8 points increase in error, 35 points decrease in error
      (*.f64 -1 (+.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 -1 (+.f64 (*.f64 c (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 c b) i))) (*.f64 c (*.f64 i a)))): 17 points increase in error, 19 points decrease in error
      (*.f64 -1 (+.f64 (*.f64 c (*.f64 (*.f64 c b) i)) (*.f64 c (Rewrite=> *-commutative_binary64 (*.f64 a i))))): 0 points increase in error, 0 points decrease in error
      (*.f64 -1 (Rewrite<= distribute-lft-in_binary64 (*.f64 c (+.f64 (*.f64 (*.f64 c b) i) (*.f64 a i))))): 0 points increase in error, 1 points decrease in error
      (*.f64 -1 (*.f64 c (Rewrite<= distribute-rgt-in_binary64 (*.f64 i (+.f64 (*.f64 c b) a))))): 0 points increase in error, 2 points decrease in error
      (*.f64 -1 (*.f64 c (Rewrite=> distribute-rgt-in_binary64 (+.f64 (*.f64 (*.f64 c b) i) (*.f64 a i))))): 2 points increase in error, 0 points decrease in error
      (*.f64 -1 (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 c (*.f64 (*.f64 c b) i)) (*.f64 c (*.f64 a i))))): 1 points increase in error, 0 points decrease in error
      (*.f64 -1 (+.f64 (*.f64 c (Rewrite=> associate-*l*_binary64 (*.f64 c (*.f64 b i)))) (*.f64 c (*.f64 a i)))): 19 points increase in error, 17 points decrease in error
      (*.f64 -1 (+.f64 (*.f64 c (*.f64 c (Rewrite<= *-commutative_binary64 (*.f64 i b)))) (*.f64 c (*.f64 a i)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -1 (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 c c) (*.f64 i b))) (*.f64 c (*.f64 a i)))): 35 points increase in error, 8 points decrease in error
      (*.f64 -1 (+.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (*.f64 i b)) (*.f64 c (*.f64 a i)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-lft-out_binary64 (+.f64 (*.f64 -1 (*.f64 (pow.f64 c 2) (*.f64 i b))) (*.f64 -1 (*.f64 c (*.f64 a i))))): 0 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification3.5

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

Alternatives

Alternative 1
Error3.9
Cost2248
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := c \cdot t_1\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(t_1 \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - t_2 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right) + c \cdot \left(a \cdot i\right)\right) \cdot -2\\ \end{array} \]
Alternative 2
Error3.5
Cost2248
\[\begin{array}{l} t_1 := z \cdot t + x \cdot y\\ t_2 := a + b \cdot c\\ t_3 := c \cdot t_2\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{+264}:\\ \;\;\;\;2 \cdot \left(t_1 - t_2 \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;2 \cdot \left(t_1 - t_3 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right) + c \cdot \left(a \cdot i\right)\right) \cdot -2\\ \end{array} \]
Alternative 3
Error23.8
Cost2148
\[\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(\left(a + b \cdot c\right) \cdot i\right)\right)\\ t_3 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+227}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-8}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-249}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-307}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-238}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-116}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 3.95 \cdot 10^{-25}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error20.8
Cost1760
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ t_2 := a + b \cdot c\\ t_3 := \left(c \cdot \left(t_2 \cdot i\right)\right) \cdot -2\\ \mathbf{if}\;c \leq -1.65 \cdot 10^{+128}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -2.8 \cdot 10^{+55}:\\ \;\;\;\;2 \cdot \left(z \cdot t - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.5 \cdot 10^{+30}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -31000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.6 \cdot 10^{-57}:\\ \;\;\;\;\left(\left(c \cdot t_2\right) \cdot i\right) \cdot -2\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{+37}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 2.5 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error19.1
Cost1744
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;z \cdot t \leq -5 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq 10^{-230}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{-74}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+26}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error13.3
Cost1740
\[\begin{array}{l} t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\ t_2 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{-27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{-74}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\ \mathbf{elif}\;z \cdot t \leq 4 \cdot 10^{+31}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error38.1
Cost1376
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ t_2 := a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ t_3 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;t \leq -4 \cdot 10^{-113}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-230}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-184}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+129}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+155}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error38.4
Cost1376
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ t_2 := \left(c \cdot \left(a \cdot i\right)\right) \cdot -2\\ t_3 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;t \leq -9.2 \cdot 10^{-109}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-180}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+128}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+155}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 9
Error7.5
Cost1352
\[\begin{array}{l} t_1 := z \cdot t + x \cdot y\\ t_2 := 2 \cdot \left(t_1 - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{if}\;a \leq -2.45 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 750000:\\ \;\;\;\;2 \cdot \left(t_1 - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error18.7
Cost1224
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;z \cdot t \leq -5 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq 10^{-230}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error8.4
Cost1224
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{if}\;c \leq -3.5 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.65 \cdot 10^{+54}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error37.5
Cost1112
\[\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 -9 \cdot 10^{-109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+156}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error24.2
Cost840
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;a \leq -4.2 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{+45}:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error42.4
Cost320
\[2 \cdot \left(z \cdot t\right) \]

Error

Reproduce

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