?

Average Error: 4.23% → 1.01%
Time: 20.3s
Precision: binary64
Cost: 13764

?

\[ \begin{array}{c}[y, z, t] = \mathsf{sort}([y, z, t])\\ \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 6 \cdot 10^{-239}:\\ \;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), \left(a \cdot 27\right) \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, -9 \cdot \left(z \cdot y\right), \mathsf{fma}\left(x, 2, 27 \cdot \left(a \cdot b\right)\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 6e-239)
   (fma x 2.0 (fma y (* t (* z -9.0)) (* (* a 27.0) b)))
   (fma t (* -9.0 (* z y)) (fma x 2.0 (* 27.0 (* a b))))))
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 <= 6e-239) {
		tmp = fma(x, 2.0, fma(y, (t * (z * -9.0)), ((a * 27.0) * b)));
	} else {
		tmp = fma(t, (-9.0 * (z * y)), fma(x, 2.0, (27.0 * (a * b))));
	}
	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 <= 6e-239)
		tmp = fma(x, 2.0, fma(y, Float64(t * Float64(z * -9.0)), Float64(Float64(a * 27.0) * b)));
	else
		tmp = fma(t, Float64(-9.0 * Float64(z * y)), fma(x, 2.0, Float64(27.0 * Float64(a * b))));
	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, 6e-239], N[(x * 2.0 + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0 + N[(27.0 * N[(a * b), $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 6 \cdot 10^{-239}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), \left(a \cdot 27\right) \cdot b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, -9 \cdot \left(z \cdot y\right), \mathsf{fma}\left(x, 2, 27 \cdot \left(a \cdot b\right)\right)\right)\\


\end{array}

Error?

Target

Original4.23%
Target4.81%
Herbie1.01%
\[\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 < 5.9999999999999996e-239

    1. Initial program 6.38

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

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

      [Start]6.38

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

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

      fma-neg [=>]6.38

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

      neg-sub0 [=>]6.38

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

      associate-+l- [<=]6.38

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

      neg-sub0 [<=]6.38

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

      *-commutative [=>]6.38

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

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

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

      associate-*l* [=>]6.24

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

      *-commutative [=>]6.24

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

      associate-*r* [=>]1.14

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

      *-commutative [=>]1.14

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

      fma-def [=>]1.15

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

      distribute-lft-neg-in [<=]1.15

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

      distribute-rgt-neg-in [=>]1.15

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

      *-commutative [=>]1.15

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

      distribute-rgt-neg-in [=>]1.15

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

      metadata-eval [=>]1.15

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

    if 5.9999999999999996e-239 < z

    1. Initial program 0.97

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

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

      [Start]0.97

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

      sub-neg [=>]0.97

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

      +-commutative [=>]0.97

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

      associate-+l+ [=>]0.97

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

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

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

      +-commutative [<=]0.97

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

      *-commutative [=>]0.97

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

      fma-def [=>]0.97

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

      *-commutative [=>]0.97

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

      associate-*l* [=>]0.91

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

      *-commutative [=>]0.91

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

      distribute-rgt-neg-in [=>]0.91

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

      metadata-eval [=>]0.91

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

      +-commutative [=>]0.91

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

      fma-def [=>]0.91

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

      *-commutative [=>]0.91

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

      associate-*l* [=>]0.8

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

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

Alternatives

Alternative 1
Error0.79%
Cost14020
\[\begin{array}{l} \mathbf{if}\;z \cdot \left(y \cdot 9\right) \leq 10^{+218}:\\ \;\;\;\;\mathsf{fma}\left(t, -9 \cdot \left(z \cdot y\right), \mathsf{fma}\left(x, 2, 27 \cdot \left(a \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]
Alternative 2
Error55.02%
Cost2168
\[\begin{array}{l} t_1 := \left(z \cdot y\right) \cdot \left(t \cdot -9\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{+247}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{+204}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -8.4 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -7 \cdot 10^{+93}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{+18}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -380000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-29}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-142}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-272}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-298}:\\ \;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-19}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error54.79%
Cost2036
\[\begin{array}{l} t_1 := y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{+205}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{+94}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{+47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -500000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-148}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-271}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-302}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-12}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error24.89%
Cost1628
\[\begin{array}{l} t_1 := 27 \cdot \left(a \cdot b\right)\\ t_2 := t_1 + x \cdot 2\\ t_3 := x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{-208}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 122:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+83}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{+141}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+170}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+193}:\\ \;\;\;\;t_1 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+294}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(t \cdot -9\right)\\ \end{array} \]
Alternative 5
Error46.57%
Cost1372
\[\begin{array}{l} t_1 := y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;x \leq -5 \cdot 10^{-33}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -6.7 \cdot 10^{-102}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{-227}:\\ \;\;\;\;z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-254}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-108}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1150000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 6
Error46.58%
Cost1372
\[\begin{array}{l} t_1 := z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;x \leq -2.5 \cdot 10^{-31}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{-101}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6.4 \cdot 10^{-251}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-187}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;x \leq 6.4 \cdot 10^{-108}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1150000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 7
Error46.55%
Cost1372
\[\begin{array}{l} t_1 := z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;x \leq -1.95 \cdot 10^{-33}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -5.3 \cdot 10^{-102}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.38 \cdot 10^{-219}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{-258}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-182}:\\ \;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \mathbf{elif}\;x \leq 6.7 \cdot 10^{-108}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 700000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 8
Error30.19%
Cost1369
\[\begin{array}{l} t_1 := 27 \cdot \left(a \cdot b\right)\\ t_2 := t_1 + x \cdot 2\\ \mathbf{if}\;x \leq -1.85 \cdot 10^{-193}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -6.3 \cdot 10^{-220}:\\ \;\;\;\;z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \mathbf{elif}\;x \leq -9.6 \cdot 10^{-259}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-301}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(t \cdot -9\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-269} \lor \neg \left(x \leq 1.05 \cdot 10^{-187}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \end{array} \]
Alternative 9
Error30.25%
Cost1368
\[\begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right) + x \cdot 2\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{-193}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.38 \cdot 10^{-216}:\\ \;\;\;\;z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-255}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{-303}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(t \cdot -9\right)\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-188}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \end{array} \]
Alternative 10
Error23.54%
Cost1234
\[\begin{array}{l} \mathbf{if}\;a \leq -150000000 \lor \neg \left(a \leq -1.6 \cdot 10^{-93} \lor \neg \left(a \leq -1.3 \cdot 10^{-146}\right) \land a \leq 1.65 \cdot 10^{-228}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \end{array} \]
Alternative 11
Error2.87%
Cost1220
\[\begin{array}{l} \mathbf{if}\;z \leq -58000000:\\ \;\;\;\;x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 + t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\right)\\ \end{array} \]
Alternative 12
Error0.84%
Cost1220
\[\begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 + t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\right)\\ \end{array} \]
Alternative 13
Error43.23%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-32}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-22}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 14
Error57.39%
Cost192
\[x \cdot 2 \]

Error

Reproduce?

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