Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E

?

Percentage Accurate: 85.1% → 91.0%
Time: 33.6s
Precision: binary64
Cost: 28612

?

\[ \begin{array}{c}[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 := \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) - \left(x \cdot 4\right) \cdot i\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{+294}:\\ \;\;\;\;t_1 - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\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
 (let* ((t_1
         (-
          (+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
          (* (* x 4.0) i))))
   (if (<= t_1 5e+294)
     (- t_1 (* (* j 27.0) k))
     (fma
      x
      (fma 18.0 (* t (* y z)) (* i -4.0))
      (fma t (* a -4.0) (fma b c (* k (* j -27.0))))))))
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 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
	double tmp;
	if (t_1 <= 5e+294) {
		tmp = t_1 - ((j * 27.0) * k);
	} else {
		tmp = fma(x, fma(18.0, (t * (y * z)), (i * -4.0)), fma(t, (a * -4.0), fma(b, c, (k * (j * -27.0)))));
	}
	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(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i))
	tmp = 0.0
	if (t_1 <= 5e+294)
		tmp = Float64(t_1 - Float64(Float64(j * 27.0) * k));
	else
		tmp = fma(x, fma(18.0, Float64(t * Float64(y * z)), Float64(i * -4.0)), fma(t, Float64(a * -4.0), fma(b, c, Float64(k * Float64(j * -27.0)))));
	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[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+294], N[(t$95$1 - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c + N[(k * N[(j * -27.0), $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}
t_1 := \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) - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;t_1 - \left(j \cdot 27\right) \cdot k\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\right)\right)\right)\\


\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 26 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Bogosity?

Bogosity

Target

Original85.1%
Target88.7%
Herbie91.0%
\[\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 (-.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)) < 4.9999999999999999e294

    1. Initial program 97.1%

      \[\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 4.9999999999999999e294 < (-.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 58.2%

      \[\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.6%

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

      [Start]58.2%

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

      sub-neg [=>]58.2%

      \[ \color{blue}{\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(-\left(x \cdot 4\right) \cdot i\right)\right)} - \left(j \cdot 27\right) \cdot k \]

      +-commutative [=>]58.2%

      \[ \color{blue}{\left(\left(-\left(x \cdot 4\right) \cdot i\right) + \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)\right)} - \left(j \cdot 27\right) \cdot k \]

      sub-neg [=>]58.2%

      \[ \left(\left(-\left(x \cdot 4\right) \cdot i\right) + \left(\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\right)\right)} + b \cdot c\right)\right) - \left(j \cdot 27\right) \cdot k \]

      associate-+l+ [=>]58.2%

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

      associate-+r+ [=>]58.2%

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

      associate--l+ [=>]58.2%

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

      +-commutative [<=]58.2%

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

      sub-neg [<=]58.2%

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

    \[\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) - \left(x \cdot 4\right) \cdot i \leq 5 \cdot 10^{+294}:\\ \;\;\;\;\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) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\right)\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy91.0%
