?

Average Accuracy: 95.2% → 98.1%
Time: 18.0s
Precision: binary64
Cost: 15944

?

\[ \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} t_1 := \left(a \cdot 27\right) \cdot b\\ t_2 := \left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + t_1\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+304}:\\ \;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+225}:\\ \;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, y \cdot \left(z \cdot -9\right), t_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), t_1\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
 (let* ((t_1 (* (* a 27.0) b))
        (t_2 (+ (+ (* x 2.0) (* t (* z (* y -9.0)))) t_1)))
   (if (<= t_2 -5e+304)
     (+ (+ (* x 2.0) (* (* z t) (* y -9.0))) (* a (* 27.0 b)))
     (if (<= t_2 4e+225)
       (fma x 2.0 (fma t (* y (* z -9.0)) t_1))
       (fma x 2.0 (fma y (* t (* z -9.0)) t_1))))))
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 t_1 = (a * 27.0) * b;
	double t_2 = ((x * 2.0) + (t * (z * (y * -9.0)))) + t_1;
	double tmp;
	if (t_2 <= -5e+304) {
		tmp = ((x * 2.0) + ((z * t) * (y * -9.0))) + (a * (27.0 * b));
	} else if (t_2 <= 4e+225) {
		tmp = fma(x, 2.0, fma(t, (y * (z * -9.0)), t_1));
	} else {
		tmp = fma(x, 2.0, fma(y, (t * (z * -9.0)), t_1));
	}
	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)
	t_1 = Float64(Float64(a * 27.0) * b)
	t_2 = Float64(Float64(Float64(x * 2.0) + Float64(t * Float64(z * Float64(y * -9.0)))) + t_1)
	tmp = 0.0
	if (t_2 <= -5e+304)
		tmp = Float64(Float64(Float64(x * 2.0) + Float64(Float64(z * t) * Float64(y * -9.0))) + Float64(a * Float64(27.0 * b)));
	elseif (t_2 <= 4e+225)
		tmp = fma(x, 2.0, fma(t, Float64(y * Float64(z * -9.0)), t_1));
	else
		tmp = fma(x, 2.0, fma(y, Float64(t * Float64(z * -9.0)), t_1));
	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_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * 2.0), $MachinePrecision] + N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+304], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+225], N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(x * 2.0 + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $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}
t_1 := \left(a \cdot 27\right) \cdot b\\
t_2 := \left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + t_1\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+304}:\\
\;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+225}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, y \cdot \left(z \cdot -9\right), t_1\right)\right)\\

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


\end{array}

Error?

Target

Original95.2%
Target94.4%
Herbie98.1%
\[\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 3 regimes
  2. if (+.f64 (-.f64 (*.f64 x 2) (*.f64 (*.f64 (*.f64 y 9) z) t)) (*.f64 (*.f64 a 27) b)) < -4.9999999999999997e304

    1. Initial program 21.6%

      \[\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}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
      Proof

      [Start]21.6

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

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

      associate-*l* [=>]95.4

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

    if -4.9999999999999997e304 < (+.f64 (-.f64 (*.f64 x 2) (*.f64 (*.f64 (*.f64 y 9) z) t)) (*.f64 (*.f64 a 27) b)) < 3.99999999999999971e225

    1. Initial program 99.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. Simplified99.1%

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

      [Start]99.1

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

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

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

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

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

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

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

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

      *-commutative [=>]99.1

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

      fma-def [=>]99.1

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

      associate-*l* [=>]99.1

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

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

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

      *-commutative [=>]99.1

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

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

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

      metadata-eval [=>]99.1

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

    if 3.99999999999999971e225 < (+.f64 (-.f64 (*.f64 x 2) (*.f64 (*.f64 (*.f64 y 9) z) t)) (*.f64 (*.f64 a 27) b))

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[ \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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + \left(a \cdot 27\right) \cdot b \leq -5 \cdot 10^{+304}:\\ \;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;\left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + \left(a \cdot 27\right) \cdot b \leq 4 \cdot 10^{+225}:\\ \;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, y \cdot \left(z \cdot -9\right), \left(a \cdot 27\right) \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy98.3%
Cost15944
\[\begin{array}{l} t_1 := \left(a \cdot 27\right) \cdot b\\ t_2 := \left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + t_1\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+304}:\\ \;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+245}:\\ \;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, y \cdot \left(z \cdot -9\right), t_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]
Alternative 2
Accuracy98.3%
Cost9672
\[\begin{array}{l} t_1 := \left(a \cdot 27\right) \cdot b\\ t_2 := \left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + t_1\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+304}:\\ \;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+245}:\\ \;\;\;\;t_1 + \left(x \cdot 2 + t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]
Alternative 3
Accuracy99.0%
Cost3401
\[\begin{array}{l} t_1 := \left(a \cdot 27\right) \cdot b\\ t_2 := \left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + t_1\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+304} \lor \neg \left(t_2 \leq 4 \cdot 10^{+303}\right):\\ \;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(x \cdot 2 + t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
Alternative 4
Accuracy52.5%
Cost1900
\[\begin{array}{l} t_1 := 27 \cdot \left(a \cdot b\right)\\ t_2 := a \cdot \left(27 \cdot b\right)\\ t_3 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;x \leq -1.5 \cdot 10^{+80}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{+18}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -3300000:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-253}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-292}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 2.65 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{-63}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 0.0255:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.42 \cdot 10^{+38}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+111}:\\ \;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 5
Accuracy54.0%
Cost1376
\[\begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;x \leq -1.65 \cdot 10^{+80}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -520000:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -6.2 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-292}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-261}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 6
Accuracy73.7%
Cost1366
\[\begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+235} \lor \neg \left(y \leq -1.55 \cdot 10^{+93}\right) \land \left(y \leq -2.3 \cdot 10^{+55} \lor \neg \left(y \leq -0.0045\right) \land y \leq 7.2 \cdot 10^{-218}\right):\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
Alternative 7
Accuracy75.0%
Cost1365
\[\begin{array}{l} t_1 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;y \leq -4.4 \cdot 10^{+243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{+93}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{+55} \lor \neg \left(y \leq -0.0046\right) \land y \leq 7.2 \cdot 10^{-218}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
Alternative 8
Accuracy82.0%
Cost1233
\[\begin{array}{l} t_1 := 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ t_3 := x \cdot 2 + t_2\\ \mathbf{if}\;x \leq -3.8 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-23}:\\ \;\;\;\;t_2 - t_1\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+62} \lor \neg \left(x \leq 7.5 \cdot 10^{+111}\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - t_1\\ \end{array} \]
Alternative 9
Accuracy97.9%
Cost1220
\[\begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+63}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right) + \left(x \cdot 2 + 27 \cdot \left(a \cdot b\right)\right)\\ \end{array} \]
Alternative 10
Accuracy73.7%
Cost1104
\[\begin{array}{l} t_1 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;z \leq -1 \cdot 10^{+62}:\\ \;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-42}:\\ \;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
Alternative 11
Accuracy55.2%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{+80}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 0.0018:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 12
Accuracy55.2%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -2.45 \cdot 10^{+81}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 0.35:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 13
Accuracy41.3%
Cost192
\[x \cdot 2 \]

Error

Reproduce?

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