Average Error: 5.6 → 1.9
Time: 30.7s
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(18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + \left(-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\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 10^{+281}:\\ \;\;\;\;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)
          (+
           (* 18.0 (* x (* z (* y t))))
           (+ (* -4.0 (* x i)) (* -27.0 (* j k))))))
        (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 1e+281) 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) + ((18.0 * (x * (z * (y * t)))) + ((-4.0 * (x * i)) + (-27.0 * (j * k))));
	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 <= 1e+281) {
		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) + ((18.0 * (x * (z * (y * t)))) + ((-4.0 * (x * i)) + (-27.0 * (j * k))));
	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 <= 1e+281) {
		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) + ((18.0 * (x * (z * (y * t)))) + ((-4.0 * (x * i)) + (-27.0 * (j * k))))
	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 <= 1e+281:
		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(18.0 * Float64(x * Float64(z * Float64(y * t)))) + Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k)))))
	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 <= 1e+281)
		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) + ((18.0 * (x * (z * (y * t)))) + ((-4.0 * (x * i)) + (-27.0 * (j * k))));
	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 <= 1e+281)
		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[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $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, 1e+281], 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(18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + \left(-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\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 10^{+281}:\\
\;\;\;\;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.7
Herbie1.9
\[\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 1e281 < (-.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 41.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 \]
    2. Simplified27.7

      \[\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))))): 1 points increase in error, 3 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, 1 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))))): 13 points increase in error, 12 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))))): 5 points increase in error, 1 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, 1 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)))): 2 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))): 7 points increase in error, 7 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 a around 0 16.6

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

      \[\leadsto c \cdot b + \left(\color{blue}{\left(0 + \left(t \cdot \left(\left(z \cdot x\right) \cdot y\right)\right) \cdot 18\right)} + \left(-4 \cdot \left(i \cdot x\right) + -27 \cdot \left(k \cdot j\right)\right)\right) \]
    5. Taylor expanded in t around 0 16.6

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

      \[\leadsto c \cdot b + \left(\left(0 + \color{blue}{\left(\left(\left(y \cdot t\right) \cdot z\right) \cdot x\right)} \cdot 18\right) + \left(-4 \cdot \left(i \cdot x\right) + -27 \cdot \left(k \cdot j\right)\right)\right) \]
      Proof
      (*.f64 (*.f64 (*.f64 y t) z) x): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r*_binary64 (*.f64 (*.f64 y t) (*.f64 z x))): 43 points increase in error, 38 points decrease in error
      (Rewrite<= associate-*r*_binary64 (*.f64 y (*.f64 t (*.f64 z x)))): 35 points increase in error, 47 points decrease in error

    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)) < 1e281

    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.9

    \[\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(18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + \left(-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\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 10^{+281}:\\ \;\;\;\;\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(18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + \left(-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error6.0
Cost2384
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := y \cdot \left(x \cdot z\right)\\ t_3 := 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)\\ t_4 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;a \leq -1.7951540626693414 \cdot 10^{-250}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 1.4692564754245832 \cdot 10^{-173}:\\ \;\;\;\;b \cdot c + \left(\left(t_4 + t_1\right) + 18 \cdot \left(t \cdot t_2\right)\right)\\ \mathbf{elif}\;a \leq 1.7439792692270434 \cdot 10^{-62}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 34713712434259.17:\\ \;\;\;\;t \cdot \left(18 \cdot t_2 + a \cdot -4\right) + \left(b \cdot c + t_4\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 2
Error9.6
Cost2376
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+28}:\\ \;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t_2 \leq 10^{+69}:\\ \;\;\;\;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}:\\ \;\;\;\;b \cdot c + \left(\left(t_1 + -27 \cdot \left(j \cdot k\right)\right) + 18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\right)\\ \end{array} \]
Alternative 3
Error27.0
Cost2256
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ t_3 := b \cdot c + t_1\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-21}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{-226}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+32}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1 + -27 \cdot \left(j \cdot k\right)\\ \end{array} \]
Alternative 4
Error8.0
Cost2248
\[\begin{array}{l} t_1 := \left(\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 500:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right) + \left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error1.8
Cost2248
\[\begin{array}{l} t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right) + t \cdot \left(a \cdot -4\right)\right)\right) + i \cdot \left(x \cdot -4\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t \leq -1 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{+35}:\\ \;\;\;\;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{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error27.9
Cost2128
\[\begin{array}{l} t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ t_3 := b \cdot c + -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-21}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{-226}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t_2 \leq 10^{+123}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error9.0
Cost2128
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ t_3 := -4 \cdot \left(x \cdot i\right)\\ t_4 := b \cdot c + \left(18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + \left(t_3 + t_1\right)\right)\\ \mathbf{if}\;x \leq -2.7 \cdot 10^{+57}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 1.1610876995438754 \cdot 10^{-42}:\\ \;\;\;\;\left(\left(b \cdot c + t_2\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+78}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right) + \left(b \cdot c + t_3\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+176}:\\ \;\;\;\;b \cdot c + \left(\left(t_1 + t_2\right) + x \cdot \left(i \cdot -4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 8
Error8.5
Cost1864
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := \left(\left(b \cdot c + t_1\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;i \leq -9.111029859042767 \cdot 10^{-48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 1.2394938193722005 \cdot 10^{-191}:\\ \;\;\;\;b \cdot c + \left(\left(-27 \cdot \left(j \cdot k\right) + t_1\right) + x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error16.2
Cost1736
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ t_3 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_3 \leq -5 \cdot 10^{+60}:\\ \;\;\;\;\left(b \cdot c + t_2\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{+44}:\\ \;\;\;\;b \cdot c + \left(t_1 + t_2\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + -27 \cdot \left(j \cdot k\right)\\ \end{array} \]
Alternative 10
Error14.9
Cost1736
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ t_2 := b \cdot c + \left(t_1 + -27 \cdot \left(j \cdot k\right)\right)\\ t_3 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_3 \leq -2 \cdot 10^{+74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 200:\\ \;\;\;\;b \cdot c + \left(t_1 + -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error9.6
Cost1344
\[\left(\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) + i \cdot \left(x \cdot -4\right)\right) + k \cdot \left(j \cdot -27\right) \]
Alternative 12
Error31.9
Cost1236
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := b \cdot c + -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;x \leq -1.3045819504079962 \cdot 10^{-80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -4.151270146443374 \cdot 10^{-116}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 1.0376247696112096 \cdot 10^{-231}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.2961582330811794 \cdot 10^{-211}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;x \leq 1.182198870855596 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error20.6
Cost1224
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;x \leq -8 \cdot 10^{+71}:\\ \;\;\;\;t_1 + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{+205}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t_1\\ \end{array} \]
Alternative 14
Error44.1
Cost848
\[\begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;c \leq -5.529275261602329 \cdot 10^{-14}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 8.176720866036487 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{+134}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{+193}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 15
Error44.6
Cost848
\[\begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;x \leq -1.3045819504079962 \cdot 10^{-80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.2235463732950345 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.792942967366949 \cdot 10^{-256}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 6.919318817490936 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error44.6
Cost848
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;x \leq -1.3045819504079962 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.2235463732950345 \cdot 10^{-130}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 4.792942967366949 \cdot 10^{-256}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 6.919318817490936 \cdot 10^{-94}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error44.6
Cost848
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;x \leq -1.3045819504079962 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.2235463732950345 \cdot 10^{-130}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 4.792942967366949 \cdot 10^{-256}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 6.919318817490936 \cdot 10^{-94}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error35.0
Cost840
\[\begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;k \leq -1.5985834108589816 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 5.3 \cdot 10^{+138}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error48.9
Cost192
\[b \cdot c \]

Error

Reproduce

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