Average Error: 6.4 → 1.9
Time: 28.2s
Precision: binary64
Cost: 15044
\[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)\\ t_3 := b \cdot c - a\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+160}:\\ \;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \frac{c \cdot i}{\frac{\frac{t_3}{\mathsf{fma}\left(c, b, a\right)}}{t_3}}\right)\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;2 \cdot \left(t_1 - t_2 \cdot i\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 (+ (* z t) (* x y)))
        (t_2 (* c (+ a (* b c))))
        (t_3 (- (* b c) a)))
   (if (<= t_2 -5e+160)
     (* 2.0 (- (fma x y (* z t)) (/ (* c i) (/ (/ t_3 (fma c b a)) t_3))))
     (if (<= t_2 5e+302)
       (* 2.0 (- t_1 (* t_2 i)))
       (* 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 = (z * t) + (x * y);
	double t_2 = c * (a + (b * c));
	double t_3 = (b * c) - a;
	double tmp;
	if (t_2 <= -5e+160) {
		tmp = 2.0 * (fma(x, y, (z * t)) - ((c * i) / ((t_3 / fma(c, b, a)) / t_3)));
	} else if (t_2 <= 5e+302) {
		tmp = 2.0 * (t_1 - (t_2 * i));
	} 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(z * t) + Float64(x * y))
	t_2 = Float64(c * Float64(a + Float64(b * c)))
	t_3 = Float64(Float64(b * c) - a)
	tmp = 0.0
	if (t_2 <= -5e+160)
		tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(c * i) / Float64(Float64(t_3 / fma(c, b, a)) / t_3))));
	elseif (t_2 <= 5e+302)
		tmp = Float64(2.0 * Float64(t_1 - Float64(t_2 * i)));
	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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - a), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+160], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] / N[(N[(t$95$3 / N[(c * b + a), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+302], N[(2.0 * N[(t$95$1 - N[(t$95$2 * i), $MachinePrecision]), $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 := z \cdot t + x \cdot y\\
t_2 := c \cdot \left(a + b \cdot c\right)\\
t_3 := b \cdot c - a\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+160}:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \frac{c \cdot i}{\frac{\frac{t_3}{\mathsf{fma}\left(c, b, a\right)}}{t_3}}\right)\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;2 \cdot \left(t_1 - t_2 \cdot i\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.4
Target1.9
Herbie1.9
\[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) < -5.0000000000000002e160

    1. Initial program 26.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. Simplified5.1

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

      [Start]26.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) \]

      *-commutative [=>]26.0

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

      associate-*l* [=>]5.1

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

      cancel-sign-sub-inv [=>]5.1

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

      cancel-sign-sub [<=]5.1

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

      fma-def [=>]5.1

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

      remove-double-neg [=>]5.1

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

      +-commutative [=>]5.1

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

      fma-def [=>]5.1

      \[ 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - c \cdot \left(\color{blue}{\mathsf{fma}\left(b, c, a\right)} \cdot i\right)\right) \]
    3. Applied egg-rr49.2

      \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{\frac{\left(c \cdot i\right) \cdot \left(\left(c \cdot b\right) \cdot \left(c \cdot b\right) - a \cdot a\right)}{c \cdot b - a}}\right) \]
    4. Simplified4.6

      \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{\frac{c \cdot i}{\frac{\frac{c \cdot b - a}{\mathsf{fma}\left(c, b, a\right)}}{c \cdot b - a}}}\right) \]
      Proof

      [Start]49.2

      \[ 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \frac{\left(c \cdot i\right) \cdot \left(\left(c \cdot b\right) \cdot \left(c \cdot b\right) - a \cdot a\right)}{c \cdot b - a}\right) \]

      associate-/l* [=>]44.7

      \[ 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{\frac{c \cdot i}{\frac{c \cdot b - a}{\left(c \cdot b\right) \cdot \left(c \cdot b\right) - a \cdot a}}}\right) \]

      difference-of-squares [=>]44.7

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

      *-commutative [=>]44.7

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

      fma-udef [<=]44.7

      \[ 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \frac{c \cdot i}{\frac{c \cdot b - a}{\color{blue}{\mathsf{fma}\left(b, c, a\right)} \cdot \left(c \cdot b - a\right)}}\right) \]

      associate-/r* [=>]4.6

      \[ 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \frac{c \cdot i}{\color{blue}{\frac{\frac{c \cdot b - a}{\mathsf{fma}\left(b, c, a\right)}}{c \cdot b - a}}}\right) \]

      fma-udef [=>]4.6

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

      *-commutative [<=]4.6

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

      fma-def [=>]4.6

      \[ 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \frac{c \cdot i}{\frac{\frac{c \cdot b - a}{\color{blue}{\mathsf{fma}\left(c, b, a\right)}}}{c \cdot b - a}}\right) \]

    if -5.0000000000000002e160 < (*.f64 (+.f64 a (*.f64 b c)) c) < 5e302

    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 5e302 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 61.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. Taylor expanded in a around 0 42.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.1

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

      [Start]42.4

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

      unpow2 [=>]42.4

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

      associate-*l* [=>]21.1

      \[ 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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.9

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

Alternatives

Alternative 1
Error2.2
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 -\infty:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot t_2\right)\right)\\ \mathbf{elif}\;t_3 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;2 \cdot \left(t_1 - t_3 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]
Alternative 2
Error1.9
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 -\infty:\\ \;\;\;\;2 \cdot \left(t_1 - \left(c \cdot i\right) \cdot t_2\right)\\ \mathbf{elif}\;t_3 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;2 \cdot \left(t_1 - t_3 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]
Alternative 3
Error22.9
Cost1760
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{+36}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-19}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-58}:\\ \;\;\;\;\left(a + b \cdot c\right) \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-185}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-198}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-216}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error8.8
Cost1616
\[\begin{array}{l} t_1 := c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\\ t_2 := z \cdot t + x \cdot y\\ \mathbf{if}\;c \leq -6 \cdot 10^{-8}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{elif}\;c \leq 1.12 \cdot 10^{-61}:\\ \;\;\;\;2 \cdot \left(t_2 - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 6.8 \cdot 10^{+29}:\\ \;\;\;\;2 \cdot \left(t_2 - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq 10^{+50}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_2 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]
Alternative 5
Error21.3
Cost1364
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ t_2 := 2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ t_3 := 2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{if}\;a \leq -4.4 \cdot 10^{+174}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{+30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{+117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+177}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Error8.7
Cost1352
\[\begin{array}{l} t_1 := z \cdot t + x \cdot y\\ \mathbf{if}\;c \leq -8.8 \cdot 10^{-8}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq 3.4 \cdot 10^{-51}:\\ \;\;\;\;2 \cdot \left(t_1 - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]
Alternative 7
Error21.6
Cost1232
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ t_2 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{if}\;a \leq -8.5 \cdot 10^{+29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+119}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+184}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \end{array} \]
Alternative 8
Error16.2
Cost1225
\[\begin{array}{l} \mathbf{if}\;c \leq -6.2 \cdot 10^{-115} \lor \neg \left(c \leq 1.25 \cdot 10^{+37}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \end{array} \]
Alternative 9
Error8.4
Cost1225
\[\begin{array}{l} \mathbf{if}\;c \leq -1.75 \cdot 10^{-8} \lor \neg \left(c \leq 1.75 \cdot 10^{+37}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]
Alternative 10
Error37.8
Cost1112
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := 2 \cdot \left(x \cdot y\right)\\ \mathbf{if}\;y \leq -2.85 \cdot 10^{-117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-17}:\\ \;\;\;\;\left(a \cdot i\right) \cdot \left(c \cdot -2\right)\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+46}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error9.9
Cost1092
\[\begin{array}{l} \mathbf{if}\;c \leq -3.7 \cdot 10^{-7}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - a \cdot \left(c \cdot i\right)\right)\\ \end{array} \]
Alternative 12
Error37.7
Cost972
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := 2 \cdot \left(x \cdot y\right)\\ \mathbf{if}\;x \leq -1.28 \cdot 10^{+19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{-283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-198}:\\ \;\;\;\;\left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-149}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error24.5
Cost972
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;a \leq -1.7 \cdot 10^{+166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{+58}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+182}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \end{array} \]
Alternative 14
Error23.7
Cost972
\[\begin{array}{l} \mathbf{if}\;c \leq -5.2 \cdot 10^{+89}:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -1.9 \cdot 10^{+42}:\\ \;\;\;\;\left(a \cdot i\right) \cdot \left(c \cdot -2\right)\\ \mathbf{elif}\;c \leq -3.7 \cdot 10^{-7}:\\ \;\;\;\;\left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \end{array} \]
Alternative 15
Error22.3
Cost968
\[\begin{array}{l} \mathbf{if}\;c \leq -7.5 \cdot 10^{-16}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -1.8 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \end{array} \]
Alternative 16
Error21.7
Cost836
\[\begin{array}{l} \mathbf{if}\;c \leq -4.3 \cdot 10^{-8}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \end{array} \]
Alternative 17
Error36.5
Cost585
\[\begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+19} \lor \neg \left(x \leq 9.5 \cdot 10^{-149}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
Alternative 18
Error42.7
Cost320
\[2 \cdot \left(z \cdot t\right) \]

Error

Reproduce

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