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

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

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


\end{array}

Error

Target

Original6.3
Target2.0
Herbie1.8
\[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. Simplified11.5

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

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

      sub-neg [=>]64.0

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

      +-commutative [=>]64.0

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

      associate-*l* [=>]11.5

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

      distribute-lft-neg-in [=>]11.5

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

      fma-def [=>]11.5

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

      +-commutative [=>]11.5

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

      fma-def [=>]11.5

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

      fma-def [=>]11.5

      \[ 2 \cdot \mathsf{fma}\left(-\mathsf{fma}\left(b, c, a\right), c \cdot i, \color{blue}{\mathsf{fma}\left(x, y, z \cdot t\right)}\right) \]
    3. Taylor expanded in a around 0 39.3

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

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

      [Start]39.3

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

      fma-def [=>]39.3

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

      +-commutative [=>]39.3

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

      fma-def [=>]39.3

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

      mul-1-neg [=>]39.3

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

      fma-neg [<=]39.3

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

      unpow2 [=>]39.3

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

      associate-*l* [=>]18.0

      \[ 2 \cdot \mathsf{fma}\left(y, x, t \cdot z - \color{blue}{c \cdot \left(c \cdot \left(i \cdot b\right)\right)}\right) \]
    5. Taylor expanded in t around 0 43.6

      \[\leadsto 2 \cdot \mathsf{fma}\left(y, x, \color{blue}{-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right)}\right) \]
    6. Simplified21.1

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

      [Start]43.6

      \[ 2 \cdot \mathsf{fma}\left(y, x, -1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right)\right) \]

      associate-*r* [=>]43.6

      \[ 2 \cdot \mathsf{fma}\left(y, x, \color{blue}{\left(-1 \cdot {c}^{2}\right) \cdot \left(i \cdot b\right)}\right) \]

      *-commutative [=>]43.6

      \[ 2 \cdot \mathsf{fma}\left(y, x, \color{blue}{\left(i \cdot b\right) \cdot \left(-1 \cdot {c}^{2}\right)}\right) \]

      unpow2 [=>]43.6

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

      associate-*r* [=>]43.6

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

      neg-mul-1 [<=]43.6

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

      associate-*l* [<=]26.0

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

      *-commutative [<=]26.0

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

      *-commutative [=>]26.0

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

      associate-*l* [=>]21.1

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

    if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 4e176

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

    1. Initial program 28.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. Applied egg-rr5.6

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

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

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

Alternatives

