?

Average Accuracy: 91.1% → 92.4%
Time: 52.0s
Precision: binary64
Cost: 14153

?

\[ \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} \mathbf{if}\;t \leq -1.85 \cdot 10^{-6} \lor \neg \left(t \leq 10^{-135}\right):\\ \;\;\;\;\left(\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) + 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}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot -4, t, b \cdot c - \mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\\ \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
 (if (or (<= t -1.85e-6) (not (<= t 1e-135)))
   (+
    (+
     (+ (+ (* t (* (* (* x 18.0) y) z)) (* t (* a -4.0))) (* b c))
     (* i (* x -4.0)))
    (* k (* j -27.0)))
   (fma (* a -4.0) t (- (* b c) (fma 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) {
	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 tmp;
	if ((t <= -1.85e-6) || !(t <= 1e-135)) {
		tmp = ((((t * (((x * 18.0) * y) * z)) + (t * (a * -4.0))) + (b * c)) + (i * (x * -4.0))) + (k * (j * -27.0));
	} else {
		tmp = fma((a * -4.0), t, ((b * c) - fma(x, (4.0 * i), (j * (27.0 * k)))));
	}
	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)
	tmp = 0.0
	if ((t <= -1.85e-6) || !(t <= 1e-135))
		tmp = Float64(Float64(Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * y) * z)) + Float64(t * Float64(a * -4.0))) + Float64(b * c)) + Float64(i * Float64(x * -4.0))) + Float64(k * Float64(j * -27.0)));
	else
		tmp = fma(Float64(a * -4.0), t, Float64(Float64(b * c) - fma(x, Float64(4.0 * i), Float64(j * Float64(27.0 * k)))));
	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_] := If[Or[LessEqual[t, -1.85e-6], N[Not[LessEqual[t, 1e-135]], $MachinePrecision]], N[(N[(N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * -4.0), $MachinePrecision] * t + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-6} \lor \neg \left(t \leq 10^{-135}\right):\\
\;\;\;\;\left(\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) + 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}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot -4, t, b \cdot c - \mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\\


\end{array}

Error?

Target

Original91.1%
Target97.5%
Herbie92.4%
\[\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 2 regimes
  2. if t < -1.8500000000000001e-6 or 1e-135 < t

    1. Initial program 95.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 \]

    if -1.8500000000000001e-6 < t < 1e-135

    1. Initial program 86.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 \]
    2. Simplified85.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]86.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 \]

      associate--l- [=>]86.4

      \[ \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- [=>]86.4

      \[ \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- [<=]86.4

      \[ \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-- [=>]86.4

      \[ \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* [=>]85.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* [=>]85.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* [=>]85.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 89.2%

      \[\leadsto \left(\color{blue}{-4 \cdot \left(a \cdot t\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    4. Simplified89.1%

      \[\leadsto \left(\color{blue}{t \cdot \left(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]89.2

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

      *-commutative [=>]89.2

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

      *-commutative [=>]89.2

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

      associate-*r* [<=]89.1

      \[ \left(\color{blue}{t \cdot \left(a \cdot -4\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Applied egg-rr89.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot -4, t, b \cdot c - \mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)} \]
      Proof

      [Start]89.1

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

      associate--l+ [=>]89.1

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

      *-commutative [=>]89.1

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

      fma-def [=>]89.1

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

      fma-def [=>]89.1

      \[ \mathsf{fma}\left(a \cdot -4, t, b \cdot c - \color{blue}{\mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{-6} \lor \neg \left(t \leq 10^{-135}\right):\\ \;\;\;\;\left(\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) + 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}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot -4, t, b \cdot c - \mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy49.9%
Cost2424
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := t_2 + x \cdot \left(i \cdot -4\right)\\ t_4 := b \cdot c + -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;b \leq -6.9 \cdot 10^{+131}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq -1.16 \cdot 10^{+97}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \leq -1.3 \cdot 10^{+61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.3 \cdot 10^{-23}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -2.15 \cdot 10^{-57}:\\ \;\;\;\;b \cdot c + t_2\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-80}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \leq -1.08 \cdot 10^{-106}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \leq -3.8 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.1 \cdot 10^{-150}:\\ \;\;\;\;t_2 + 18 \cdot \left(y \cdot \left(x \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-185}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -5.5 \cdot 10^{-287}:\\ \;\;\;\;t_2 + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \leq -1.55 \cdot 10^{-302}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;b \leq 8.4 \cdot 10^{-222}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 2.95 \cdot 10^{-162}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 2
Accuracy50.5%
Cost2288
\[\begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_3 := t_1 + x \cdot \left(i \cdot -4\right)\\ t_4 := -4 \cdot \left(t \cdot a\right)\\ t_5 := b \cdot c + t_4\\ \mathbf{if}\;j \leq -7.8 \cdot 10^{+238}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -8.2 \cdot 10^{+210}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq -3.8 \cdot 10^{+66}:\\ \;\;\;\;b \cdot c + t_1\\ \mathbf{elif}\;j \leq -1.7 \cdot 10^{+29}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -2.7 \cdot 10^{-58}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq -4.8 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{elif}\;j \leq -3.7 \cdot 10^{-212}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq 9 \cdot 10^{-283}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 1.95 \cdot 10^{-186}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{-161}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq 2.9 \cdot 10^{-70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 5.5 \cdot 10^{+58}:\\ \;\;\;\;t_4 + -27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Accuracy49.9%
Cost2288
\[\begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_3 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_4 := t_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{if}\;j \leq -5.5 \cdot 10^{+238}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -8.2 \cdot 10^{+210}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -1.12 \cdot 10^{+68}:\\ \;\;\;\;b \cdot c + t_1\\ \mathbf{elif}\;j \leq -1.12 \cdot 10^{+29}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;j \leq -4.6 \cdot 10^{-56}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -5.5 \cdot 10^{-80}:\\ \;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{elif}\;j \leq -4.1 \cdot 10^{-212}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 8.5 \cdot 10^{-282}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 1.25 \cdot 10^{-186}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 4.6 \cdot 10^{-163}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 8 \cdot 10^{-120}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;j \leq 4.8 \cdot 10^{-76}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 4
Accuracy92.4%
Cost2249
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{-6} \lor \neg \left(t \leq 1.85 \cdot 10^{-137}\right):\\ \;\;\;\;\left(\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) + t_1\right) + b \cdot c\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t_1\right) + \left(j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\right)\\ \end{array} \]
Alternative 5
Accuracy61.9%
Cost2148
\[\begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_3 := t_2 + t_1\\ \mathbf{if}\;j \leq -5.7 \cdot 10^{+63}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -2.4 \cdot 10^{+30}:\\ \;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;j \leq -2 \cdot 10^{-59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -6.2 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{elif}\;j \leq -4.2 \cdot 10^{-211}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 2.1 \cdot 10^{-283}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 2 \cdot 10^{-186}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 1.4 \cdot 10^{-162}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 8 \cdot 10^{-122}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Accuracy92.4%
Cost2121
\[\begin{array}{l} \mathbf{if}\;t \leq -0.00044 \lor \neg \left(t \leq 4.8 \cdot 10^{-78}\right):\\ \;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right) + b \cdot c\right) + \left(j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(-4 \cdot \left(x \cdot i\right) + \left(-4 \cdot \left(t \cdot a\right) + -27 \cdot \left(j \cdot k\right)\right)\right)\\ \end{array} \]
Alternative 7
Accuracy50.6%
Cost2024
\[\begin{array}{l} t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_3 := k \cdot \left(j \cdot -27\right)\\ t_4 := t_3 + x \cdot \left(i \cdot -4\right)\\ \mathbf{if}\;j \leq -3.1 \cdot 10^{+238}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;j \leq -8.2 \cdot 10^{+210}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -6.4 \cdot 10^{+68}:\\ \;\;\;\;b \cdot c + t_3\\ \mathbf{elif}\;j \leq -2 \cdot 10^{+29}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;j \leq -6.2 \cdot 10^{-212}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 2.2 \cdot 10^{-285}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 1.8 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 8 \cdot 10^{-162}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 2.3 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{+58}:\\ \;\;\;\;t_3 + a \cdot \left(t \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 8
Accuracy50.7%
Cost2024
\[\begin{array}{l} t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := t_2 + x \cdot \left(i \cdot -4\right)\\ t_4 := -4 \cdot \left(t \cdot a\right)\\ t_5 := b \cdot c + t_4\\ \mathbf{if}\;j \leq -3.1 \cdot 10^{+238}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -8.2 \cdot 10^{+210}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq -2.45 \cdot 10^{+67}:\\ \;\;\;\;b \cdot c + t_2\\ \mathbf{elif}\;j \leq -1.5 \cdot 10^{+30}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -6.5 \cdot 10^{-212}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq 1.8 \cdot 10^{-285}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 1.58 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 6.8 \cdot 10^{-162}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq 2.55 \cdot 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 2.3 \cdot 10^{+58}:\\ \;\;\;\;t_4 + -27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 9
Accuracy50.8%
Cost2024
\[\begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_3 := t_1 + x \cdot \left(i \cdot -4\right)\\ t_4 := -4 \cdot \left(t \cdot a\right)\\ t_5 := b \cdot c + t_4\\ \mathbf{if}\;j \leq -3.1 \cdot 10^{+238}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -6.8 \cdot 10^{+210}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq -1.04 \cdot 10^{+67}:\\ \;\;\;\;b \cdot c + t_1\\ \mathbf{elif}\;j \leq -1.7 \cdot 10^{+30}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -1.3 \cdot 10^{-211}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq 8.8 \cdot 10^{-277}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 1.6 \cdot 10^{-186}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 1.2 \cdot 10^{-159}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;j \leq 4.3 \cdot 10^{-71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 9.6 \cdot 10^{+58}:\\ \;\;\;\;t_4 + -27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 10
Accuracy49.4%
Cost1899
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ t_2 := b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;b \leq -5.3 \cdot 10^{+131}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2 \cdot 10^{+109}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{+63}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{+43} \lor \neg \left(b \leq -2.75 \cdot 10^{-5}\right) \land \left(b \leq -6.2 \cdot 10^{-28} \lor \neg \left(b \leq -2.3 \cdot 10^{-58}\right) \land \left(b \leq -8.5 \cdot 10^{-128} \lor \neg \left(b \leq -4.6 \cdot 10^{-152}\right) \land b \leq 1.2 \cdot 10^{-160}\right)\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Accuracy52.7%
Cost1632
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_3 := b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;j \leq -2 \cdot 10^{+37}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -1.05 \cdot 10^{-13}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -3.8 \cdot 10^{-212}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 3.4 \cdot 10^{-283}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 1.55 \cdot 10^{-186}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 6.5 \cdot 10^{-162}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 8.5 \cdot 10^{-104}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 8.8 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 12
Accuracy52.3%
Cost1628
\[\begin{array}{l} t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;j \leq -5.7 \cdot 10^{+36}:\\ \;\;\;\;b \cdot c + t_2\\ \mathbf{elif}\;j \leq -6.8 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -6.8 \cdot 10^{-211}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 2.2 \cdot 10^{-283}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 1.65 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 2 \cdot 10^{-158}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 1.9 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2 + a \cdot \left(t \cdot -4\right)\\ \end{array} \]
Alternative 13
Accuracy77.3%
Cost1608
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := -4 \cdot \left(x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+70}:\\ \;\;\;\;b \cdot c + t_2\\ \mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{-10}:\\ \;\;\;\;t_1 + t_2\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t_1\right) + k \cdot \left(j \cdot -27\right)\\ \end{array} \]
Alternative 14
Accuracy77.3%
Cost1608
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+70}:\\ \;\;\;\;b \cdot c + \left(t_2 - 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{-10}:\\ \;\;\;\;t_2 + \left(t_1 + -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t_1\right) + k \cdot \left(j \cdot -27\right)\\ \end{array} \]
Alternative 15
Accuracy46.1%
Cost1500
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_3 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -4.5 \cdot 10^{+239}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -2.6 \cdot 10^{+205}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -4.5 \cdot 10^{+160}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -52000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -2.9 \cdot 10^{-211}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -1.95 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 4.5 \cdot 10^{-58}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 16
Accuracy72.5%
Cost1490
\[\begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;i \leq -3.15 \cdot 10^{+88} \lor \neg \left(i \leq 1.5 \cdot 10^{-98} \lor \neg \left(i \leq 1.1 \cdot 10^{+57}\right) \land i \leq 1.1 \cdot 10^{+97}\right):\\ \;\;\;\;t_1 + \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) + t_1\\ \end{array} \]
Alternative 17
Accuracy30.8%
Cost1376
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -3.5 \cdot 10^{+239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -8.2 \cdot 10^{+210}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;j \leq -3.35 \cdot 10^{+152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -7.5 \cdot 10^{+99}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -7.2 \cdot 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -6.6 \cdot 10^{-212}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 4.2 \cdot 10^{-226}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 9.5 \cdot 10^{-70}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Accuracy30.8%
Cost1376
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -3.5 \cdot 10^{+239}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -8.2 \cdot 10^{+210}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;j \leq -3.35 \cdot 10^{+152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.2 \cdot 10^{+98}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -1.28 \cdot 10^{+39}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;j \leq -6.2 \cdot 10^{-212}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 6.2 \cdot 10^{-226}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 8.2 \cdot 10^{-70}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Accuracy42.5%
Cost1368
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -3.7 \cdot 10^{+239}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -7.8 \cdot 10^{+210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.05 \cdot 10^{+167}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -2 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -4.2 \cdot 10^{-185}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 3.1 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 20
Accuracy85.2%
Cost1344
\[b \cdot c + \left(-4 \cdot \left(x \cdot i\right) + \left(-4 \cdot \left(t \cdot a\right) + -27 \cdot \left(j \cdot k\right)\right)\right) \]
Alternative 21
Accuracy72.9%
Cost1225
\[\begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{-99} \lor \neg \left(t \leq 8.5 \cdot 10^{+61}\right):\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(-4 \cdot \left(x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\right)\\ \end{array} \]
Alternative 22
Accuracy31.8%
Cost1112
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -3.4 \cdot 10^{+152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -8.2 \cdot 10^{+98}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -1.6 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -3.9 \cdot 10^{-212}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 2.6 \cdot 10^{-226}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 9.6 \cdot 10^{-70}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 23
Accuracy32.4%
Cost850
\[\begin{array}{l} \mathbf{if}\;j \leq -3.35 \cdot 10^{+152} \lor \neg \left(j \leq -1.5 \cdot 10^{+97} \lor \neg \left(j \leq -1.7 \cdot 10^{+39}\right) \land j \leq 9.6 \cdot 10^{-70}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 24
Accuracy24.9%
Cost192
\[b \cdot c \]

Error

Reproduce?

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