Average Error: 6.0 → 3.2
Time: 33.5s
Precision: binary64
Cost: 14212
\[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 := i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+230}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(c \cdot \left(-i\right), \mathsf{fma}\left(c, b, a\right), x \cdot y\right)\\ \mathbf{elif}\;t_2 \leq 10^{+254}:\\ \;\;\;\;2 \cdot \left(t_1 - t_2\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \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 (+ (* x y) (* z t))) (t_2 (* i (* c (+ a (* b c))))))
   (if (<= t_2 -1e+230)
     (* 2.0 (fma (* c (- i)) (fma c b a) (* x y)))
     (if (<= t_2 1e+254)
       (* 2.0 (- t_1 t_2))
       (* 2.0 (- t_1 (* c (* c (* b 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 = i * (c * (a + (b * c)));
	double tmp;
	if (t_2 <= -1e+230) {
		tmp = 2.0 * fma((c * -i), fma(c, b, a), (x * y));
	} else if (t_2 <= 1e+254) {
		tmp = 2.0 * (t_1 - t_2);
	} else {
		tmp = 2.0 * (t_1 - (c * (c * (b * 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(x * y) + Float64(z * t))
	t_2 = Float64(i * Float64(c * Float64(a + Float64(b * c))))
	tmp = 0.0
	if (t_2 <= -1e+230)
		tmp = Float64(2.0 * fma(Float64(c * Float64(-i)), fma(c, b, a), Float64(x * y)));
	elseif (t_2 <= 1e+254)
		tmp = Float64(2.0 * Float64(t_1 - t_2));
	else
		tmp = Float64(2.0 * Float64(t_1 - Float64(c * Float64(c * Float64(b * i)))));
	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[(i * N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+230], N[(2.0 * N[(N[(c * (-i)), $MachinePrecision] * N[(c * b + a), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+254], N[(2.0 * N[(t$95$1 - t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(c * N[(c * N[(b * 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 := x \cdot y + z \cdot t\\
t_2 := i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+230}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(c \cdot \left(-i\right), \mathsf{fma}\left(c, b, a\right), x \cdot y\right)\\

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

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


\end{array}

Error

Target

Original6.0
Target1.8
Herbie3.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 (+.f64 a (*.f64 b c)) c) i) < -1.0000000000000001e230

    1. Initial program 35.1

      \[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. Simplified6.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)))): 0 points increase in error, 1 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)))): 37 points increase in error, 10 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))))): 0 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, 1 points decrease in error
    3. Taylor expanded in z around 0 21.1

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

      \[\leadsto \color{blue}{2 \cdot \mathsf{fma}\left(c \cdot \left(-i\right), \mathsf{fma}\left(c, b, a\right), y \cdot x\right)} \]
      Proof
      (*.f64 2 (fma.f64 (*.f64 c (neg.f64 i)) (fma.f64 c b a) (*.f64 y x))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 c i))) (fma.f64 c b a) (*.f64 y x))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 (Rewrite=> neg-mul-1_binary64 (*.f64 -1 (*.f64 c i))) (fma.f64 c b a) (*.f64 y x))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (fma.f64 (*.f64 -1 (*.f64 c i)) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 c b) a)) (*.f64 y x))): 0 points increase in error, 1 points decrease in error
      (*.f64 2 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (*.f64 -1 (*.f64 c i)) (+.f64 (*.f64 c b) a)) (*.f64 y x)))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (+.f64 (Rewrite<= associate-*r*_binary64 (*.f64 -1 (*.f64 (*.f64 c i) (+.f64 (*.f64 c b) a)))) (*.f64 y x))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (+.f64 (*.f64 -1 (Rewrite<= associate-*r*_binary64 (*.f64 c (*.f64 i (+.f64 (*.f64 c b) a))))) (*.f64 y x))): 38 points increase in error, 23 points decrease in error
      (*.f64 2 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 y x) (*.f64 -1 (*.f64 c (*.f64 i (+.f64 (*.f64 c b) a))))))): 0 points increase in error, 0 points decrease in error

    if -1.0000000000000001e230 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999994e253

    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 9.9999999999999994e253 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 42.2

      \[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.1

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

      \[\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))): 49 points increase in error, 25 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
  3. Recombined 3 regimes into one program.
  4. Final simplification3.2

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

Alternatives

