Average Error: 5.5 → 1.9
Time: 25.2s
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 := i \cdot \left(x \cdot -4\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := t \cdot \left(a \cdot -4\right)\\ t_4 := \left(18 \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot t\right)\right) + b \cdot c\right) + \left(j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\right)\\ t_5 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t_3\right) + b \cdot c\right) + t_1\right) + t_2\\ \mathbf{if}\;t_5 \leq -\infty:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_5 \leq 2 \cdot 10^{+297}:\\ \;\;\;\;\left(\left(\left(t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right) + t_3\right) + b \cdot c\right) + t_1\right) + t_2\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \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 (* i (* x -4.0)))
        (t_2 (* k (* j -27.0)))
        (t_3 (* t (* a -4.0)))
        (t_4
         (+
          (+ (* 18.0 (* (* x z) (* y t))) (* b c))
          (+ (* j (* k -27.0)) (* x (* i -4.0)))))
        (t_5 (+ (+ (+ (+ (* (* (* (* x 18.0) y) z) t) t_3) (* b c)) t_1) t_2)))
   (if (<= t_5 (- INFINITY))
     t_4
     (if (<= t_5 2e+297)
       (+ (+ (+ (+ (* t (* z (* 18.0 (* x y)))) t_3) (* b c)) t_1) t_2)
       t_4))))
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 = i * (x * -4.0);
	double t_2 = k * (j * -27.0);
	double t_3 = t * (a * -4.0);
	double t_4 = ((18.0 * ((x * z) * (y * t))) + (b * c)) + ((j * (k * -27.0)) + (x * (i * -4.0)));
	double t_5 = (((((((x * 18.0) * y) * z) * t) + t_3) + (b * c)) + t_1) + t_2;
	double tmp;
	if (t_5 <= -((double) INFINITY)) {
		tmp = t_4;
	} else if (t_5 <= 2e+297) {
		tmp = ((((t * (z * (18.0 * (x * y)))) + t_3) + (b * c)) + t_1) + t_2;
	} else {
		tmp = t_4;
	}
	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 = i * (x * -4.0);
	double t_2 = k * (j * -27.0);
	double t_3 = t * (a * -4.0);
	double t_4 = ((18.0 * ((x * z) * (y * t))) + (b * c)) + ((j * (k * -27.0)) + (x * (i * -4.0)));
	double t_5 = (((((((x * 18.0) * y) * z) * t) + t_3) + (b * c)) + t_1) + t_2;
	double tmp;
	if (t_5 <= -Double.POSITIVE_INFINITY) {
		tmp = t_4;
	} else if (t_5 <= 2e+297) {
		tmp = ((((t * (z * (18.0 * (x * y)))) + t_3) + (b * c)) + t_1) + t_2;
	} else {
		tmp = t_4;
	}
	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 = i * (x * -4.0)
	t_2 = k * (j * -27.0)
	t_3 = t * (a * -4.0)
	t_4 = ((18.0 * ((x * z) * (y * t))) + (b * c)) + ((j * (k * -27.0)) + (x * (i * -4.0)))
	t_5 = (((((((x * 18.0) * y) * z) * t) + t_3) + (b * c)) + t_1) + t_2
	tmp = 0
	if t_5 <= -math.inf:
		tmp = t_4
	elif t_5 <= 2e+297:
		tmp = ((((t * (z * (18.0 * (x * y)))) + t_3) + (b * c)) + t_1) + t_2
	else:
		tmp = t_4
	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(i * Float64(x * -4.0))
	t_2 = Float64(k * Float64(j * -27.0))
	t_3 = Float64(t * Float64(a * -4.0))
	t_4 = Float64(Float64(Float64(18.0 * Float64(Float64(x * z) * Float64(y * t))) + Float64(b * c)) + Float64(Float64(j * Float64(k * -27.0)) + Float64(x * Float64(i * -4.0))))
	t_5 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) + t_3) + Float64(b * c)) + t_1) + t_2)
	tmp = 0.0
	if (t_5 <= Float64(-Inf))
		tmp = t_4;
	elseif (t_5 <= 2e+297)
		tmp = Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(18.0 * Float64(x * y)))) + t_3) + Float64(b * c)) + t_1) + t_2);
	else
		tmp = t_4;
	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 = i * (x * -4.0);
	t_2 = k * (j * -27.0);
	t_3 = t * (a * -4.0);
	t_4 = ((18.0 * ((x * z) * (y * t))) + (b * c)) + ((j * (k * -27.0)) + (x * (i * -4.0)));
	t_5 = (((((((x * 18.0) * y) * z) * t) + t_3) + (b * c)) + t_1) + t_2;
	tmp = 0.0;
	if (t_5 <= -Inf)
		tmp = t_4;
	elseif (t_5 <= 2e+297)
		tmp = ((((t * (z * (18.0 * (x * y)))) + t_3) + (b * c)) + t_1) + t_2;
	else
		tmp = t_4;
	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[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(18.0 * N[(N[(x * z), $MachinePrecision] * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$4, If[LessEqual[t$95$5, 2e+297], N[(N[(N[(N[(N[(t * N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$4]]]]]]]
\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 := i \cdot \left(x \cdot -4\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
t_3 := t \cdot \left(a \cdot -4\right)\\
t_4 := \left(18 \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot t\right)\right) + b \cdot c\right) + \left(j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\right)\\
t_5 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t_3\right) + b \cdot c\right) + t_1\right) + t_2\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t_5 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;\left(\left(\left(t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right) + t_3\right) + b \cdot c\right) + t_1\right) + t_2\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.5
Target1.6
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 2e297 < (-.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 51.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. Simplified32.6

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
      Proof
      (-.f64 (+.f64 (*.f64 t (-.f64 (*.f64 (*.f64 x 18) (*.f64 y z)) (*.f64 a 4))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (*.f64 t (-.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (*.f64 x 18) y) z)) (*.f64 a 4))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 13 points increase in error, 16 points decrease in error
      (-.f64 (+.f64 (*.f64 t (Rewrite=> sub-neg_binary64 (+.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) (neg.f64 (*.f64 a 4))))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (*.f64 t (Rewrite=> +-commutative_binary64 (+.f64 (neg.f64 (*.f64 a 4)) (*.f64 (*.f64 (*.f64 x 18) y) z)))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 (neg.f64 (*.f64 a 4)) t) (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 2 points decrease in error
      (-.f64 (+.f64 (+.f64 (Rewrite=> distribute-lft-neg-out_binary64 (neg.f64 (*.f64 (*.f64 a 4) t))) (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t)) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 (*.f64 (*.f64 a 4) t))) (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t)) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (Rewrite=> associate-+l-_binary64 (-.f64 0 (-.f64 (*.f64 (*.f64 a 4) t) (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t)))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 (*.f64 (*.f64 a 4) t)) (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 (*.f64 (*.f64 a 4) t))) (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t)) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (+.f64 (Rewrite<= distribute-lft-neg-out_binary64 (*.f64 (neg.f64 (*.f64 a 4)) t)) (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t)) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (neg.f64 (*.f64 a 4)) t))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t))) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (*.f64 j (*.f64 27 k)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (+.f64 (*.f64 x (*.f64 4 i)) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 j 27) k)))): 7 points increase in error, 6 points decrease in error
      (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k))): 0 points increase in error, 1 points decrease in error
      (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (Rewrite<= cancel-sign-sub_binary64 (-.f64 (*.f64 (*.f64 x 4) i) (*.f64 (neg.f64 (*.f64 j 27)) k)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-+l-_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 inf 14.3

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

      \[\leadsto \left(\color{blue}{18 \cdot \left(\left(z \cdot x\right) \cdot \left(y \cdot t\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      Proof
      (*.f64 18 (*.f64 (*.f64 z x) (*.f64 y t))): 0 points increase in error, 0 points decrease in error
      (*.f64 18 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 y t) (*.f64 z x)))): 0 points increase in error, 0 points decrease in error
      (*.f64 18 (Rewrite<= associate-*r*_binary64 (*.f64 y (*.f64 t (*.f64 z x))))): 37 points increase in error, 45 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)) < 2e297

    1. Initial program 0.2

      \[\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. Taylor expanded in x around 0 0.2

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

Alternatives

Alternative 1
Error21.2
Cost2536
\[\begin{array}{l} t_1 := b \cdot c + a \cdot \left(t \cdot -4\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ t_3 := b \cdot c + \left(t_2 + -4 \cdot \left(x \cdot i\right)\right)\\ t_4 := b \cdot c + \left(t_2 + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right)\\ t_5 := t_1 - 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;y \leq -6.6 \cdot 10^{+147}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{+135}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{+58}:\\ \;\;\;\;b \cdot c + \left(t_2 + -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{+20}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-43}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-78}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-193}:\\ \;\;\;\;t_1 + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-283}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 10^{+40}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 2
Error21.2
Cost2536
\[\begin{array}{l} t_1 := b \cdot c + a \cdot \left(t \cdot -4\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ t_3 := b \cdot c + \left(t_2 + -4 \cdot \left(x \cdot i\right)\right)\\ t_4 := b \cdot c + \left(t_2 + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right)\\ t_5 := t_1 - 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;y \leq -1.32 \cdot 10^{+149}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+134}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{+58}:\\ \;\;\;\;b \cdot c + \left(t_2 + -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{+19}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-47}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-79}:\\ \;\;\;\;b \cdot c + \left(t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right) + t_2\right)\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-193}:\\ \;\;\;\;t_1 + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-283}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 10^{+37}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 3
Error41.9
Cost2416
\[\begin{array}{l} t_1 := x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\ t_3 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -9 \cdot 10^{+150}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -1.52 \cdot 10^{+125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -7.5 \cdot 10^{+72}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -0.00035:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1 \cdot 10^{-80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -8.8 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -5 \cdot 10^{-131}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -9 \cdot 10^{-137}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;j \leq 5.5 \cdot 10^{-221}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 5.2 \cdot 10^{-180}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 1.2 \cdot 10^{-154}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 3 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error8.3
Cost2128
\[\begin{array}{l} t_1 := \left(18 \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot t\right)\right) + b \cdot c\right) + \left(j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\right)\\ t_2 := \left(b \cdot c + a \cdot \left(t \cdot -4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{if}\;a \leq -4 \cdot 10^{-52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-124}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-187}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.25 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error5.6
Cost2120
\[\begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ t_2 := \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right) + b \cdot c\right) + t_1\\ \mathbf{if}\;t \leq -5 \cdot 10^{-142}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-222}:\\ \;\;\;\;\left(18 \cdot \left(\left(x \cdot z\right) \cdot \left(y \cdot t\right)\right) + b \cdot c\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error11.8
Cost2000
\[\begin{array}{l} t_1 := 18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ t_3 := \left(b \cdot c + a \cdot \left(t \cdot -4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{+50}:\\ \;\;\;\;b \cdot c + \left(t \cdot t_1 + t_2\right)\\ \mathbf{elif}\;x \leq -1.02 \cdot 10^{-91}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-31}:\\ \;\;\;\;b \cdot c + \left(t_2 + t \cdot \left(t_1 + a \cdot -4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error42.0
Cost1888
\[\begin{array}{l} t_1 := x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -1.12 \cdot 10^{+151}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -1.3 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -5.8 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -6.2 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.02 \cdot 10^{-73}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 6.4 \cdot 10^{-218}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 9.2 \cdot 10^{-174}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 3.2 \cdot 10^{-117}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error9.8
Cost1864
\[\begin{array}{l} t_1 := \left(b \cdot c + a \cdot \left(t \cdot -4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{if}\;b \cdot c \leq -2 \cdot 10^{-92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-130}:\\ \;\;\;\;b \cdot c + \left(t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error45.0
Cost1640
\[\begin{array}{l} t_1 := a \cdot \left(t \cdot -4\right)\\ t_2 := i \cdot \left(x \cdot -4\right)\\ t_3 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;k \leq -2.1 \cdot 10^{-139}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq -4.3 \cdot 10^{-198}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq -4.3 \cdot 10^{-240}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq -7.2 \cdot 10^{-290}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 6.5 \cdot 10^{-221}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 4.5 \cdot 10^{-167}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 2.35 \cdot 10^{-132}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 1.2 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 125000000:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 2.2 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 10
Error17.6
Cost1356
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := b \cdot c + \left(t_1 + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{if}\;x \leq -3.3 \cdot 10^{+92}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+50}:\\ \;\;\;\;b \cdot c + \left(t_1 + -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error19.3
Cost1356
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := b \cdot c + \left(t_1 + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{if}\;a \leq -9.8 \cdot 10^{+47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-51}:\\ \;\;\;\;b \cdot c + \left(t_1 + -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+21}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + a \cdot \left(t \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \end{array} \]
Alternative 12
Error17.5
Cost1356
\[\begin{array}{l} t_1 := b \cdot c + a \cdot \left(t \cdot -4\right)\\ \mathbf{if}\;x \leq -3.6 \cdot 10^{+92}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-69}:\\ \;\;\;\;b \cdot c + \left(-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-52}:\\ \;\;\;\;t_1 + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 - 4 \cdot \left(x \cdot i\right)\\ \end{array} \]
Alternative 13
Error19.7
Cost1224
\[\begin{array}{l} t_1 := x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{if}\;x \leq -6.3 \cdot 10^{+91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+117}:\\ \;\;\;\;b \cdot c + \left(-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error18.3
Cost1224
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;t \leq -5.3 \cdot 10^{-79}:\\ \;\;\;\;b \cdot c + \left(t_1 + -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-8}:\\ \;\;\;\;b \cdot c + \left(t_1 + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\ \end{array} \]
Alternative 15
Error44.9
Cost848
\[\begin{array}{l} t_1 := a \cdot \left(t \cdot -4\right)\\ \mathbf{if}\;t \leq -9 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-151}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-144}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-10}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error43.2
Cost584
\[\begin{array}{l} \mathbf{if}\;c \leq -1.22 \cdot 10^{-63}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{+69}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 17
Error47.8
Cost192
\[b \cdot c \]

Error

Reproduce

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