?

Average Error: 5.7 → 0.9
Time: 1.1min
Precision: binary64
Cost: 6088

?

\[ \begin{array}{c}[y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \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 := x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ t_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\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+303}:\\ \;\;\;\;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
         (+
          (* x (- (* -4.0 i) (* y (* z (* t -18.0)))))
          (- (* b c) (* j (* 27.0 k)))))
        (t_2
         (-
          (-
           (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
           (* (* x 4.0) i))
          (* (* j 27.0) k))))
   (if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 5e+303) 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 = (x * ((-4.0 * i) - (y * (z * (t * -18.0))))) + ((b * c) - (j * (27.0 * k)));
	double t_2 = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= 5e+303) {
		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 = (x * ((-4.0 * i) - (y * (z * (t * -18.0))))) + ((b * c) - (j * (27.0 * k)));
	double t_2 = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= 5e+303) {
		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 = (x * ((-4.0 * i) - (y * (z * (t * -18.0))))) + ((b * c) - (j * (27.0 * k)))
	t_2 = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= 5e+303:
		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(x * Float64(Float64(-4.0 * i) - Float64(y * Float64(z * Float64(t * -18.0))))) + Float64(Float64(b * c) - Float64(j * Float64(27.0 * k))))
	t_2 = 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))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= 5e+303)
		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 = (x * ((-4.0 * i) - (y * (z * (t * -18.0))))) + ((b * c) - (j * (27.0 * k)));
	t_2 = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= 5e+303)
		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[(x * N[(N[(-4.0 * i), $MachinePrecision] - N[(y * N[(z * N[(t * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $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[(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]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 5e+303], 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 := x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\
t_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\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+303}:\\
\;\;\;\;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.7
Target1.7
Herbie0.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 4.9999999999999997e303 < (-.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 58.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. Simplified36.0

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

      [Start]58.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 \]

      rational.json-simplify-48 [=>]58.2

      \[ \color{blue}{\left(b \cdot c + \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) - \left(x \cdot 4\right) \cdot i\right)\right)} - \left(j \cdot 27\right) \cdot k \]

      rational.json-simplify-48 [=>]58.2

      \[ \color{blue}{\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) - \left(x \cdot 4\right) \cdot i\right) + \left(b \cdot c - \left(j \cdot 27\right) \cdot k\right)} \]

      rational.json-simplify-2 [=>]58.2

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

      rational.json-simplify-52 [=>]58.2

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

      rational.json-simplify-2 [=>]58.2

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

      rational.json-simplify-43 [=>]36.8

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

      rational.json-simplify-2 [=>]36.8

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

      rational.json-simplify-43 [=>]36.8

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

      rational.json-simplify-2 [=>]36.8

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

      rational.json-simplify-43 [=>]36.0

      \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) - x \cdot \left(4 \cdot i\right)\right) + \left(b \cdot c - \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Taylor expanded in x around -inf 6.8

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

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

      [Start]6.8

      \[ -1 \cdot \left(\left(-18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - -4 \cdot i\right) \cdot x\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right) \]

      rational.json-simplify-2 [=>]6.8

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

      rational.json-simplify-43 [=>]6.8

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

      rational.json-simplify-9 [=>]6.8

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

      rational.json-simplify-12 [=>]6.8

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

      rational.json-simplify-2 [=>]6.8

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

      metadata-eval [<=]6.8

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

      rational.json-simplify-49 [<=]6.8

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

      rational.json-simplify-45 [=>]6.8

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

      rational.json-simplify-49 [=>]6.8

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

      metadata-eval [=>]6.8

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

      rational.json-simplify-2 [<=]6.8

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

      rational.json-simplify-5 [=>]6.8

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

      rational.json-simplify-43 [=>]6.8

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

      rational.json-simplify-2 [=>]6.8

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

      rational.json-simplify-2 [=>]6.8

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

      rational.json-simplify-43 [=>]6.8

      \[ x \cdot \left(-4 \cdot i - y \cdot \color{blue}{\left(z \cdot \left(t \cdot -18\right)\right)}\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\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)) < 4.9999999999999997e303

    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 simplification0.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 - \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 \leq -\infty:\\ \;\;\;\;x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;\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 \leq 5 \cdot 10^{+303}:\\ \;\;\;\;\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\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error23.7
Cost2780
\[\begin{array}{l} t_1 := -4 \cdot \left(a \cdot t\right)\\ t_2 := t_1 - 4 \cdot \left(i \cdot x\right)\\ t_3 := x \cdot \left(-4 \cdot i\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ t_4 := c \cdot b + t_1\\ \mathbf{if}\;j \cdot 27 \leq -0.04:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{-151}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{-202}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{-222}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{-290}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq 10^{-274}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \cdot 27 \leq 5 \cdot 10^{-211}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 2
Error19.4
Cost2776
\[\begin{array}{l} t_1 := c \cdot b + -4 \cdot \left(a \cdot t\right)\\ t_2 := t_1 - 27 \cdot \left(k \cdot j\right)\\ t_3 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{if}\;j \cdot 27 \leq -2 \cdot 10^{+166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{+137}:\\ \;\;\;\;x \cdot \left(-4 \cdot i\right) + t_3\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{+55}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq -2:\\ \;\;\;\;y \cdot \left(t \cdot \left(18 \cdot \left(z \cdot x\right)\right)\right) + t_3\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{-141}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq 10^{-37}:\\ \;\;\;\;t_1 - 4 \cdot \left(i \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(t \cdot z\right)\right)\right) + t_3\\ \end{array} \]
Alternative 3
Error18.9
Cost2256
\[\begin{array}{l} t_1 := c \cdot b + -4 \cdot \left(a \cdot t\right)\\ t_2 := t_1 - 27 \cdot \left(k \cdot j\right)\\ t_3 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{if}\;j \cdot 27 \leq -2 \cdot 10^{+166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{+138}:\\ \;\;\;\;x \cdot \left(-4 \cdot i\right) + t_3\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{-141}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq 10^{-37}:\\ \;\;\;\;t_1 - 4 \cdot \left(i \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(t \cdot z\right)\right)\right) + t_3\\ \end{array} \]
Alternative 4
Error4.9
Cost2120
\[\begin{array}{l} t_1 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ t_2 := t \cdot \left(x \cdot \left(y \cdot \left(18 \cdot z\right)\right) - a \cdot 4\right) + \left(t_1 - x \cdot \left(4 \cdot i\right)\right)\\ \mathbf{if}\;t \leq -3.8 \cdot 10^{-95}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-227}:\\ \;\;\;\;x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error4.6
Cost2120
\[\begin{array}{l} t_1 := j \cdot \left(27 \cdot k\right)\\ t_2 := x \cdot \left(4 \cdot i\right)\\ t_3 := b \cdot c - t_1\\ \mathbf{if}\;t \leq -1.3 \cdot 10^{-94}:\\ \;\;\;\;t \cdot \left(x \cdot \left(y \cdot \left(18 \cdot z\right)\right) - a \cdot 4\right) + \left(t_3 - t_2\right)\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-230}:\\ \;\;\;\;x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + t_3\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(x \cdot \left(18 \cdot z\right)\right) - a \cdot 4\right) + \left(\left(b \cdot c - t_2\right) - t_1\right)\\ \end{array} \]
Alternative 6
Error4.6
Cost2120
\[\begin{array}{l} t_1 := j \cdot \left(27 \cdot k\right)\\ t_2 := x \cdot \left(4 \cdot i\right)\\ \mathbf{if}\;t \leq -2 \cdot 10^{-93}:\\ \;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) - t_2\right) + \left(b \cdot c - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-229}:\\ \;\;\;\;x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + \left(b \cdot c - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(x \cdot \left(18 \cdot z\right)\right) - a \cdot 4\right) + \left(\left(b \cdot c - t_2\right) - t_1\right)\\ \end{array} \]
Alternative 7
Error4.6
Cost2120
\[\begin{array}{l} t_1 := j \cdot \left(27 \cdot k\right)\\ t_2 := x \cdot \left(4 \cdot i\right)\\ t_3 := b \cdot c - t_1\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{-95}:\\ \;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) - t_2\right) + t_3\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-227}:\\ \;\;\;\;x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + t_3\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(x \cdot \left(18 \cdot z\right)\right) - a \cdot 4\right) + \left(\left(b \cdot c - t_2\right) - t_1\right)\\ \end{array} \]
Alternative 8
Error18.3
Cost2000
\[\begin{array}{l} t_1 := x \cdot \left(-4 \cdot i\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ t_2 := \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)\\ \mathbf{if}\;j \cdot 27 \leq -1 \cdot 10^{+190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{+173}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq -0.04:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \cdot 27 \leq 10^{-37}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(k \cdot j\right)\\ \end{array} \]
Alternative 9
Error18.6
Cost2000
\[\begin{array}{l} t_1 := c \cdot b + -4 \cdot \left(a \cdot t\right)\\ t_2 := t_1 - 27 \cdot \left(k \cdot j\right)\\ \mathbf{if}\;j \cdot 27 \leq -2 \cdot 10^{+166}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{+138}:\\ \;\;\;\;x \cdot \left(-4 \cdot i\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{-141}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \cdot 27 \leq 10^{-39}:\\ \;\;\;\;t_1 - 4 \cdot \left(i \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error8.3
Cost1996
\[\begin{array}{l} t_1 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ t_2 := x \cdot \left(4 \cdot i\right)\\ t_3 := \left(y \cdot \left(x \cdot \left(t \cdot \left(18 \cdot z\right)\right)\right) - t_2\right) + t_1\\ t_4 := \left(t \cdot \left(a \cdot -4\right) - t_2\right) + t_1\\ \mathbf{if}\;y \leq -1.05 \cdot 10^{+198}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+154}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{+64}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 11
Error9.8
Cost1868
\[\begin{array}{l} t_1 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ t_2 := \left(t \cdot \left(a \cdot -4\right) - x \cdot \left(4 \cdot i\right)\right) + t_1\\ \mathbf{if}\;y \leq -5.7 \cdot 10^{+206}:\\ \;\;\;\;y \cdot \left(t \cdot \left(18 \cdot \left(z \cdot x\right)\right)\right) + t_1\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{+156}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(-4 \cdot i - y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error9.8
Cost1868
\[\begin{array}{l} t_1 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ t_2 := \left(t \cdot \left(a \cdot -4\right) - x \cdot \left(4 \cdot i\right)\right) + t_1\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{+202}:\\ \;\;\;\;y \cdot \left(t \cdot \left(18 \cdot \left(z \cdot x\right)\right)\right) + t_1\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{+155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+63}:\\ \;\;\;\;\left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - 4 \cdot i\right) \cdot x + t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error44.3
Cost1508
\[\begin{array}{l} t_1 := -27 \cdot \left(k \cdot j\right)\\ t_2 := -4 \cdot \left(a \cdot t\right)\\ \mathbf{if}\;j \leq -3 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -4 \cdot 10^{+34}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;j \leq -0.00056:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.36 \cdot 10^{-155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -2.35 \cdot 10^{-207}:\\ \;\;\;\;-4 \cdot \left(i \cdot x\right)\\ \mathbf{elif}\;j \leq -2.1 \cdot 10^{-291}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 1.16 \cdot 10^{-272}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;j \leq 1.92 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 57000:\\ \;\;\;\;c \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error44.2
Cost1508
\[\begin{array}{l} t_1 := -4 \cdot \left(a \cdot t\right)\\ t_2 := -27 \cdot \left(k \cdot j\right)\\ \mathbf{if}\;j \leq -2.3 \cdot 10^{+70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -1.05 \cdot 10^{+35}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;j \leq -9 \cdot 10^{-5}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;j \leq -2.35 \cdot 10^{-154}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -6.2 \cdot 10^{-209}:\\ \;\;\;\;-4 \cdot \left(i \cdot x\right)\\ \mathbf{elif}\;j \leq -2.6 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 8.5 \cdot 10^{-276}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;j \leq 9.5 \cdot 10^{-208}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 0.042:\\ \;\;\;\;c \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error33.7
Cost1500
\[\begin{array}{l} t_1 := x \cdot \left(-4 \cdot i\right) + c \cdot b\\ t_2 := c \cdot b + -4 \cdot \left(a \cdot t\right)\\ t_3 := -27 \cdot \left(k \cdot j\right)\\ \mathbf{if}\;j \leq -2.55 \cdot 10^{+188}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -3.6 \cdot 10^{+162}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -8.8 \cdot 10^{+135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.3 \cdot 10^{-155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 1.28 \cdot 10^{-285}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 2.4 \cdot 10^{-207}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 340000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 16
Error9.5
Cost1476
\[\begin{array}{l} t_1 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{+207}:\\ \;\;\;\;y \cdot \left(t \cdot \left(18 \cdot \left(z \cdot x\right)\right)\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot \left(a \cdot -4\right) - x \cdot \left(4 \cdot i\right)\right) + t_1\\ \end{array} \]
Alternative 17
Error45.0
Cost1376
\[\begin{array}{l} t_1 := -27 \cdot \left(k \cdot j\right)\\ t_2 := -4 \cdot \left(a \cdot t\right)\\ \mathbf{if}\;t \leq -8.8 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-179}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-262}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-226}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-10}:\\ \;\;\;\;c \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 18
Error30.3
Cost1368
\[\begin{array}{l} t_1 := 27 \cdot \left(k \cdot j\right)\\ t_2 := -4 \cdot \left(a \cdot t\right)\\ t_3 := t_2 - t_1\\ t_4 := t_2 - 4 \cdot \left(i \cdot x\right)\\ t_5 := c \cdot b - t_1\\ \mathbf{if}\;c \leq -5.2 \cdot 10^{-154}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq -2.1 \cdot 10^{-200}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 2.2 \cdot 10^{-256}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{-212}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 5.2 \cdot 10^{-24}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{+77}:\\ \;\;\;\;c \cdot b + t_2\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 19
Error30.2
Cost1368
\[\begin{array}{l} t_1 := 27 \cdot \left(k \cdot j\right)\\ t_2 := -4 \cdot \left(a \cdot t\right)\\ t_3 := t_2 - t_1\\ t_4 := c \cdot b - t_1\\ \mathbf{if}\;c \leq -3.95 \cdot 10^{-156}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -2.4 \cdot 10^{-200}:\\ \;\;\;\;t_2 - 4 \cdot \left(i \cdot x\right)\\ \mathbf{elif}\;c \leq 5 \cdot 10^{-265}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.12 \cdot 10^{-212}:\\ \;\;\;\;-4 \cdot \left(i \cdot x\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;c \leq 6.5 \cdot 10^{-25}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.16 \cdot 10^{+78}:\\ \;\;\;\;c \cdot b + t_2\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 20
Error29.5
Cost1236
\[\begin{array}{l} t_1 := x \cdot \left(-4 \cdot i\right) + c \cdot b\\ t_2 := c \cdot b + -4 \cdot \left(a \cdot t\right)\\ t_3 := c \cdot b - 27 \cdot \left(k \cdot j\right)\\ \mathbf{if}\;j \leq -5.8 \cdot 10^{-5}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -4.7 \cdot 10^{-154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 3.2 \cdot 10^{-283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 2.7 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 1.6 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 21
Error29.8
Cost1236
\[\begin{array}{l} t_1 := x \cdot \left(-4 \cdot i\right) + c \cdot b\\ t_2 := -4 \cdot \left(a \cdot t\right)\\ t_3 := c \cdot b - 27 \cdot \left(k \cdot j\right)\\ \mathbf{if}\;j \leq -8.6 \cdot 10^{-6}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq -3.4 \cdot 10^{-155}:\\ \;\;\;\;c \cdot b + t_2\\ \mathbf{elif}\;j \leq 2.3 \cdot 10^{-273}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 1.2 \cdot 10^{-212}:\\ \;\;\;\;t_2 - 4 \cdot \left(i \cdot x\right)\\ \mathbf{elif}\;j \leq 2.9 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 22
Error33.7
Cost840
\[\begin{array}{l} t_1 := -27 \cdot \left(k \cdot j\right)\\ \mathbf{if}\;j \leq -2.6 \cdot 10^{+188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 120000:\\ \;\;\;\;c \cdot b + -4 \cdot \left(a \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 23
Error43.1
Cost584
\[\begin{array}{l} \mathbf{if}\;b \leq -1.8 \cdot 10^{+78}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-111}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]
Alternative 24
Error48.1
Cost192
\[c \cdot b \]

Error

Reproduce?

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