?

Average Error: 2.7 → 0.8
Time: 18.8s
Precision: binary64
Cost: 14664

?

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;\mathsf{fma}\left(t, z \cdot \left(y \cdot -9\right), \mathsf{fma}\left(x, 2, a \cdot \left(27 \cdot b\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\


\end{array}

Error?

Target

Original2.7
Target2.9
Herbie0.8
\[\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 y 9) z) t) < -1.00000000000000002e306

    1. Initial program 61.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. Simplified1.1

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

      [Start]61.4

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

      +-commutative [=>]61.4

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

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

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

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

      associate-*l* [=>]1.1

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

    if -1.00000000000000002e306 < (*.f64 (*.f64 (*.f64 y 9) z) t) < 5.0000000000000004e286

    1. Initial program 0.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. Simplified0.4

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

      [Start]0.5

      \[ \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.5

      \[ \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.5

      \[ \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.5

      \[ \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.5

      \[ \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.5

      \[ \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.5

      \[ \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.5

      \[ \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.5

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

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

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

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

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

      metadata-eval [=>]0.5

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

      +-commutative [=>]0.5

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

      fma-def [=>]0.5

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

      associate-*l* [=>]0.4

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

    if 5.0000000000000004e286 < (*.f64 (*.f64 (*.f64 y 9) z) t)

    1. Initial program 41.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. Simplified4.4

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

      [Start]41.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 [=>]41.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* [=>]41.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 [=>]41.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* [=>]4.7

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

      associate-*l* [=>]4.4

      \[ \mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \color{blue}{y \cdot \left(9 \cdot \left(z \cdot t\right)\right)}\right) \]
    3. Taylor expanded in y around inf 15.7

      \[\leadsto \color{blue}{-9 \cdot \left(y \cdot \left(t \cdot z\right)\right)} \]
    4. Simplified15.7

      \[\leadsto \color{blue}{y \cdot \left(z \cdot \left(t \cdot -9\right)\right)} \]
      Proof

      [Start]15.7

      \[ -9 \cdot \left(y \cdot \left(t \cdot z\right)\right) \]

      *-commutative [=>]15.7

      \[ \color{blue}{\left(y \cdot \left(t \cdot z\right)\right) \cdot -9} \]

      *-commutative [<=]15.7

      \[ \left(y \cdot \color{blue}{\left(z \cdot t\right)}\right) \cdot -9 \]

      associate-*r* [<=]15.7

      \[ \color{blue}{y \cdot \left(\left(z \cdot t\right) \cdot -9\right)} \]

      associate-*l* [=>]15.7

      \[ y \cdot \color{blue}{\left(z \cdot \left(t \cdot -9\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.8

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

Alternatives

Alternative 1
Error0.9
Cost9672
\[\begin{array}{l} t_1 := \left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+305}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+284}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 + y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\right)\\ \end{array} \]
Alternative 2
Error1.0
Cost3400
\[\begin{array}{l} t_1 := \left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ t_2 := a \cdot \left(27 \cdot b\right)\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+305}:\\ \;\;\;\;t_2 + y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2 + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]
Alternative 3
Error34.5
Cost1508
\[\begin{array}{l} t_1 := -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{if}\;a \leq -6800:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-50}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-51}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-155}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-176}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.85 \cdot 10^{-46}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
Alternative 4
Error34.4
Cost1508
\[\begin{array}{l} t_1 := -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{if}\;a \leq -6000:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-50}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-51}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-155}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-177}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-164}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-37}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
Alternative 5
Error10.0
Cost1480
\[\begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{+40}:\\ \;\;\;\;x \cdot 2 + t_1\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+36}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + x \cdot 2\\ \end{array} \]
Alternative 6
Error11.3
Cost1480
\[\begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ t_2 := a \cdot \left(27 \cdot b\right)\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{+40}:\\ \;\;\;\;t_2 + y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+36}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 + x \cdot 2\\ \end{array} \]
Alternative 7
Error1.8
Cost1220
\[\begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ \mathbf{if}\;z \leq 3.7 \cdot 10^{+128}:\\ \;\;\;\;t_1 + \left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)\\ \end{array} \]
Alternative 8
Error29.9
Cost1112
\[\begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+81}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -26500000:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-32}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-239}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-283}:\\ \;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-133}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 9
Error29.9
Cost1112
\[\begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+81}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -7800000:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{-32}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{-239}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-278}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-133}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 10
Error17.0
Cost1104
\[\begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right) + x \cdot 2\\ t_2 := z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\ \mathbf{if}\;z \leq -0.0065:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 11500000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+127}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error17.0
Cost1104
\[\begin{array}{l} t_1 := z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\ \mathbf{if}\;z \leq -0.00012:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 620000:\\ \;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{+125}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error29.3
Cost849
\[\begin{array}{l} \mathbf{if}\;x \leq -4.6 \cdot 10^{+81}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -4000000 \lor \neg \left(x \leq -6.6 \cdot 10^{-35}\right) \land x \leq 8.5 \cdot 10^{-133}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 13
Error29.2
Cost849
\[\begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+81}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -10500000 \lor \neg \left(x \leq -6.5 \cdot 10^{-28}\right) \land x \leq 9 \cdot 10^{-133}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 14
Error29.2
Cost848
\[\begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+81}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -310000:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-29}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{-133}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 15
Error36.9
Cost192
\[x \cdot 2 \]

Error

Reproduce?

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