Average Error: 3.0 → 0.5
Time: 23.3s
Precision: binary64
Cost: 13892
\[ \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 := a \cdot \left(27 \cdot b\right)\\ \mathbf{if}\;y \cdot 9 \leq -100:\\ \;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), t_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 + x \cdot 2\right) + z \cdot \left(t \cdot \left(y \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 (* a (* 27.0 b))))
   (if (<= (* y 9.0) -100.0)
     (fma x 2.0 (fma y (* t (* z -9.0)) t_1))
     (+ (+ t_1 (* x 2.0)) (* z (* t (* y -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 = a * (27.0 * b);
	double tmp;
	if ((y * 9.0) <= -100.0) {
		tmp = fma(x, 2.0, fma(y, (t * (z * -9.0)), t_1));
	} else {
		tmp = (t_1 + (x * 2.0)) + (z * (t * (y * -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(a * Float64(27.0 * b))
	tmp = 0.0
	if (Float64(y * 9.0) <= -100.0)
		tmp = fma(x, 2.0, fma(y, Float64(t * Float64(z * -9.0)), t_1));
	else
		tmp = Float64(Float64(t_1 + Float64(x * 2.0)) + Float64(z * Float64(t * Float64(y * -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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y * 9.0), $MachinePrecision], -100.0], N[(x * 2.0 + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(t * N[(y * -9.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}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;y \cdot 9 \leq -100:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), t_1\right)\right)\\

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


\end{array}

Error

Target

Original3.0
Target3.3
Herbie0.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 (*.f64 y 9) < -100

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

      \[\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)))): 13 points increase in error, 15 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))): 24 points increase in error, 18 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))): 11 points increase in error, 6 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

    if -100 < (*.f64 y 9)

    1. Initial program 0.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. Applied egg-rr0.3

      \[\leadsto \color{blue}{\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) - z \cdot \left(\left(y \cdot 9\right) \cdot t\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot 9 \leq -100:\\ \;\;\;\;\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)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error0.7
Cost13764
\[\begin{array}{l} \mathbf{if}\;z \leq 9.248379224129767 \cdot 10^{-206}:\\ \;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, z \cdot \left(t \cdot -9\right), a \cdot \left(27 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ \end{array} \]
Alternative 2
Error19.1
Cost2156
\[\begin{array}{l} t_1 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ t_2 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ t_3 := t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ t_4 := \left(x + x\right) + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{if}\;t \leq -5.848010665031644 \cdot 10^{-184}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 8.759060525412124 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+136}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+182}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+201}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 10^{+211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+220}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 1.42 \cdot 10^{+250}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 10^{+260}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 10^{+280}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Error29.8
Cost2032
\[\begin{array}{l} t_1 := y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ t_2 := t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ t_3 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -4.723300137072326 \cdot 10^{+37}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -1.9373128178702737 \cdot 10^{-235}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -1.3604760146037694 \cdot 10^{-272}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\ \mathbf{elif}\;x \leq -2.2848329192108776 \cdot 10^{-291}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 6.40730438311573 \cdot 10^{-283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8.928043134554823 \cdot 10^{-250}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.1503895659809953 \cdot 10^{-240}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 7.167218765572093 \cdot 10^{-118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.062045714431279 \cdot 10^{-99}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 5.987002526717022 \cdot 10^{-37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 5.4920582309728474 \cdot 10^{+38}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 1.505606431490598 \cdot 10^{+62}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 4
Error29.8
Cost2032
\[\begin{array}{l} t_1 := y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ t_2 := -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ t_3 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -4.723300137072326 \cdot 10^{+37}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -1.9373128178702737 \cdot 10^{-235}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -1.3604760146037694 \cdot 10^{-272}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.2848329192108776 \cdot 10^{-291}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 6.40730438311573 \cdot 10^{-283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8.928043134554823 \cdot 10^{-250}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.1503895659809953 \cdot 10^{-240}:\\ \;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;x \leq 7.167218765572093 \cdot 10^{-118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.062045714431279 \cdot 10^{-99}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 5.987002526717022 \cdot 10^{-37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 5.4920582309728474 \cdot 10^{+38}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 1.505606431490598 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 5
Error29.8
Cost2032
\[\begin{array}{l} t_1 := y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ t_2 := -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ t_3 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ t_4 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -4.723300137072326 \cdot 10^{+37}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -1.9373128178702737 \cdot 10^{-235}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq -1.3604760146037694 \cdot 10^{-272}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.2848329192108776 \cdot 10^{-291}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 6.40730438311573 \cdot 10^{-283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8.928043134554823 \cdot 10^{-250}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 1.1503895659809953 \cdot 10^{-240}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 7.167218765572093 \cdot 10^{-118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.062045714431279 \cdot 10^{-99}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 5.987002526717022 \cdot 10^{-37}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 5.4920582309728474 \cdot 10^{+38}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 1.505606431490598 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 6
Error19.7
Cost1632
\[\begin{array}{l} t_1 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ t_2 := y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{if}\;x \leq -7.282750182993726 \cdot 10^{-25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.098102118864197 \cdot 10^{-35}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\ \mathbf{elif}\;x \leq -1.9373128178702737 \cdot 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.3604760146037694 \cdot 10^{-272}:\\ \;\;\;\;-9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ \mathbf{elif}\;x \leq -2.2848329192108776 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.40730438311573 \cdot 10^{-283}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.1060738686516988 \cdot 10^{-172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.167218765572093 \cdot 10^{-118}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error6.3
Cost1484
\[\begin{array}{l} t_1 := \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) - z \cdot \left(9 \cdot \left(y \cdot t\right)\right)\\ t_2 := x \cdot 2 + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ \mathbf{if}\;t \leq 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{+220}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+250}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error6.4
Cost1484
\[\begin{array}{l} t_1 := \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ t_2 := x \cdot 2 + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ \mathbf{if}\;t \leq 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{+220}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+250}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error0.6
Cost1476
\[\begin{array}{l} \mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 10^{+294}:\\ \;\;\;\;\left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) - z \cdot \left(9 \cdot \left(y \cdot t\right)\right)\\ \end{array} \]
Alternative 10
Error29.9
Cost1372
\[\begin{array}{l} t_1 := t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ t_2 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;x \leq -4.723300137072326 \cdot 10^{+37}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -1.9373128178702737 \cdot 10^{-235}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.3604760146037694 \cdot 10^{-272}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(z \cdot -9\right)\\ \mathbf{elif}\;x \leq -2.2848329192108776 \cdot 10^{-291}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 7.167218765572093 \cdot 10^{-118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.062045714431279 \cdot 10^{-99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 5.987002526717022 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 11
Error29.5
Cost1112
\[\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 -4.723300137072326 \cdot 10^{+37}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq -1.9373128178702737 \cdot 10^{-235}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.3604760146037694 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8.928043134554823 \cdot 10^{-250}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.0111882035087736 \cdot 10^{-136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.90958690406214 \cdot 10^{-81}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 12
Error13.5
Cost1096
\[\begin{array}{l} t_1 := 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;x \leq -0.00029887740261874647:\\ \;\;\;\;x \cdot 2 + t_1\\ \mathbf{elif}\;x \leq 2.90958690406214 \cdot 10^{-81}:\\ \;\;\;\;t_1 - z \cdot \left(9 \cdot \left(y \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ \end{array} \]
Alternative 13
Error13.5
Cost1096
\[\begin{array}{l} t_1 := 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;x \leq -0.00029887740261874647:\\ \;\;\;\;x \cdot 2 + t_1\\ \mathbf{elif}\;x \leq 2.90958690406214 \cdot 10^{-81}:\\ \;\;\;\;t_1 + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ \end{array} \]
Alternative 14
Error12.5
Cost1096
\[\begin{array}{l} t_1 := -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;x \leq -1.531703289271417 \cdot 10^{+22}:\\ \;\;\;\;x \cdot 2 + t_2\\ \mathbf{elif}\;x \leq 2.90958690406214 \cdot 10^{-81}:\\ \;\;\;\;t_2 + t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + t_1\\ \end{array} \]
Alternative 15
Error14.2
Cost968
\[\begin{array}{l} t_1 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;b \leq -2.1450307502764635 \cdot 10^{-181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.1074190215864036 \cdot 10^{-80}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error28.6
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -4.723300137072326 \cdot 10^{+37}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;x \leq 2.90958690406214 \cdot 10^{-81}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
Alternative 17
Error37.1
Cost192
\[x \cdot 2 \]

Error

Reproduce

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