Alternative 1
Error1.8
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
Error13.4
Cost4824
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ t_2 := i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\\ t_3 := 2 \cdot \left(x \cdot y - t_2\right)\\ t_4 := c \cdot \left(c \cdot \left(b \cdot i\right)\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_4\right)\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-84}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+41}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{elif}\;t_2 \leq 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+254}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_4\right)\\ \end{array} \]
Alternative 3
Error9.4
Cost4052
\[\begin{array}{l} t_1 := i \cdot \left(c \cdot a\right)\\ t_2 := i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\\ t_3 := 2 \cdot \left(x \cdot y - t_2\right)\\ t_4 := c \cdot \left(c \cdot \left(b \cdot i\right)\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_4\right)\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{+97}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 10^{+60}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_1\right)\\ \mathbf{elif}\;t_2 \leq 3.5 \cdot 10^{+159}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 10^{+254}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_4\right)\\ \end{array} \]
Alternative 4
Error7.4
Cost3664
\[\begin{array}{l} t_1 := x \cdot y + z \cdot t\\ t_2 := i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\\ t_3 := 2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ t_4 := 2 \cdot \left(z \cdot t - t_2\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{+97}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+96}:\\ \;\;\;\;2 \cdot \left(t_1 - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{elif}\;t_2 \leq 10^{+254}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error8.0
Cost3536
\[\begin{array}{l} t_1 := i \cdot \left(c \cdot \left(a + b \cdot c\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\ t_3 := c \cdot \left(c \cdot \left(b \cdot i\right)\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_3\right)\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{+97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+96}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{elif}\;t_1 \leq 10^{+254}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_3\right)\\ \end{array} \]
Alternative 6
Error2.4
Cost2248
\[\begin{array}{l} t_1 := x \cdot y + z \cdot t\\ t_2 := c \cdot \left(a + b \cdot c\right)\\ t_3 := c \cdot \left(c \cdot \left(b \cdot i\right)\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;2 \cdot \left(t_1 - t_3\right)\\ \mathbf{elif}\;t_2 \leq 10^{+308}:\\ \;\;\;\;2 \cdot \left(t_1 - i \cdot t_2\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_3\right)\\ \end{array} \]
Alternative 7
Error24.3
Cost1888
\[\begin{array}{l} t_1 := c \cdot \left(c \cdot \left(b \cdot i\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\ t_3 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;y \leq 8.341843356358368 \cdot 10^{-290}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 2.557722549469401 \cdot 10^{-112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.3045801975345443 \cdot 10^{-18}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{elif}\;y \leq 273150949994.77237:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+149}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+167}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{elif}\;y \leq 10^{+208}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 10^{+260}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \end{array} \]
Alternative 8
Error40.2
Cost1372
\[\begin{array}{l} t_1 := y \cdot \left(2 \cdot x\right)\\ t_2 := a \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\ t_3 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{+147}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.0836119573153694 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.901139169889544 \cdot 10^{-232}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -4.38385244523403 \cdot 10^{-256}:\\ \;\;\;\;c \cdot \left(-2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.769544623233261 \cdot 10^{-244}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.786135672990215 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.8501835371501852 \cdot 10^{+85}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error22.6
Cost1364
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ t_2 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;i \leq -2.2 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq -255000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 2.093800440379013 \cdot 10^{-159}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 2.887161739278645 \cdot 10^{-139}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 9.5 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\ \end{array} \]
Alternative 10
Error24.5
Cost1364
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\ t_2 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;a \leq -3.1378696364803773 \cdot 10^{-206}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.0314417996179881 \cdot 10^{-221}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.276164795710611 \cdot 10^{+38}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 10^{+185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{+232}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error38.7
Cost1108
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := y \cdot \left(2 \cdot x\right)\\ \mathbf{if}\;x \leq -7 \cdot 10^{+81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.985442616511139 \cdot 10^{+21}:\\ \;\;\;\;i \cdot \left(a \cdot \left(c \cdot -2\right)\right)\\ \mathbf{elif}\;x \leq 9.9843352399999 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.481504879263871 \cdot 10^{-183}:\\ \;\;\;\;c \cdot \left(a \cdot \left(i \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error22.2
Cost1100
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;x \leq -8.417325380558675 \cdot 10^{-76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 9.9843352399999 \cdot 10^{-251}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{elif}\;x \leq 6.481504879263871 \cdot 10^{-183}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error21.0
Cost968
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;x \leq -8.417325380558675 \cdot 10^{-76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.481504879263871 \cdot 10^{-183}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error38.6
Cost844
\[\begin{array}{l} t_1 := y \cdot \left(2 \cdot x\right)\\ \mathbf{if}\;x \leq -7 \cdot 10^{+81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 9.9843352399999 \cdot 10^{-251}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \leq 6.481504879263871 \cdot 10^{-183}:\\ \;\;\;\;c \cdot \left(a \cdot \left(i \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error23.8
Cost840
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;z \leq -5.0271693430819464 \cdot 10^{-169}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.69031261707641 \cdot 10^{-235}:\\ \;\;\;\;a \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error36.0
Cost584
\[\begin{array}{l} t_1 := y \cdot \left(2 \cdot x\right)\\ \mathbf{if}\;y \leq -2.277409186397148 \cdot 10^{-86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.0177534973223212 \cdot 10^{+45}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error42.5
Cost320
\[y \cdot \left(2 \cdot x\right) \]

Error

Reproduce

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