?

Average Error: 5.5 → 1.6
Time: 32.3s
Precision: binary64
Cost: 5320

?

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

\mathbf{elif}\;t_1 \leq 10^{+303}:\\
\;\;\;\;t_1 + k \cdot \left(j \cdot -27\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right) + \left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right)\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.5
Target1.6
Herbie1.6
\[\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 3 regimes
  2. if (-.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)) < -inf.0

    1. Initial program 64.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. Simplified39.3

      \[\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

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

      associate--l- [=>]64.0

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

      associate-+l- [=>]64.0

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

      associate-+l- [<=]64.0

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

      distribute-rgt-out-- [=>]64.0

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

      associate-*l* [=>]39.3

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

      associate-*l* [=>]39.3

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

      associate-*l* [=>]39.3

      \[ \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) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Taylor expanded in x around inf 12.9

      \[\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. Simplified13.1

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

      [Start]12.9

      \[ \left(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) \]

      associate-*r* [=>]13.1

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

      *-commutative [=>]13.1

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

    if -inf.0 < (-.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)) < 1e303

    1. Initial program 0.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 \]

    if 1e303 < (-.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))

    1. Initial program 53.5

      \[\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. Simplified35.1

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

      [Start]53.5

      \[ \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 \]

      cancel-sign-sub-inv [=>]53.5

      \[ \color{blue}{\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} \]

      associate--l+ [=>]53.5

      \[ \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(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} + \left(-j \cdot 27\right) \cdot k \]
    3. Taylor expanded in k around 0 39.0

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

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

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

      [Start]20.1

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

      *-commutative [=>]20.1

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

      associate-*l* [=>]20.1

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

      *-commutative [=>]20.1

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

      associate-*r* [<=]20.1

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

      *-commutative [<=]20.1

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

      associate-*l* [=>]16.2

      \[ y \cdot \color{blue}{\left(z \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)} + \left(c \cdot b + -4 \cdot \left(i \cdot x\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.6

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

Alternatives

Alternative 1
Error31.9
Cost2157
\[\begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := t_1 + a \cdot \left(t \cdot -4\right)\\ t_3 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ t_4 := b \cdot c + x \cdot \left(i \cdot -4\right)\\ t_5 := b \cdot c + t_1\\ \mathbf{if}\;k \leq -7.8 \cdot 10^{-20}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;k \leq -4.7 \cdot 10^{-213}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 2.9 \cdot 10^{-290}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{-233}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 2.5 \cdot 10^{-121}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;k \leq 5.8 \cdot 10^{-68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 1.3 \cdot 10^{-44}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;k \leq 7.8 \cdot 10^{-29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{+52}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;k \leq 1.65 \cdot 10^{+111} \lor \neg \left(k \leq 3.3 \cdot 10^{+224}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 2
Error8.1
Cost2120
\[\begin{array}{l} t_1 := x \cdot \left(i \cdot -4\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{if}\;a \cdot 4 \leq -5 \cdot 10^{-56}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\right) + t_1\\ \mathbf{elif}\;a \cdot 4 \leq 5 \cdot 10^{-47}:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(t \cdot \left(x \cdot z\right)\right) + b \cdot c\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) + t_1\\ \end{array} \]
Alternative 3
Error31.5
Cost1897
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ t_3 := b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;k \leq -7 \cdot 10^{-20}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq -1.65 \cdot 10^{-212}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 1.02 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 1.7 \cdot 10^{-249}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 4.8 \cdot 10^{-178}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 1.86 \cdot 10^{-121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 14000000000000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 3.5 \cdot 10^{+27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 9 \cdot 10^{+66} \lor \neg \left(k \leq 6 \cdot 10^{+111}\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error32.9
Cost1896
\[\begin{array}{l} t_1 := b \cdot c + x \cdot \left(i \cdot -4\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := t_2 + a \cdot \left(t \cdot -4\right)\\ t_4 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;c \leq -3.8 \cdot 10^{-181}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 3.2 \cdot 10^{-119}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{-59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 0.0065:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+71}:\\ \;\;\;\;t_2 + 18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;c \leq 1.22 \cdot 10^{+103}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 3.4 \cdot 10^{+108}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;c \leq 1.28 \cdot 10^{+191}:\\ \;\;\;\;b \cdot c + t_2\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+205}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 5
Error8.2
Cost1864
\[\begin{array}{l} t_1 := x \cdot \left(i \cdot -4\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{if}\;a \leq -1.8 \cdot 10^{-57}:\\ \;\;\;\;\left(b \cdot c + \frac{t}{\frac{-0.25}{a}}\right) + t_1\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-47}:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(t \cdot \left(x \cdot z\right)\right) + b \cdot c\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) + t_1\\ \end{array} \]
Alternative 6
Error32.4
Cost1764
\[\begin{array}{l} t_1 := b \cdot c + k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_3 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{if}\;x \leq -1.3 \cdot 10^{+59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-76}:\\ \;\;\;\;b \cdot c + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-82}:\\ \;\;\;\;18 \cdot \left(\left(x \cdot y\right) \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-165}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-246}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-205}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-116}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-56}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error23.1
Cost1752
\[\begin{array}{l} t_1 := b \cdot c + \left(-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\right)\\ t_2 := k \cdot \left(j \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ t_3 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;a \leq -2.25 \cdot 10^{+117}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{+66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-10}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-212}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-246}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+58}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error45.5
Cost1640
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := x \cdot \left(i \cdot -4\right)\\ t_3 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;c \leq -6.2 \cdot 10^{-66}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq -5.5 \cdot 10^{-237}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 4.5 \cdot 10^{-195}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{-5}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 6 \cdot 10^{+72}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 5.1 \cdot 10^{+110}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 6 \cdot 10^{+161}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{+191}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+205}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 9
Error10.3
Cost1608
\[\begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+262}:\\ \;\;\;\;\left(18 \cdot y\right) \cdot \left(t \cdot \left(x \cdot z\right)\right) + \left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+47}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) + \left(x \cdot \left(i \cdot -4\right) - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(\left(x \cdot y\right) \cdot \left(z \cdot t\right)\right)\\ \end{array} \]
Alternative 10
Error18.1
Cost1488
\[\begin{array}{l} t_1 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) + k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c + \left(-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{if}\;a \leq -2.8 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-212}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-246}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{+57}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error18.1
Cost1488
\[\begin{array}{l} t_1 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;a \leq -3 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-212}:\\ \;\;\;\;b \cdot c + \left(-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-246}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+57}:\\ \;\;\;\;b \cdot c + \left(x \cdot \left(i \cdot -4\right) - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error45.1
Cost1245
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;k \leq -7 \cdot 10^{-20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 7.8 \cdot 10^{-234}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 2.7 \cdot 10^{-121}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 7.8 \cdot 10^{-29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 3.7 \cdot 10^{+46}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 7.2 \cdot 10^{+66} \lor \neg \left(k \leq 6.7 \cdot 10^{+111}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error45.1
Cost1244
\[\begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ t_3 := k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;k \leq -7.5 \cdot 10^{-20}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 1.35 \cdot 10^{-233}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 2.5 \cdot 10^{-121}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 8.2 \cdot 10^{-29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 8.6 \cdot 10^{+66}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 6 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error40.6
Cost1237
\[\begin{array}{l} t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{if}\;c \leq -1.05 \cdot 10^{-65}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq -2.15 \cdot 10^{-243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-196}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 9.5 \cdot 10^{+142} \lor \neg \left(c \leq 1.95 \cdot 10^{+191}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 15
Error33.8
Cost1104
\[\begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{if}\;x \leq -1.35 \cdot 10^{-82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-231}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error43.2
Cost849
\[\begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+109}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -1.3 \cdot 10^{+86} \lor \neg \left(b \leq -1.55 \cdot 10^{-45}\right) \land b \leq 7.2 \cdot 10^{-72}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
Alternative 17
Error48.6
Cost192
\[b \cdot c \]

Error

Reproduce?

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