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

?

Percentage Accurate: 95.8% → 98.5%
Time: 16.0s
Precision: binary64
Cost: 7492

?

\[ \begin{array}{c}[y, z, t] = \mathsf{sort}([y, z, t])\\ [a, b] = \mathsf{sort}([a, b])\\ \end{array} \]
\[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
\[\begin{array}{l} \mathbf{if}\;z \leq 2.5 \cdot 10^{-38}:\\ \;\;\;\;\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - \mathsf{fma}\left(y \cdot \left(z \cdot 9\right), t, a \cdot \left(b \cdot -27\right)\right)\\ \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z 2.5e-38)
   (+ (+ (* a (* 27.0 b)) (* x 2.0)) (* y (* t (* z -9.0))))
   (- (* x 2.0) (fma (* y (* z 9.0)) t (* a (* b -27.0))))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= 2.5e-38) {
		tmp = ((a * (27.0 * b)) + (x * 2.0)) + (y * (t * (z * -9.0)));
	} else {
		tmp = (x * 2.0) - fma((y * (z * 9.0)), t, (a * (b * -27.0)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b))
end
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= 2.5e-38)
		tmp = Float64(Float64(Float64(a * Float64(27.0 * b)) + Float64(x * 2.0)) + Float64(y * Float64(t * Float64(z * -9.0))));
	else
		tmp = Float64(Float64(x * 2.0) - fma(Float64(y * Float64(z * 9.0)), t, Float64(a * Float64(b * -27.0))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 2.5e-38], N[(N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * N[(z * 9.0), $MachinePrecision]), $MachinePrecision] * t + N[(a * N[(b * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\begin{array}{l}
\mathbf{if}\;z \leq 2.5 \cdot 10^{-38}:\\
\;\;\;\;\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot 2 - \mathsf{fma}\left(y \cdot \left(z \cdot 9\right), t, a \cdot \left(b \cdot -27\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 12 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

Original95.8%
Target95.4%
Herbie98.5%
\[\begin{array}{l} \mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\ \;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\ \end{array} \]

Derivation?

  1. Split input into 2 regimes
  2. if z < 2.50000000000000017e-38

    1. Initial program 95.1%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Simplified95.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)} \]
      Step-by-step derivation

      [Start]95.1%

      \[ \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]

      +-commutative [=>]95.1%

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

      associate-*l* [=>]95.1%

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

      fma-def [=>]95.1%

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

      associate-*l* [=>]95.4%

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

      *-commutative [=>]95.4%

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

      associate-*l* [=>]95.4%

      \[ \mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \color{blue}{9 \cdot \left(y \cdot \left(z \cdot t\right)\right)}\right) \]
    3. Applied egg-rr94.9%

      \[\leadsto \color{blue}{\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(\left(-9 \cdot z\right) \cdot t\right)} \]
      Step-by-step derivation

      [Start]95.4%

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

      fma-udef [=>]95.4%

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

      associate-*r* [=>]95.4%

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

      associate-*r* [=>]95.4%

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

      *-commutative [<=]95.4%

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

      associate-*r* [=>]95.1%

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

      *-commutative [=>]95.1%

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

      cancel-sign-sub-inv [=>]95.1%

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

      distribute-lft-neg-in [<=]95.1%

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

      associate-+r+ [=>]95.1%

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

      associate-*r* [<=]95.1%

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

      *-commutative [<=]95.1%

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

      associate-*r* [<=]95.4%

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

      *-commutative [=>]95.4%

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

      associate-*r* [<=]95.4%

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

      *-commutative [=>]95.4%

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

      distribute-rgt-neg-in [=>]95.4%

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

      metadata-eval [=>]95.4%

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

      associate-*r* [<=]94.9%

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

      *-commutative [=>]94.9%

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

      associate-*r* [=>]94.9%

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

    if 2.50000000000000017e-38 < z

    1. Initial program 96.4%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Simplified94.2%

      \[\leadsto \color{blue}{x \cdot 2 - \left(\left(y \cdot 9\right) \cdot \left(z \cdot t\right) - a \cdot \left(27 \cdot b\right)\right)} \]
      Step-by-step derivation

      [Start]96.4%

      \[ \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]

      associate-+l- [=>]96.4%

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

      sub-neg [=>]96.4%

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

      neg-mul-1 [=>]96.4%

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

      metadata-eval [<=]96.4%

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

      metadata-eval [<=]96.4%

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

      cancel-sign-sub-inv [<=]96.4%

      \[ \color{blue}{x \cdot 2 - \left(--1\right) \cdot \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]

      metadata-eval [=>]96.4%

      \[ x \cdot 2 - \color{blue}{1} \cdot \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]

      *-lft-identity [=>]96.4%

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

      associate-*l* [=>]94.2%

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

      associate-*l* [=>]94.2%

      \[ x \cdot 2 - \left(\left(y \cdot 9\right) \cdot \left(z \cdot t\right) - \color{blue}{a \cdot \left(27 \cdot b\right)}\right) \]
    3. Applied egg-rr97.6%

      \[\leadsto x \cdot 2 - \color{blue}{\mathsf{fma}\left(y \cdot \left(9 \cdot z\right), t, a \cdot \left(b \cdot -27\right)\right)} \]
      Step-by-step derivation

      [Start]94.2%

      \[ x \cdot 2 - \left(\left(y \cdot 9\right) \cdot \left(z \cdot t\right) - a \cdot \left(27 \cdot b\right)\right) \]

      sub-neg [=>]94.2%

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

      associate-*r* [=>]96.4%

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

      fma-def [=>]97.6%

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

      associate-*l* [=>]97.6%

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

      distribute-rgt-neg-in [=>]97.6%

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

      *-commutative [=>]97.6%

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

      distribute-rgt-neg-in [=>]97.6%

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

      metadata-eval [=>]97.6%

      \[ x \cdot 2 - \mathsf{fma}\left(y \cdot \left(9 \cdot z\right), t, a \cdot \left(b \cdot \color{blue}{-27}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.5 \cdot 10^{-38}:\\ \;\;\;\;\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - \mathsf{fma}\left(y \cdot \left(z \cdot 9\right), t, a \cdot \left(b \cdot -27\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy98.5%
Cost7492
\[\begin{array}{l} \mathbf{if}\;z \leq 2.5 \cdot 10^{-38}:\\ \;\;\;\;\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - \mathsf{fma}\left(y \cdot \left(z \cdot 9\right), t, a \cdot \left(b \cdot -27\right)\right)\\ \end{array} \]
Alternative 2
Accuracy95.9%
Cost13632
\[\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, -9 \cdot \left(z \cdot t\right), \left(a \cdot 27\right) \cdot b\right)\right) \]
Alternative 3
Accuracy78.5%
Cost1228
\[\begin{array}{l} t_1 := x \cdot 2 - a \cdot \left(b \cdot -27\right)\\ \mathbf{if}\;b \leq -6.5 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+26}:\\ \;\;\;\;x \cdot 2 - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{+253}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Accuracy45.3%
Cost1115
\[\begin{array}{l} \mathbf{if}\;a \leq -2.25 \cdot 10^{+114} \lor \neg \left(a \leq -6.2 \cdot 10^{+71}\right) \land \left(a \leq -9 \cdot 10^{-77} \lor \neg \left(a \leq 4 \cdot 10^{-197}\right) \land \left(a \leq 3.55 \cdot 10^{-149} \lor \neg \left(a \leq 2.35 \cdot 10^{-62}\right)\right)\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 5
Accuracy45.3%
Cost1112
\[\begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ \mathbf{if}\;a \leq -1.8 \cdot 10^{+114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{+71}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -1.04 \cdot 10^{-76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-197}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 1.36 \cdot 10^{-148}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-62}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Accuracy95.7%
Cost1088
\[\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(t \cdot \left(z \cdot -9\right)\right) \]
Alternative 7
Accuracy49.8%
Cost976
\[\begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ t_2 := -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{-31}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-245}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Accuracy49.9%
Cost976
\[\begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ \mathbf{if}\;z \leq -5 \cdot 10^{-31}:\\ \;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-240}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \end{array} \]
Alternative 9
Accuracy76.8%
Cost969
\[\begin{array}{l} \mathbf{if}\;y \leq -1.22 \cdot 10^{+78} \lor \neg \left(y \leq 5.8 \cdot 10^{-152}\right):\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - a \cdot \left(b \cdot -27\right)\\ \end{array} \]
Alternative 10
Accuracy78.2%
Cost968
\[\begin{array}{l} \mathbf{if}\;y \leq -9.1 \cdot 10^{+77}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-152}:\\ \;\;\;\;x \cdot 2 - a \cdot \left(b \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
Alternative 11
Accuracy74.9%
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+33} \lor \neg \left(z \leq 1050000000000\right):\\ \;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - a \cdot \left(b \cdot -27\right)\\ \end{array} \]
Alternative 12
Accuracy31.4%
Cost192
\[x \cdot 2 \]

Reproduce?

herbie shell --seed 2023258 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, A"
  :precision binary64

  :herbie-target
  (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b)))

  (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))