Average Error: 5.6 → 1.2
Time: 35.1s
Precision: binary64
Cost: 6088
\[ \begin{array}{c}[y, z] = \mathsf{sort}([y, z])\\ \end{array} \]
\[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
\[\begin{array}{l} t_1 := b \cdot c + \left(x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right) + \left(-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(t \cdot a\right)\right)\right)\\ t_2 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t \cdot \left(a \cdot -4\right)\right) + b \cdot c\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (-
  (-
   (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
   (* (* x 4.0) i))
  (* (* j 27.0) k)))
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1
         (+
          (* b c)
          (+
           (* x (+ (* 18.0 (* y (* z t))) (* i -4.0)))
           (+ (* -27.0 (* j k)) (* -4.0 (* t a))))))
        (t_2
         (+
          (+
           (+ (+ (* (* (* (* x 18.0) y) z) t) (* t (* a -4.0))) (* b c))
           (* i (* x -4.0)))
          (* k (* j -27.0)))))
   (if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 2e+277) t_2 t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + ((x * ((18.0 * (y * (z * t))) + (i * -4.0))) + ((-27.0 * (j * k)) + (-4.0 * (t * a))));
	double t_2 = (((((((x * 18.0) * y) * z) * t) + (t * (a * -4.0))) + (b * c)) + (i * (x * -4.0))) + (k * (j * -27.0));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= 2e+277) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + ((x * ((18.0 * (y * (z * t))) + (i * -4.0))) + ((-27.0 * (j * k)) + (-4.0 * (t * a))));
	double t_2 = (((((((x * 18.0) * y) * z) * t) + (t * (a * -4.0))) + (b * c)) + (i * (x * -4.0))) + (k * (j * -27.0));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= 2e+277) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) + ((x * ((18.0 * (y * (z * t))) + (i * -4.0))) + ((-27.0 * (j * k)) + (-4.0 * (t * a))))
	t_2 = (((((((x * 18.0) * y) * z) * t) + (t * (a * -4.0))) + (b * c)) + (i * (x * -4.0))) + (k * (j * -27.0))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= 2e+277:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
end
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) + Float64(Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) + Float64(i * -4.0))) + Float64(Float64(-27.0 * Float64(j * k)) + Float64(-4.0 * Float64(t * a)))))
	t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) + Float64(t * Float64(a * -4.0))) + Float64(b * c)) + Float64(i * Float64(x * -4.0))) + Float64(k * Float64(j * -27.0)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= 2e+277)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) + ((x * ((18.0 * (y * (z * t))) + (i * -4.0))) + ((-27.0 * (j * k)) + (-4.0 * (t * a))));
	t_2 = (((((((x * 18.0) * y) * z) * t) + (t * (a * -4.0))) + (b * c)) + (i * (x * -4.0))) + (k * (j * -27.0));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= 2e+277)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e+277], t$95$2, t$95$1]]]]
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\begin{array}{l}
t_1 := b \cdot c + \left(x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right) + \left(-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(t \cdot a\right)\right)\right)\\
t_2 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t \cdot \left(a \cdot -4\right)\right) + b \cdot c\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+277}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.6
Target1.6
Herbie1.2
\[\begin{array}{l} \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;\left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - \left(a \cdot t + i \cdot x\right) \cdot 4\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - \left(a \cdot t + i \cdot x\right) \cdot 4\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - \left(a \cdot t + i \cdot x\right) \cdot 4\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \end{array} \]

