Average Error: 2.8 → 1.1
Time: 22.7s
Precision: binary64
Cost: 3400
\[ \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 := b \cdot \left(a \cdot 27\right)\\ 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 -\infty:\\ \;\;\;\;\left(x + x\right) + \left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+283}:\\ \;\;\;\;t_1 + \left(x \cdot 2 + t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) + -9 \cdot \left(z \cdot \left(y \cdot t\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 (* b (* a 27.0)))
        (t_2 (+ (+ (* x 2.0) (* t (* z (* y -9.0)))) t_1)))
   (if (<= t_2 (- INFINITY))
     (+ (+ x x) (* (* y t) (* z -9.0)))
     (if (<= t_2 4e+283)
       (+ t_1 (+ (* x 2.0) (* t (* -9.0 (* y z)))))
       (+ (+ (* 27.0 (* a b)) (* x 2.0)) (* -9.0 (* z (* y t))))))))
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 = b * (a * 27.0);
	double t_2 = ((x * 2.0) + (t * (z * (y * -9.0)))) + t_1;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = (x + x) + ((y * t) * (z * -9.0));
	} else if (t_2 <= 4e+283) {
		tmp = t_1 + ((x * 2.0) + (t * (-9.0 * (y * z))));
	} else {
		tmp = ((27.0 * (a * b)) + (x * 2.0)) + (-9.0 * (z * (y * t)));
	}
	return tmp;
}
public static 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);
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double t_2 = ((x * 2.0) + (t * (z * (y * -9.0)))) + t_1;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = (x + x) + ((y * t) * (z * -9.0));
	} else if (t_2 <= 4e+283) {
		tmp = t_1 + ((x * 2.0) + (t * (-9.0 * (y * z))));
	} else {
		tmp = ((27.0 * (a * b)) + (x * 2.0)) + (-9.0 * (z * (y * t)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
def code(x, y, z, t, a, b):
	t_1 = b * (a * 27.0)
	t_2 = ((x * 2.0) + (t * (z * (y * -9.0)))) + t_1
	tmp = 0
	if t_2 <= -math.inf:
		tmp = (x + x) + ((y * t) * (z * -9.0))
	elif t_2 <= 4e+283:
		tmp = t_1 + ((x * 2.0) + (t * (-9.0 * (y * z))))
	else:
		tmp = ((27.0 * (a * b)) + (x * 2.0)) + (-9.0 * (z * (y * t)))
	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(b * Float64(a * 27.0))
	t_2 = Float64(Float64(Float64(x * 2.0) + Float64(t * Float64(z * Float64(y * -9.0)))) + t_1)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(Float64(x + x) + Float64(Float64(y * t) * Float64(z * -9.0)));
	elseif (t_2 <= 4e+283)
		tmp = Float64(t_1 + Float64(Float64(x * 2.0) + Float64(t * Float64(-9.0 * Float64(y * z)))));
	else
		tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) + Float64(-9.0 * Float64(z * Float64(y * t))));
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a * 27.0);
	t_2 = ((x * 2.0) + (t * (z * (y * -9.0)))) + t_1;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = (x + x) + ((y * t) * (z * -9.0));
	elseif (t_2 <= 4e+283)
		tmp = t_1 + ((x * 2.0) + (t * (-9.0 * (y * z))));
	else
		tmp = ((27.0 * (a * b)) + (x * 2.0)) + (-9.0 * (z * (y * t)));
	end
	tmp_2 = 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[(b * N[(a * 27.0), $MachinePrecision]), $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, (-Infinity)], N[(N[(x + x), $MachinePrecision] + N[(N[(y * t), $MachinePrecision] * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+283], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] + N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $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}
t_1 := b \cdot \left(a \cdot 27\right)\\
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 -\infty:\\
\;\;\;\;\left(x + x\right) + \left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\

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

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.8
Target3.2
Herbie1.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)) < -inf.0

    1. Initial program 64.0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), a \cdot \left(27 \cdot b\right)\right)\right)} \]
      Proof
      (fma.f64 x 2 (fma.f64 y (*.f64 t (*.f64 z -9)) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (fma.f64 y (*.f64 t (*.f64 z (Rewrite<= metadata-eval (neg.f64 9)))) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (fma.f64 y (*.f64 t (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 z 9)))) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (fma.f64 y (*.f64 t (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 9 z)))) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (fma.f64 y (Rewrite<= *-commutative_binary64 (*.f64 (neg.f64 (*.f64 9 z)) t)) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (fma.f64 y (Rewrite=> distribute-lft-neg-out_binary64 (neg.f64 (*.f64 (*.f64 9 z) t))) (*.f64 a (*.f64 27 b)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (fma.f64 y (neg.f64 (*.f64 (*.f64 9 z) t)) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 a 27) b)))): 8 points increase in error, 17 points decrease in error
      (fma.f64 x 2 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (neg.f64 (*.f64 (*.f64 9 z) t))) (*.f64 (*.f64 a 27) b)))): 1 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 y (*.f64 (*.f64 9 z) t)))) (*.f64 (*.f64 a 27) b))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (+.f64 (neg.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 y (*.f64 9 z)) t))) (*.f64 (*.f64 a 27) b))): 27 points increase in error, 25 points decrease in error
      (fma.f64 x 2 (+.f64 (neg.f64 (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 y 9) z)) t)) (*.f64 (*.f64 a 27) b))): 10 points increase in error, 12 points decrease in error
      (fma.f64 x 2 (+.f64 (neg.f64 (*.f64 (*.f64 (*.f64 y 9) z) t)) (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (*.f64 (*.f64 a 27) b)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (Rewrite<= distribute-neg-in_binary64 (neg.f64 (+.f64 (*.f64 (*.f64 (*.f64 y 9) z) t) (neg.f64 (*.f64 (*.f64 a 27) b)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 x 2 (neg.f64 (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 (*.f64 (*.f64 y 9) z) t) (*.f64 (*.f64 a 27) b))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 x 2) (-.f64 (*.f64 (*.f64 (*.f64 y 9) z) t) (*.f64 (*.f64 a 27) b)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 (*.f64 x 2) (*.f64 (*.f64 (*.f64 y 9) z) t)) (*.f64 (*.f64 a 27) b))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in a around 0 10.7

      \[\leadsto \color{blue}{2 \cdot x + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)} \]
    4. Applied egg-rr10.7

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot t, z \cdot -9, x + x\right)} \]
    5. Applied egg-rr10.7

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

    if -inf.0 < (+.f64 (-.f64 (*.f64 x 2) (*.f64 (*.f64 (*.f64 y 9) z) t)) (*.f64 (*.f64 a 27) b)) < 3.99999999999999982e283

    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. Taylor expanded in y around 0 0.5

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

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

    1. Initial program 20.9

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Taylor expanded in y around 0 4.8

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

      \[\leadsto \left(x \cdot 2 - \color{blue}{\left(9 \cdot y\right) \cdot \left(t \cdot z\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      Proof
      (*.f64 (*.f64 9 y) (*.f64 t z)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r*_binary64 (*.f64 9 (*.f64 y (*.f64 t z)))): 32 points increase in error, 30 points decrease in error
    4. Applied egg-rr18.9

      \[\leadsto \color{blue}{\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - 9 \cdot \left(\left(y \cdot z\right) \cdot t\right)} \]
    5. Taylor expanded in y around 0 3.9

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

      \[\leadsto \left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - 9 \cdot \color{blue}{\left(\left(y \cdot t\right) \cdot z\right)} \]
      Proof
      (*.f64 (*.f64 y t) z): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r*_binary64 (*.f64 y (*.f64 t z))): 45 points increase in error, 54 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification1.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + b \cdot \left(a \cdot 27\right) \leq -\infty:\\ \;\;\;\;\left(x + x\right) + \left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\ \mathbf{elif}\;\left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + b \cdot \left(a \cdot 27\right) \leq 4 \cdot 10^{+283}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right) + \left(x \cdot 2 + t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error10.8
Cost1480
\[\begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-84}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{elif}\;t_1 \leq 0.002:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + x \cdot 2\\ \end{array} \]
Alternative 2
Error10.0
Cost1480
\[\begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-84}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{elif}\;t_1 \leq 10^{-6}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + x \cdot 2\\ \end{array} \]
Alternative 3
Error29.0
Cost1376
\[\begin{array}{l} t_1 := \left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\ t_2 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -1.5136252139870452 \cdot 10^{+69}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -3.814492891866308 \cdot 10^{-209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.6166056098330847 \cdot 10^{-278}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;x \leq 9.751872027444886 \cdot 10^{-233}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.1998839398020824 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.761180967648495 \cdot 10^{-162}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 8.760687571845481 \cdot 10^{-127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.2770245847765305 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 4
Error29.0
Cost1376
\[\begin{array}{l} t_1 := \left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\ t_2 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -1.5136252139870452 \cdot 10^{+69}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -3.814492891866308 \cdot 10^{-209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.6166056098330847 \cdot 10^{-278}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;x \leq 9.751872027444886 \cdot 10^{-233}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.1998839398020824 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.761180967648495 \cdot 10^{-162}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 8.760687571845481 \cdot 10^{-127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.2770245847765305 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 5
Error5.1
Cost1352
\[\begin{array}{l} t_1 := 27 \cdot \left(a \cdot b\right)\\ t_2 := \left(t_1 + x \cdot 2\right) + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+175}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1 \cdot 10^{+153}:\\ \;\;\;\;t_1 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error0.4
Cost1220
\[\begin{array}{l} t_1 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{if}\;t \leq 5.678980278474548 \cdot 10^{-11}:\\ \;\;\;\;t_1 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
Alternative 7
Error28.8
Cost1112
\[\begin{array}{l} t_1 := y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ t_2 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -1.5136252139870452 \cdot 10^{+69}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -3.814492891866308 \cdot 10^{-209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.6166056098330847 \cdot 10^{-278}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.573093384245746 \cdot 10^{-243}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.1998839398020824 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.2770245847765305 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 8
Error12.5
Cost1096
\[\begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -1.2127054440277283 \cdot 10^{+87}:\\ \;\;\;\;t_1 + x \cdot 2\\ \mathbf{elif}\;x \leq 266309312284779260:\\ \;\;\;\;t_1 + \left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
Alternative 9
Error12.4
Cost1096
\[\begin{array}{l} t_1 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;x \leq -1.2127054440277283 \cdot 10^{+87}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right) + x \cdot 2\\ \mathbf{elif}\;x \leq 266309312284779260:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + t_1\\ \end{array} \]
Alternative 10
Error12.6
Cost1096
\[\begin{array}{l} \mathbf{if}\;x \leq -1.2127054440277283 \cdot 10^{+87}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right) + x \cdot 2\\ \mathbf{elif}\;x \leq 266309312284779260:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
Alternative 11
Error12.6
Cost1096
\[\begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -1.2127054440277283 \cdot 10^{+87}:\\ \;\;\;\;t_1 + x \cdot 2\\ \mathbf{elif}\;x \leq 266309312284779260:\\ \;\;\;\;t_1 + y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
Alternative 12
Error16.2
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -6.3 \cdot 10^{+32}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{+95}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
Alternative 13
Error16.2
Cost840
\[\begin{array}{l} \mathbf{if}\;z \leq -6.3 \cdot 10^{+32}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{+95}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
Alternative 14
Error27.9
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -1.5136252139870452 \cdot 10^{+69}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 3.2770245847765305 \cdot 10^{+33}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 15
Error37.2
Cost192
\[x \cdot 2 \]

Error

Reproduce

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