Alternative 1
Error2.3
Cost2760
\[\begin{array}{l} t_1 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;2 \cdot \left(y \cdot x - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+177}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + y \cdot x\right) - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + \left(y \cdot x - \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right) + a \cdot \left(c \cdot i\right)\right)\right)\right)\\ \end{array} \]
Alternative 2
Error2.6
Cost2504
\[\begin{array}{l} t_1 := \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;2 \cdot \left(y \cdot x - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+294}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + y \cdot x\right) - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot \left(a \cdot i\right) + c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \end{array} \]
Alternative 3
Error24.0
Cost2156
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + y \cdot x\right)\\ t_2 := 2 \cdot \left(y \cdot x - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ t_3 := 2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ t_4 := i \cdot \left(a \cdot c\right)\\ t_5 := 2 \cdot \left(y \cdot x - t_4\right)\\ \mathbf{if}\;a \leq -4.1 \cdot 10^{+246}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{+179}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+98}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-153}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+52}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_4\right)\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+155}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 4
Error14.1
Cost2013
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + \left(y \cdot x - i \cdot \left(a \cdot c\right)\right)\right)\\ \mathbf{if}\;b \leq -1.12 \cdot 10^{+168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{+110}:\\ \;\;\;\;2 \cdot \left(y \cdot x - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \mathbf{elif}\;b \leq -1.4 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{+55}:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-29} \lor \neg \left(b \leq 6.2 \cdot 10^{+77}\right) \land b \leq 3.1 \cdot 10^{+163}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + y \cdot x\right) - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error23.2
Cost1892
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + y \cdot x\right)\\ t_2 := b \cdot \left(c \cdot \left(c \cdot i\right)\right)\\ t_3 := 2 \cdot \left(y \cdot x - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{if}\;a \leq -5 \cdot 10^{+246}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{+173}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -4 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+97}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-109}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{-145}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-36}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_2\right)\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+34}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Error23.1
Cost1892
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + y \cdot x\right)\\ t_2 := 2 \cdot \left(y \cdot x - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{if}\;a \leq -1.25 \cdot 10^{+247}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{+174}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.62 \cdot 10^{+128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+98}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-109}:\\ \;\;\;\;2 \cdot \left(y \cdot x - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.36 \cdot 10^{-36}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error13.4
Cost1880
\[\begin{array}{l} t_1 := z \cdot t + y \cdot x\\ t_2 := 2 \cdot \left(z \cdot t + \left(y \cdot x - i \cdot \left(a \cdot c\right)\right)\right)\\ \mathbf{if}\;b \leq -1.12 \cdot 10^{+168}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{+110}:\\ \;\;\;\;2 \cdot \left(y \cdot x - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \mathbf{elif}\;b \leq -1.05 \cdot 10^{+70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{+55}:\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(t_1 - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+103}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\ \end{array} \]
Alternative 8
Error22.3
Cost1628
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + y \cdot x\right)\\ t_2 := \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ t_3 := 2 \cdot \left(y \cdot x - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{if}\;a \leq -1.08 \cdot 10^{+249}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{+177}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{+97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+34}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 9
Error15.4
Cost1489
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + \left(y \cdot x - i \cdot \left(a \cdot c\right)\right)\right)\\ \mathbf{if}\;b \leq -1.12 \cdot 10^{+168}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{+110}:\\ \;\;\;\;2 \cdot \left(y \cdot x - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+19} \lor \neg \left(b \leq 5.6 \cdot 10^{+193}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]
Alternative 10
Error37.9
Cost1368
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+79}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9500:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-73}:\\ \;\;\;\;\left(i \cdot \left(a \cdot c\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-148}:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-88}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error23.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(z \cdot t + y \cdot x\right)\\ \mathbf{if}\;y \leq -1.3 \cdot 10^{-76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-281}:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error19.7
Cost1225
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+21} \lor \neg \left(z \cdot t \leq 10^{+37}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t + y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(y \cdot x - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]
Alternative 13
Error9.1
Cost1225
\[\begin{array}{l} \mathbf{if}\;c \leq -3.1 \cdot 10^{+63} \lor \neg \left(c \leq 1.45 \cdot 10^{+119}\right):\\ \;\;\;\;2 \cdot \left(y \cdot x - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + \left(y \cdot x - i \cdot \left(a \cdot c\right)\right)\right)\\ \end{array} \]
Alternative 14
Error37.1
Cost1112
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -4.1 \cdot 10^{+80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -26000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-73}:\\ \;\;\;\;a \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-167}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error37.1
Cost1112
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -27000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-73}:\\ \;\;\;\;\left(c \cdot \left(a \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-167}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error24.7
Cost1105
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + y \cdot x\right)\\ \mathbf{if}\;y \leq -3.1 \cdot 10^{-184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-237}:\\ \;\;\;\;a \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-280} \lor \neg \left(y \leq 7.2 \cdot 10^{-267}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \end{array} \]
Alternative 17
Error37.2
Cost980
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -3 \cdot 10^{+79}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1750:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-73}:\\ \;\;\;\;\left(i \cdot \left(a \cdot c\right)\right) \cdot -2\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-167}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 18
Error22.3
Cost969
\[\begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-77} \lor \neg \left(y \leq 10^{-18}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t + y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \end{array} \]
Alternative 19
Error36.0
Cost850
\[\begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{+195} \lor \neg \left(x \leq -8 \cdot 10^{+175} \lor \neg \left(x \leq -3.7 \cdot 10^{-33}\right) \land x \leq 6.2 \cdot 10^{-93}\right):\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
Alternative 20
Error42.1
Cost320
\[2 \cdot \left(z \cdot t\right) \]
Alternative 21
Error62.2
Cost64
\[0 \]

Error

Reproduce

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