Derivation

  1. Split input into 2 regimes
  2. if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < -inf.0 or 2.00000000000000001e277 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k))

    1. Initial program 39.0

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified25.5

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(t, \mathsf{fma}\left(x, y \cdot \left(18 \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, i \cdot \left(x \cdot -4\right)\right)\right)\right)} \]
      Proof
      (fma.f64 j (*.f64 k -27) (fma.f64 t (fma.f64 x (*.f64 y (*.f64 18 z)) (*.f64 a -4)) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (*.f64 k (Rewrite<= metadata-eval (neg.f64 27))) (fma.f64 t (fma.f64 x (*.f64 y (*.f64 18 z)) (*.f64 a -4)) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 k 27))) (fma.f64 t (fma.f64 x (*.f64 y (*.f64 18 z)) (*.f64 a -4)) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 27 k))) (fma.f64 t (fma.f64 x (*.f64 y (*.f64 18 z)) (*.f64 a -4)) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (fma.f64 x (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 y 18) z)) (*.f64 a -4)) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 3 points increase in error, 1 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (fma.f64 x (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 18 y)) z) (*.f64 a -4)) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (fma.f64 x (*.f64 (*.f64 18 y) z) (*.f64 a (Rewrite<= metadata-eval (neg.f64 4)))) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (fma.f64 x (*.f64 (*.f64 18 y) z) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 a 4)))) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 x (*.f64 (*.f64 18 y) z)) (*.f64 a 4))) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (-.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x (*.f64 18 y)) z)) (*.f64 a 4)) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 11 points increase in error, 19 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (-.f64 (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x 18) y)) z) (*.f64 a 4)) (fma.f64 b c (*.f64 i (*.f64 x -4))))): 2 points increase in error, 3 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (-.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) (*.f64 a 4)) (fma.f64 b c (*.f64 i (*.f64 x (Rewrite<= metadata-eval (neg.f64 4))))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (-.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) (*.f64 a 4)) (fma.f64 b c (*.f64 i (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 x 4))))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (-.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) (*.f64 a 4)) (fma.f64 b c (Rewrite<= *-commutative_binary64 (*.f64 (neg.f64 (*.f64 x 4)) i))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (-.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) (*.f64 a 4)) (fma.f64 b c (Rewrite=> distribute-lft-neg-out_binary64 (neg.f64 (*.f64 (*.f64 x 4) i)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (fma.f64 t (-.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) (*.f64 a 4)) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 b c) (*.f64 (*.f64 x 4) i))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 t (-.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) (*.f64 a 4))) (-.f64 (*.f64 b c) (*.f64 (*.f64 x 4) i))))): 1 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (+.f64 (Rewrite<= distribute-rgt-out--_binary64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t))) (-.f64 (*.f64 b c) (*.f64 (*.f64 x 4) i)))): 1 points increase in error, 0 points decrease in error
      (fma.f64 j (neg.f64 (*.f64 27 k)) (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 j (neg.f64 (*.f64 27 k))) (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 j (*.f64 27 k)))) (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i))): 0 points increase in error, 0 points decrease in error
      (+.f64 (neg.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 j 27) k))) (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i))): 12 points increase in error, 9 points decrease in error
      (+.f64 (Rewrite<= distribute-lft-neg-out_binary64 (*.f64 (neg.f64 (*.f64 j 27)) k)) (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (neg.f64 (*.f64 j 27)) k))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in x around 0 7.1

      \[\leadsto \color{blue}{c \cdot b + \left(\left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) + -4 \cdot i\right) \cdot x + \left(-27 \cdot \left(k \cdot j\right) + -4 \cdot \left(a \cdot t\right)\right)\right)} \]

    if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < 2.00000000000000001e277

    1. Initial program 0.3

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.2

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

Alternatives