Cost28612
\[\begin{array}{l} t_1 := \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) - \left(x \cdot 4\right) \cdot i\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{+294}:\\ \;\;\;\;t_1 - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\right)\right)\right)\\ \end{array} \]
Alternative 2
Accuracy91.1%
Cost28612
\[\begin{array}{l} t_1 := \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) - \left(x \cdot 4\right) \cdot i\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{+294}:\\ \;\;\;\;t_1 - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), b \cdot c\right)\right)\right)\\ \end{array} \]
Alternative 3
Accuracy89.4%
Cost9796
\[\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) - \left(x \cdot 4\right) \cdot i \leq \infty:\\ \;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \mathsf{fma}\left(x, 4 \cdot i, \left(j \cdot 27\right) \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]
Alternative 4
Accuracy91.6%
Cost4036
\[\begin{array}{l} t_1 := \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) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]
Alternative 5
Accuracy82.2%
Cost2636
\[\begin{array}{l} t_1 := b \cdot c + \left(x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+92}:\\ \;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+232}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]
Alternative 6
Accuracy81.8%
Cost2636
\[\begin{array}{l} t_1 := 4 \cdot \left(x \cdot i\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+33}:\\ \;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - t_1\right) - t_2\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+92}:\\ \;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - t_1\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+232}:\\ \;\;\;\;b \cdot c + \left(x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]
Alternative 7
Accuracy86.0%
Cost1988
\[\begin{array}{l} \mathbf{if}\;z \leq 5.7 \cdot 10^{+209}:\\ \;\;\;\;\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)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\right)\\ \end{array} \]
Alternative 8
Accuracy32.7%
Cost1764
\[\begin{array}{l} t_1 := \left(18 \cdot \left(y \cdot z\right)\right) \cdot \left(x \cdot t\right)\\ t_2 := t \cdot \left(a \cdot -4\right)\\ t_3 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;j \leq -4.2 \cdot 10^{+50}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -3 \cdot 10^{+29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -2.9 \cdot 10^{-31}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -9 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -6.6 \cdot 10^{-183}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -9 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -4.8 \cdot 10^{-243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 5.3 \cdot 10^{-307}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 1.8 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
Alternative 9
Accuracy32.8%
Cost1764
\[\begin{array}{l} t_1 := \left(18 \cdot \left(y \cdot z\right)\right) \cdot \left(x \cdot t\right)\\ t_2 := t \cdot \left(a \cdot -4\right)\\ t_3 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;j \leq -4.3 \cdot 10^{+55}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -2.3 \cdot 10^{+29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -3.2 \cdot 10^{-31}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -9.5 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -2.9 \cdot 10^{-183}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -5.5 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -5.5 \cdot 10^{-243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 3.2 \cdot 10^{-306}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 5.8 \cdot 10^{+76}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(y \cdot \left(18 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
Alternative 10
Accuracy32.6%
Cost1764
\[\begin{array}{l} t_1 := \left(18 \cdot \left(y \cdot z\right)\right) \cdot \left(x \cdot t\right)\\ t_2 := t \cdot \left(a \cdot -4\right)\\ t_3 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;j \leq -1.1 \cdot 10^{+51}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -1.45 \cdot 10^{+29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -1.65 \cdot 10^{-31}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -8.5 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.25 \cdot 10^{-182}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -1.25 \cdot 10^{-210}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -5.8 \cdot 10^{-243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 1.6 \cdot 10^{-306}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 2.2 \cdot 10^{+77}:\\ \;\;\;\;\left(x \cdot 18\right) \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
Alternative 11
Accuracy82.2%
Cost1737
\[\begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+123} \lor \neg \left(a \leq 1.65 \cdot 10^{-36}\right):\\ \;\;\;\;\left(b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\right)\\ \end{array} \]
Alternative 12
Accuracy84.5%
Cost1737
\[\begin{array}{l} \mathbf{if}\;t \leq -2.15 \cdot 10^{-91} \lor \neg \left(t \leq 2.65 \cdot 10^{-70}\right):\\ \;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\right)\\ \end{array} \]
Alternative 13
Accuracy75.1%
Cost1609
\[\begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-81} \lor \neg \left(z \leq 8 \cdot 10^{+209}\right):\\ \;\;\;\;b \cdot c + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
Alternative 14
Accuracy32.7%
Cost1368
\[\begin{array}{l} t_1 := 18 \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot t\right)\right)\\ \mathbf{if}\;j \leq -5.5 \cdot 10^{+54}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -2.5 \cdot 10^{+29}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;j \leq -2.3 \cdot 10^{-31}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -9.5 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 3.35 \cdot 10^{-307}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 2.6 \cdot 10^{+75}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
Alternative 15
Accuracy50.0%
Cost1364
\[\begin{array}{l} t_1 := b \cdot c + -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -4.5 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 3.25 \cdot 10^{-208}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 2.6 \cdot 10^{-158}:\\ \;\;\;\;18 \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;j \leq 10^{-74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 3.1 \cdot 10^{-46}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(y \cdot \left(18 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]
Alternative 16
Accuracy57.6%
Cost1360
\[\begin{array}{l} t_1 := b \cdot c + -27 \cdot \left(j \cdot k\right)\\ t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{-18}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.55 \cdot 10^{-302}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-211}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+16}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 17
Accuracy58.1%
Cost1360
\[\begin{array}{l} t_1 := b \cdot c + -27 \cdot \left(j \cdot k\right)\\ t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-302}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-211}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 18
Accuracy76.9%
Cost1353
\[\begin{array}{l} \mathbf{if}\;x \leq -350000000 \lor \neg \left(x \leq 1.8 \cdot 10^{+40}\right):\\ \;\;\;\;b \cdot c + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
Alternative 19
Accuracy73.1%
Cost1224
\[\begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{+22}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+53}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right) - 4 \cdot i\right)\\ \end{array} \]
Alternative 20
Accuracy31.9%
Cost1112
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -5.8 \cdot 10^{+52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -1.7 \cdot 10^{+29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -9.5 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 7 \cdot 10^{-178}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 5.2 \cdot 10^{+46}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 21
Accuracy31.8%
Cost1112
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;j \leq -4.6 \cdot 10^{+51}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -3 \cdot 10^{+29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.5 \cdot 10^{-16}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -7.6 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 2.6 \cdot 10^{-178}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 2 \cdot 10^{+48}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
Alternative 22
Accuracy42.8%
Cost1104
\[\begin{array}{l} t_1 := b \cdot c + -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{-78}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(y \cdot \left(18 \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-191}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+212}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot t\right)\right)\\ \end{array} \]
Alternative 23
Accuracy50.1%
Cost972
\[\begin{array}{l} t_1 := b \cdot c + -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -4 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 1.1 \cdot 10^{-208}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 2.15 \cdot 10^{-155}:\\ \;\;\;\;18 \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 24
Accuracy31.9%
Cost848
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -1.5 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -4.8 \cdot 10^{-16}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 7.2 \cdot 10^{-178}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 2.3 \cdot 10^{+37}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 25
Accuracy33.0%
Cost585
\[\begin{array}{l} \mathbf{if}\;j \leq -1.3 \cdot 10^{+55} \lor \neg \left(j \leq 5 \cdot 10^{+52}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 26
Accuracy23.6%
Cost192
\[b \cdot c \]

Reproduce?

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