?

Average Error: 5.8 → 1.1
Time: 33.8s
Precision: binary64
Cost: 9924

?

\[ \begin{array}{c}[y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \end{array} \]
\[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := i \cdot \left(x \cdot -4\right)\\ t_4 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t_1\right) + b \cdot c\right) + t_3\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;\left(b \cdot c + \left(\frac{x}{\frac{1}{\mathsf{fma}\left(18 \cdot y, z \cdot t, i \cdot -4\right)}} + -4 \cdot \left(t \cdot a\right)\right)\right) + \left(k \cdot j\right) \cdot -27\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{+287}:\\ \;\;\;\;t_4 + t_2\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(x \cdot \left(\left(z \cdot t\right) \cdot \left(18 \cdot y\right)\right) + t_1\right)\right) + t_3\right) + t_2\\ \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (-
  (-
   (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
   (* (* x 4.0) i))
  (* (* j 27.0) k)))
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (* a -4.0)))
        (t_2 (* k (* j -27.0)))
        (t_3 (* i (* x -4.0)))
        (t_4 (+ (+ (+ (* (* (* (* x 18.0) y) z) t) t_1) (* b c)) t_3)))
   (if (<= t_4 (- INFINITY))
     (+
      (+
       (* b c)
       (+ (/ x (/ 1.0 (fma (* 18.0 y) (* z t) (* i -4.0)))) (* -4.0 (* t a))))
      (* (* k j) -27.0))
     (if (<= t_4 2e+287)
       (+ t_4 t_2)
       (+ (+ (+ (* b c) (+ (* x (* (* z t) (* 18.0 y))) t_1)) t_3) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * (a * -4.0);
	double t_2 = k * (j * -27.0);
	double t_3 = i * (x * -4.0);
	double t_4 = ((((((x * 18.0) * y) * z) * t) + t_1) + (b * c)) + t_3;
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = ((b * c) + ((x / (1.0 / fma((18.0 * y), (z * t), (i * -4.0)))) + (-4.0 * (t * a)))) + ((k * j) * -27.0);
	} else if (t_4 <= 2e+287) {
		tmp = t_4 + t_2;
	} else {
		tmp = (((b * c) + ((x * ((z * t) * (18.0 * y))) + t_1)) + t_3) + t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
end
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(a * -4.0))
	t_2 = Float64(k * Float64(j * -27.0))
	t_3 = Float64(i * Float64(x * -4.0))
	t_4 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) + t_1) + Float64(b * c)) + t_3)
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(b * c) + Float64(Float64(x / Float64(1.0 / fma(Float64(18.0 * y), Float64(z * t), Float64(i * -4.0)))) + Float64(-4.0 * Float64(t * a)))) + Float64(Float64(k * j) * -27.0));
	elseif (t_4 <= 2e+287)
		tmp = Float64(t_4 + t_2);
	else
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(x * Float64(Float64(z * t) * Float64(18.0 * y))) + t_1)) + t_3) + t_2);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(x / N[(1.0 / N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(k * j), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+287], N[(t$95$4 + t$95$2), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(x * N[(N[(z * t), $MachinePrecision] * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]]
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
t_3 := i \cdot \left(x \cdot -4\right)\\
t_4 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t_1\right) + b \cdot c\right) + t_3\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;\left(b \cdot c + \left(\frac{x}{\frac{1}{\mathsf{fma}\left(18 \cdot y, z \cdot t, i \cdot -4\right)}} + -4 \cdot \left(t \cdot a\right)\right)\right) + \left(k \cdot j\right) \cdot -27\\

\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+287}:\\
\;\;\;\;t_4 + t_2\\

\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + \left(x \cdot \left(\left(z \cdot t\right) \cdot \left(18 \cdot y\right)\right) + t_1\right)\right) + t_3\right) + t_2\\


\end{array}

Error?

Target

Original5.8
Target1.8
Herbie1.1
\[\begin{array}{l} \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;\left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - \left(a \cdot t + i \cdot x\right) \cdot 4\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - \left(a \cdot t + i \cdot x\right) \cdot 4\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - \left(a \cdot t + i \cdot x\right) \cdot 4\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \end{array} \]