Alternative 1
Error1.3
Cost5320
\[\begin{array}{l} t_1 := b \cdot c + \left(x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right) + \left(-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(t \cdot a\right)\right)\right)\\ t_2 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t \cdot \left(a \cdot -4\right)\right) + b \cdot c\right) + i \cdot \left(x \cdot -4\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;t_2 + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error3.9
Cost2248
\[\begin{array}{l} t_1 := b \cdot c + \left(x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right) + \left(-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(t \cdot a\right)\right)\right)\\ \mathbf{if}\;x \leq -9.919881455057384 \cdot 10^{-92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 10000000000:\\ \;\;\;\;\left(\left(b \cdot c + \left(\left(x \cdot z\right) \cdot \left(18 \cdot \left(y \cdot t\right)\right) + t \cdot \left(a \cdot -4\right)\right)\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error4.7
Cost2120
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := b \cdot c + \left(x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right) + \left(t_1 + -4 \cdot \left(t \cdot a\right)\right)\right)\\ \mathbf{if}\;x \leq -9.55555176399218 \cdot 10^{-107}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 7.749373670544433 \cdot 10^{-51}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right) + \left(b \cdot c + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error7.8
Cost1732
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;y \leq -4.5 \cdot 10^{+138}:\\ \;\;\;\;b \cdot c + \left(18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + \left(t_2 + t_1\right)\right)\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c + \left(\left(t_2 + -4 \cdot \left(t \cdot a\right)\right) + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t_2\right) + 18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\ \end{array} \]
Alternative 5
Error17.5
Cost1620
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := b \cdot c + t_1\\ t_3 := -4 \cdot \left(x \cdot i\right)\\ t_4 := -4 \cdot \left(t \cdot a\right)\\ t_5 := b \cdot c + \left(t_1 + t_3\right)\\ \mathbf{if}\;x \leq -9.146357878969864 \cdot 10^{-58}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;x \leq -3.478276410692164 \cdot 10^{-149}:\\ \;\;\;\;t_2 + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq 6.1660768854480286 \cdot 10^{-148}:\\ \;\;\;\;t_4 + t_2\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+67}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+130}:\\ \;\;\;\;t_4 + \left(b \cdot c + t_3\right)\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 6
Error9.2
Cost1608
\[\begin{array}{l} t_1 := b \cdot c + -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;y \leq -4.9 \cdot 10^{+231}:\\ \;\;\;\;t_1 + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+73}:\\ \;\;\;\;\left(\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + 18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\ \end{array} \]
Alternative 7
Error9.0
Cost1608
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := b \cdot c + t_1\\ \mathbf{if}\;y \leq -4.9 \cdot 10^{+231}:\\ \;\;\;\;t_2 + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c + \left(\left(t_1 + -4 \cdot \left(t \cdot a\right)\right) + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 + 18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\ \end{array} \]
Alternative 8
Error17.1
Cost1488
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ t_3 := -4 \cdot \left(x \cdot i\right)\\ t_4 := b \cdot c + \left(t_2 + t_3\right)\\ \mathbf{if}\;x \leq -9.146357878969864 \cdot 10^{-58}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 6.1660768854480286 \cdot 10^{-148}:\\ \;\;\;\;t_1 + \left(b \cdot c + t_2\right)\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+67}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+130}:\\ \;\;\;\;t_1 + \left(b \cdot c + t_3\right)\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 9
Error23.4
Cost1224
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ t_2 := -27 \cdot \left(j \cdot k\right) + t_1\\ \mathbf{if}\;j \leq -2.3 \cdot 10^{+160}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 5.196726105845677 \cdot 10^{-41}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + \left(b \cdot c + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error18.5
Cost1224
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := t_1 + \left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{if}\;x \leq -9.146357878969864 \cdot 10^{-58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 3.1290021640872523 \cdot 10^{-50}:\\ \;\;\;\;t_1 + \left(b \cdot c + -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error36.4
Cost1104
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(x \cdot i\right)\\ t_2 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;j \leq -1.6 \cdot 10^{+271}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -3.1 \cdot 10^{+223}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -4.6 \cdot 10^{+122}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 6.590401379984524 \cdot 10^{-90}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]
Alternative 12
Error44.6
Cost980
\[\begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := i \cdot \left(x \cdot -4\right)\\ \mathbf{if}\;x \leq -6.269379862220745 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.599180058352187 \cdot 10^{-194}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 3.715642671554427 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.2376109895702952 \cdot 10^{-220}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 1.3041508808166679 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error44.6
Cost980
\[\begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := i \cdot \left(x \cdot -4\right)\\ \mathbf{if}\;x \leq -6.269379862220745 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.599180058352187 \cdot 10^{-194}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 3.715642671554427 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.2376109895702952 \cdot 10^{-220}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 1.3041508808166679 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error44.6
Cost980
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := i \cdot \left(x \cdot -4\right)\\ \mathbf{if}\;x \leq -6.269379862220745 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.599180058352187 \cdot 10^{-194}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 3.715642671554427 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.2376109895702952 \cdot 10^{-220}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 1.3041508808166679 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error30.8
Cost968
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := t_1 + -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;x \leq -6.269379862220745 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.25115223332353 \cdot 10^{-64}:\\ \;\;\;\;b \cdot c + t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error30.6
Cost840
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;x \leq -9.146357878969864 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.1290021640872523 \cdot 10^{-50}:\\ \;\;\;\;b \cdot c + -27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error44.9
Cost584
\[\begin{array}{l} t_1 := i \cdot \left(x \cdot -4\right)\\ \mathbf{if}\;x \leq -6.269379862220745 \cdot 10^{-72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.25115223332353 \cdot 10^{-64}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error48.1
Cost192
\[b \cdot c \]

Error

Reproduce

herbie shell --seed 2022298 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :herbie-target
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))