Derivation?

  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) < -inf.0

    1. Initial program 64.0

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified42.3

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
      Proof

      [Start]64.0

      \[ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]

      associate--l- [=>]64.0

      \[ \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]

      associate-+l- [=>]64.0

      \[ \color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(\left(a \cdot 4\right) \cdot t - b \cdot c\right)\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]

      associate-+l- [<=]64.0

      \[ \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]

      distribute-rgt-out-- [=>]64.0

      \[ \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]

      associate-*l* [=>]42.3

      \[ \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]

      associate-*l* [=>]42.3

      \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right) \]

      associate-*l* [=>]42.3

      \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Taylor expanded in x around 0 3.6

      \[\leadsto \color{blue}{\left(c \cdot b + \left(\left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - 4 \cdot i\right) \cdot x + -4 \cdot \left(a \cdot t\right)\right)\right) - 27 \cdot \left(k \cdot j\right)} \]
    4. Applied egg-rr3.9

      \[\leadsto \left(c \cdot b + \left(\color{blue}{\frac{x}{\frac{1}{\mathsf{fma}\left(y \cdot 18, t \cdot z, i \cdot -4\right)}}} + -4 \cdot \left(a \cdot t\right)\right)\right) - 27 \cdot \left(k \cdot j\right) \]

    if -inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) < 2.0000000000000002e287

    1. Initial program 0.4

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]

    if 2.0000000000000002e287 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i))

    1. Initial program 37.6

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Taylor expanded in x around 0 12.5

      \[\leadsto \left(\left(\left(\color{blue}{18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    3. Simplified8.0

      \[\leadsto \left(\left(\left(\color{blue}{x \cdot \left(\left(18 \cdot y\right) \cdot \left(t \cdot z\right)\right)} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      Proof

      [Start]12.5

      \[ \left(\left(\left(18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right) - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]

      associate-*r* [=>]12.9

      \[ \left(\left(\left(\color{blue}{\left(18 \cdot y\right) \cdot \left(t \cdot \left(z \cdot x\right)\right)} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]

      associate-*r* [=>]9.1

      \[ \left(\left(\left(\left(18 \cdot y\right) \cdot \color{blue}{\left(\left(t \cdot z\right) \cdot x\right)} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]

      associate-*r* [=>]8.0

      \[ \left(\left(\left(\color{blue}{\left(\left(18 \cdot y\right) \cdot \left(t \cdot z\right)\right) \cdot x} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]

      *-commutative [=>]8.0

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

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

Alternatives

Alternative 1
Error1.1
Cost5320
\[\begin{array}{l} t_1 := i \cdot \left(x \cdot -4\right)\\ t_2 := t \cdot \left(a \cdot -4\right)\\ t_3 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t_2\right) + b \cdot c\right) + t_1\\ t_4 := k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\left(b \cdot c + \left(-4 \cdot \left(t \cdot a\right) + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\right)\right) + \left(k \cdot j\right) \cdot -27\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{+287}:\\ \;\;\;\;t_3 + t_4\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + \left(x \cdot \left(\left(z \cdot t\right) \cdot \left(18 \cdot y\right)\right) + t_2\right)\right) + t_1\right) + t_4\\ \end{array} \]
Alternative 2
Error32.2
Cost2156
\[\begin{array}{l} t_1 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ t_3 := \left(k \cdot j\right) \cdot -27\\ t_4 := b \cdot c + t_3\\ t_5 := t_3 + -4 \cdot \left(x \cdot i\right)\\ t_6 := b \cdot c + t_2\\ \mathbf{if}\;a \leq -8.2 \cdot 10^{+102}:\\ \;\;\;\;t_2 + t_3\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{+29}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-28}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;a \leq -5.3 \cdot 10^{-42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-108}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-192}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-217}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-179}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-104}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+43}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_6\\ \end{array} \]
Alternative 3
Error3.8
Cost2121
\[\begin{array}{l} t_1 := \left(k \cdot j\right) \cdot -27\\ \mathbf{if}\;x \leq -2.05 \cdot 10^{-144} \lor \neg \left(x \leq 6 \cdot 10^{-140}\right):\\ \;\;\;\;\left(b \cdot c + \left(-4 \cdot \left(t \cdot a\right) + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\right)\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) + t_1\\ \end{array} \]
Alternative 4
Error1.8
Cost2121
\[\begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+36} \lor \neg \left(t \leq 1.2 \cdot 10^{-22}\right):\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\right) + \left(j \cdot \left(k \cdot -27\right) - x \cdot \left(4 \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + \left(-4 \cdot \left(t \cdot a\right) + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\right)\right) + \left(k \cdot j\right) \cdot -27\\ \end{array} \]
Alternative 5
Error32.8
Cost2028
\[\begin{array}{l} t_1 := b \cdot c - x \cdot \left(4 \cdot i\right)\\ t_2 := \left(k \cdot j\right) \cdot -27\\ t_3 := -4 \cdot \left(t \cdot a\right) + t_2\\ \mathbf{if}\;c \leq -3.5 \cdot 10^{-134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{-197}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{-107}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.55 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.3 \cdot 10^{-31}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.8 \cdot 10^{+39}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{+135}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 2.15 \cdot 10^{+226}:\\ \;\;\;\;b \cdot c + t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error23.1
Cost2018
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := \left(k \cdot j\right) \cdot -27\\ t_3 := b \cdot c + \left(t_2 + -4 \cdot \left(x \cdot i\right)\right)\\ t_4 := \left(b \cdot c + t_1\right) + t_2\\ \mathbf{if}\;c \leq -2.05 \cdot 10^{-297}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 4.5 \cdot 10^{-196}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 1.26 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{-117}:\\ \;\;\;\;t_1 + t_2\\ \mathbf{elif}\;c \leq 7.6 \cdot 10^{-60} \lor \neg \left(c \leq 1.7 \cdot 10^{+34}\right) \land \left(c \leq 2.8 \cdot 10^{+66} \lor \neg \left(c \leq 3.5 \cdot 10^{+216}\right)\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 7
Error22.8
Cost2017
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := \left(k \cdot j\right) \cdot -27\\ t_3 := t_1 + j \cdot \left(k \cdot -27\right)\\ t_4 := b \cdot c + \left(t_2 + -4 \cdot \left(x \cdot i\right)\right)\\ t_5 := t_1 + t_2\\ \mathbf{if}\;c \leq -2.4 \cdot 10^{-297}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{-196}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq 1.26 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;c \leq 4.1 \cdot 10^{-115}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 2.3 \cdot 10^{-58}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 1.05 \cdot 10^{+33}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{+67} \lor \neg \left(c \leq 3.5 \cdot 10^{+216}\right):\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 8
Error7.9
Cost2000
\[\begin{array}{l} t_1 := \left(k \cdot j\right) \cdot -27\\ t_2 := \left(b \cdot c + -4 \cdot \left(t \cdot a + x \cdot i\right)\right) + t_1\\ t_3 := \left(b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\right) + t_1\\ \mathbf{if}\;x \leq -5.6 \cdot 10^{+60}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -6.2 \cdot 10^{-266}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-139}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) + t_1\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+78}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 9
Error7.9
Cost2000
\[\begin{array}{l} t_1 := \left(k \cdot j\right) \cdot -27\\ t_2 := \left(b \cdot c + -4 \cdot \left(t \cdot a + x \cdot i\right)\right) + t_1\\ t_3 := b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{if}\;x \leq -2.15 \cdot 10^{+60}:\\ \;\;\;\;t_3 + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-266}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-139}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) + t_1\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+78}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3 + t_1\\ \end{array} \]
Alternative 10
Error46.0
Cost1772
\[\begin{array}{l} t_1 := \left(k \cdot j\right) \cdot -27\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;a \leq -8 \cdot 10^{+117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{+45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{-103}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-217}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-193}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-116}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq 18500000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+131}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.52 \cdot 10^{+240}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error46.0
Cost1772
\[\begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := \left(k \cdot j\right) \cdot -27\\ t_3 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;a \leq -8.5 \cdot 10^{+117}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -3 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-146}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-217}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-116}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq 23000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+131}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+165}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.52 \cdot 10^{+240}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 12
Error46.0
Cost1772
\[\begin{array}{l} t_1 := \left(k \cdot j\right) \cdot -27\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;a \leq -2.4 \cdot 10^{+117}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{+45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-146}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-192}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-217}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-189}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-116}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq 11000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.76 \cdot 10^{+131}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.62 \cdot 10^{+240}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 13
Error23.3
Cost1753
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := \left(k \cdot j\right) \cdot -27\\ t_3 := b \cdot c + \left(t_2 + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{if}\;k \leq -6 \cdot 10^{-202}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq -3.7 \cdot 10^{-257}:\\ \;\;\;\;b \cdot c + t_1\\ \mathbf{elif}\;k \leq 1.75 \cdot 10^{-249}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 3.1 \cdot 10^{-211}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;k \leq 3700 \lor \neg \left(k \leq 2.6 \cdot 10^{+43}\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1 + t_2\\ \end{array} \]
Alternative 14
Error44.7
Cost1640
\[\begin{array}{l} t_1 := x \cdot \left(i \cdot -4\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ t_3 := k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;c \leq -4.3 \cdot 10^{-22}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq -3.3 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.65 \cdot 10^{-202}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 10^{-141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.68 \cdot 10^{-112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 2.5 \cdot 10^{-58}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;c \leq 13200000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{+93}:\\ \;\;\;\;\left(k \cdot j\right) \cdot -27\\ \mathbf{elif}\;c \leq 4 \cdot 10^{+172}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 5 \cdot 10^{+192}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 15
Error31.7
Cost1632
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := b \cdot c + t_1\\ t_3 := \left(k \cdot j\right) \cdot -27\\ t_4 := b \cdot c + t_3\\ t_5 := t_3 + -4 \cdot \left(x \cdot i\right)\\ t_6 := b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{if}\;c \leq -3.7 \cdot 10^{-134}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{-134}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{-107}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 4.9 \cdot 10^{-58}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq 3600000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 3.3 \cdot 10^{+102}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{+135}:\\ \;\;\;\;t_1 + t_3\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{+223}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_6\\ \end{array} \]
Alternative 16
Error30.7
Cost1501
\[\begin{array}{l} t_1 := b \cdot c - x \cdot \left(4 \cdot i\right)\\ t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_3 := b \cdot c + \left(k \cdot j\right) \cdot -27\\ \mathbf{if}\;k \leq -2.65 \cdot 10^{-182}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq -1.14 \cdot 10^{-256}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq -1.55 \cdot 10^{-292}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 6.4 \cdot 10^{-298}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 1.05 \cdot 10^{-44} \lor \neg \left(k \leq 9.6 \cdot 10^{+120}\right) \land k \leq 2.6 \cdot 10^{+160}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 17
Error10.8
Cost1481
\[\begin{array}{l} \mathbf{if}\;k \leq 8 \cdot 10^{-245} \lor \neg \left(k \leq 3.1 \cdot 10^{-211}\right):\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a + x \cdot i\right)\right) + \left(k \cdot j\right) \cdot -27\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \end{array} \]
Alternative 18
Error34.7
Cost1104
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;k \leq -9 \cdot 10^{-52}:\\ \;\;\;\;\left(k \cdot j\right) \cdot -27\\ \mathbf{elif}\;k \leq 2.1 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 1.3 \cdot 10^{-206}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;k \leq 1.08 \cdot 10^{+159}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]
Alternative 19
Error31.5
Cost1104
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := b \cdot c + \left(k \cdot j\right) \cdot -27\\ \mathbf{if}\;k \leq -2.65 \cdot 10^{-182}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 1.35 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 5.1 \cdot 10^{-205}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;k \leq 4.8 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 20
Error44.1
Cost849
\[\begin{array}{l} \mathbf{if}\;c \leq -3.5 \cdot 10^{-134}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 2.55 \cdot 10^{+19} \lor \neg \left(c \leq 2.4 \cdot 10^{+55}\right) \land c \leq 2 \cdot 10^{+93}:\\ \;\;\;\;\left(k \cdot j\right) \cdot -27\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 21
Error48.5
Cost192
\[b \cdot c \]

Error

Reproduce?

herbie shell --seed 2023039 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :herbie-target
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))