Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E

Percentage Accurate: 85.4% → 92.0%
Time: 19.9s
Alternatives: 21
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \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 \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)))
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);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
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);
}
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)
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 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
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]
\begin{array}{l}

\\
\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
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 21 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 85.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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 \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)))
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);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
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);
}
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)
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 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
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]
\begin{array}{l}

\\
\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
\end{array}

Alternative 1: 92.0% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \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) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(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))
           (* (* x 4.0) i))
          (* (* j 27.0) k))))
   (if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	}
	return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, 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)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = 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[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \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) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0

    1. Initial program 96.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 \]
    2. Add Preprocessing

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

    1. Initial program 0.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. Simplified20.0%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 63.6%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.3%

    \[\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) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\ \;\;\;\;\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) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 87.5% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.42 \cdot 10^{+240} \lor \neg \left(x \leq 9.8 \cdot 10^{+175}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= x -1.42e+240) (not (<= x 9.8e+175)))
   (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
   (-
    (- (+ (* b c) (* t (- (* x (* z (* 18.0 y))) (* a 4.0)))) (* (* x 4.0) i))
    (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((x <= -1.42e+240) || !(x <= 9.8e+175)) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = (((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((x <= (-1.42d+240)) .or. (.not. (x <= 9.8d+175))) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else
        tmp = (((b * c) + (t * ((x * (z * (18.0d0 * y))) - (a * 4.0d0)))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if ((x <= -1.42e+240) || !(x <= 9.8e+175)) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = (((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (x <= -1.42e+240) or not (x <= 9.8e+175):
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	else:
		tmp = (((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k)
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((x <= -1.42e+240) || !(x <= 9.8e+175))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(x * Float64(z * Float64(18.0 * y))) - Float64(a * 4.0)))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((x <= -1.42e+240) || ~((x <= 9.8e+175)))
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	else
		tmp = (((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.42e+240], N[Not[LessEqual[x, 9.8e+175]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.42 \cdot 10^{+240} \lor \neg \left(x \leq 9.8 \cdot 10^{+175}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.41999999999999999e240 or 9.80000000000000002e175 < x

    1. Initial program 59.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 \]
    2. Simplified61.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 94.9%

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

    if -1.41999999999999999e240 < x < 9.80000000000000002e175

    1. Initial program 89.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. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--91.3%

        \[\leadsto \left(\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(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. associate-*r*89.6%

        \[\leadsto \left(\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(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative89.6%

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

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

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

      \[\leadsto \left(\left(\color{blue}{\left(x \cdot \left(\left(18 \cdot y\right) \cdot z\right) - a \cdot 4\right) \cdot t} + 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 simplification90.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.42 \cdot 10^{+240} \lor \neg \left(x \leq 9.8 \cdot 10^{+175}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 87.5% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+235} \lor \neg \left(x \leq 1.7 \cdot 10^{+175}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= x -2.2e+235) (not (<= x 1.7e+175)))
   (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
   (-
    (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
    (+ (* x (* 4.0 i)) (* j (* 27.0 k))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((x <= -2.2e+235) || !(x <= 1.7e+175)) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((x <= (-2.2d+235)) .or. (.not. (x <= 1.7d+175))) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else
        tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if ((x <= -2.2e+235) || !(x <= 1.7e+175)) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (x <= -2.2e+235) or not (x <= 1.7e+175):
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	else:
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((x <= -2.2e+235) || !(x <= 1.7e+175))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((x <= -2.2e+235) || ~((x <= 1.7e+175)))
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	else
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -2.2e+235], N[Not[LessEqual[x, 1.7e+175]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+235} \lor \neg \left(x \leq 1.7 \cdot 10^{+175}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2e235 or 1.70000000000000014e175 < x

    1. Initial program 59.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 \]
    2. Simplified61.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 94.9%

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

    if -2.2e235 < x < 1.70000000000000014e175

    1. Initial program 89.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. Simplified89.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)} \]
    3. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification90.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+235} \lor \neg \left(x \leq 1.7 \cdot 10^{+175}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 80.5% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq -18000000000 \lor \neg \left(a \leq 2.25 \cdot 10^{+151}\right):\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= a -18000000000.0) (not (<= a 2.25e+151)))
   (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))
   (-
    (+ (* b c) (* y (* 18.0 (* t (* x z)))))
    (+ (* x (* 4.0 i)) (* j (* 27.0 k))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((a <= -18000000000.0) || !(a <= 2.25e+151)) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	} else {
		tmp = ((b * c) + (y * (18.0 * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((a <= (-18000000000.0d0)) .or. (.not. (a <= 2.25d+151))) then
        tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
    else
        tmp = ((b * c) + (y * (18.0d0 * (t * (x * z))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if ((a <= -18000000000.0) || !(a <= 2.25e+151)) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	} else {
		tmp = ((b * c) + (y * (18.0 * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (a <= -18000000000.0) or not (a <= 2.25e+151):
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k)
	else:
		tmp = ((b * c) + (y * (18.0 * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((a <= -18000000000.0) || !(a <= 2.25e+151))
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(18.0 * Float64(t * Float64(x * z))))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((a <= -18000000000.0) || ~((a <= 2.25e+151)))
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	else
		tmp = ((b * c) + (y * (18.0 * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -18000000000.0], N[Not[LessEqual[a, 2.25e+151]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -18000000000 \lor \neg \left(a \leq 2.25 \cdot 10^{+151}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8e10 or 2.2499999999999999e151 < a

    1. Initial program 82.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. Add Preprocessing
    3. Taylor expanded in y around 0 87.4%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out87.4%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative87.4%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified87.4%

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

    if -1.8e10 < a < 2.2499999999999999e151

    1. Initial program 86.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. Simplified85.2%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 83.7%

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

      \[\leadsto \left(y \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -18000000000 \lor \neg \left(a \leq 2.25 \cdot 10^{+151}\right):\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 77.2% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{-14} \lor \neg \left(z \leq 9.2 \cdot 10^{+99}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* j 27.0) k)))
   (if (or (<= z -1.4e-14) (not (<= z 9.2e+99)))
     (- (* t (+ (* 18.0 (* z (* x y))) (* a -4.0))) t_1)
     (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = (j * 27.0) * k;
	double tmp;
	if ((z <= -1.4e-14) || !(z <= 9.2e+99)) {
		tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
	} else {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (j * 27.0d0) * k
    if ((z <= (-1.4d-14)) .or. (.not. (z <= 9.2d+99))) then
        tmp = (t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))) - t_1
    else
        tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = (j * 27.0) * k;
	double tmp;
	if ((z <= -1.4e-14) || !(z <= 9.2e+99)) {
		tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
	} else {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (j * 27.0) * k
	tmp = 0
	if (z <= -1.4e-14) or not (z <= 9.2e+99):
		tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1
	else:
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if ((z <= -1.4e-14) || !(z <= 9.2e+99))
		tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))) - t_1);
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1);
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (j * 27.0) * k;
	tmp = 0.0;
	if ((z <= -1.4e-14) || ~((z <= 9.2e+99)))
		tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
	else
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[z, -1.4e-14], N[Not[LessEqual[z, 9.2e+99]], $MachinePrecision]], N[(N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{-14} \lor \neg \left(z \leq 9.2 \cdot 10^{+99}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e-14 or 9.20000000000000077e99 < z

    1. Initial program 82.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 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--84.1%

        \[\leadsto \left(\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(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. associate-*r*78.5%

        \[\leadsto \left(\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(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative78.5%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv67.5%

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(-4\right) \cdot a\right)} - \left(j \cdot 27\right) \cdot k \]
      2. associate-*r*71.5%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} + \left(-4\right) \cdot a\right) - \left(j \cdot 27\right) \cdot k \]
      3. metadata-eval71.5%

        \[\leadsto t \cdot \left(18 \cdot \left(\left(x \cdot y\right) \cdot z\right) + \color{blue}{-4} \cdot a\right) - \left(j \cdot 27\right) \cdot k \]
    7. Simplified71.5%

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

    if -1.4e-14 < z < 9.20000000000000077e99

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in y around 0 83.8%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out83.8%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative83.8%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified83.8%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{-14} \lor \neg \left(z \leq 9.2 \cdot 10^{+99}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 76.0% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t \leq -5.2 \cdot 10^{+32} \lor \neg \left(t \leq 7 \cdot 10^{+114}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* j 27.0) k)))
   (if (or (<= t -5.2e+32) (not (<= t 7e+114)))
     (- (* t (+ (* 18.0 (* z (* x y))) (* a -4.0))) t_1)
     (- (- (* b c) (* 4.0 (* x i))) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = (j * 27.0) * k;
	double tmp;
	if ((t <= -5.2e+32) || !(t <= 7e+114)) {
		tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
	} else {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (j * 27.0d0) * k
    if ((t <= (-5.2d+32)) .or. (.not. (t <= 7d+114))) then
        tmp = (t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))) - t_1
    else
        tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = (j * 27.0) * k;
	double tmp;
	if ((t <= -5.2e+32) || !(t <= 7e+114)) {
		tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
	} else {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (j * 27.0) * k
	tmp = 0
	if (t <= -5.2e+32) or not (t <= 7e+114):
		tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1
	else:
		tmp = ((b * c) - (4.0 * (x * i))) - t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if ((t <= -5.2e+32) || !(t <= 7e+114))
		tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))) - t_1);
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1);
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (j * 27.0) * k;
	tmp = 0.0;
	if ((t <= -5.2e+32) || ~((t <= 7e+114)))
		tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
	else
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t, -5.2e+32], N[Not[LessEqual[t, 7e+114]], $MachinePrecision]], N[(N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+32} \lor \neg \left(t \leq 7 \cdot 10^{+114}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) - t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.2000000000000004e32 or 7.0000000000000001e114 < t

    1. Initial program 78.9%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--84.4%

        \[\leadsto \left(\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(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. associate-*r*85.6%

        \[\leadsto \left(\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(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative85.6%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv79.3%

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(-4\right) \cdot a\right)} - \left(j \cdot 27\right) \cdot k \]
      2. associate-*r*79.2%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} + \left(-4\right) \cdot a\right) - \left(j \cdot 27\right) \cdot k \]
      3. metadata-eval79.2%

        \[\leadsto t \cdot \left(18 \cdot \left(\left(x \cdot y\right) \cdot z\right) + \color{blue}{-4} \cdot a\right) - \left(j \cdot 27\right) \cdot k \]
    7. Simplified79.2%

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

    if -5.2000000000000004e32 < t < 7.0000000000000001e114

    1. Initial program 88.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 \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 73.2%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+32} \lor \neg \left(t \leq 7 \cdot 10^{+114}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 59.6% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+17}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
   (if (<= x -3.5e+46)
     t_1
     (if (<= x -5.4e-26)
       (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
       (if (<= x 2.3e+17) (+ (* b c) (* j (* k -27.0))) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -3.5e+46) {
		tmp = t_1;
	} else if (x <= -5.4e-26) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else if (x <= 2.3e+17) {
		tmp = (b * c) + (j * (k * -27.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    if (x <= (-3.5d+46)) then
        tmp = t_1
    else if (x <= (-5.4d-26)) then
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    else if (x <= 2.3d+17) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -3.5e+46) {
		tmp = t_1;
	} else if (x <= -5.4e-26) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else if (x <= 2.3e+17) {
		tmp = (b * c) + (j * (k * -27.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	tmp = 0
	if x <= -3.5e+46:
		tmp = t_1
	elif x <= -5.4e-26:
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	elif x <= 2.3e+17:
		tmp = (b * c) + (j * (k * -27.0))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))
	tmp = 0.0
	if (x <= -3.5e+46)
		tmp = t_1;
	elseif (x <= -5.4e-26)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	elseif (x <= 2.3e+17)
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	tmp = 0.0;
	if (x <= -3.5e+46)
		tmp = t_1;
	elseif (x <= -5.4e-26)
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	elseif (x <= 2.3e+17)
		tmp = (b * c) + (j * (k * -27.0));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.5e+46], t$95$1, If[LessEqual[x, -5.4e-26], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e+17], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -5.4 \cdot 10^{-26}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{elif}\;x \leq 2.3 \cdot 10^{+17}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.49999999999999985e46 or 2.3e17 < x

    1. Initial program 72.9%

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

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 75.5%

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

    if -3.49999999999999985e46 < x < -5.39999999999999963e-26

    1. Initial program 84.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 \]
    2. Simplified99.8%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 77.5%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if -5.39999999999999963e-26 < x < 2.3e17

    1. Initial program 95.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. Simplified90.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 56.8%

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+46}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+17}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 47.3% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;z \leq -5.9 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-68}:\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+99}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
   (if (<= z -5.9e-5)
     t_1
     (if (<= z 5.3e-68)
       (* b (+ c (* -4.0 (* i (/ x b)))))
       (if (<= z 7.4e+99) (- (* (* x i) -4.0) (* 27.0 (* j k))) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (z <= -5.9e-5) {
		tmp = t_1;
	} else if (z <= 5.3e-68) {
		tmp = b * (c + (-4.0 * (i * (x / b))));
	} else if (z <= 7.4e+99) {
		tmp = ((x * i) * -4.0) - (27.0 * (j * k));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    if (z <= (-5.9d-5)) then
        tmp = t_1
    else if (z <= 5.3d-68) then
        tmp = b * (c + ((-4.0d0) * (i * (x / b))))
    else if (z <= 7.4d+99) then
        tmp = ((x * i) * (-4.0d0)) - (27.0d0 * (j * k))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (z <= -5.9e-5) {
		tmp = t_1;
	} else if (z <= 5.3e-68) {
		tmp = b * (c + (-4.0 * (i * (x / b))));
	} else if (z <= 7.4e+99) {
		tmp = ((x * i) * -4.0) - (27.0 * (j * k));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	tmp = 0
	if z <= -5.9e-5:
		tmp = t_1
	elif z <= 5.3e-68:
		tmp = b * (c + (-4.0 * (i * (x / b))))
	elif z <= 7.4e+99:
		tmp = ((x * i) * -4.0) - (27.0 * (j * k))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (z <= -5.9e-5)
		tmp = t_1;
	elseif (z <= 5.3e-68)
		tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b)))));
	elseif (z <= 7.4e+99)
		tmp = Float64(Float64(Float64(x * i) * -4.0) - Float64(27.0 * Float64(j * k)));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	tmp = 0.0;
	if (z <= -5.9e-5)
		tmp = t_1;
	elseif (z <= 5.3e-68)
		tmp = b * (c + (-4.0 * (i * (x / b))));
	elseif (z <= 7.4e+99)
		tmp = ((x * i) * -4.0) - (27.0 * (j * k));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.9e-5], t$95$1, If[LessEqual[z, 5.3e-68], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e+99], N[(N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;z \leq -5.9 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5.3 \cdot 10^{-68}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{+99}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8999999999999998e-5 or 7.4000000000000002e99 < z

    1. Initial program 81.9%

      \[\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. Simplified77.9%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 54.3%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if -5.8999999999999998e-5 < z < 5.3e-68

    1. Initial program 87.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 \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 74.2%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Taylor expanded in b around inf 67.8%

      \[\leadsto \color{blue}{b \cdot \left(c + -1 \cdot \frac{4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)}{b}\right)} \]
    5. Step-by-step derivation
      1. associate-*r/67.8%

        \[\leadsto b \cdot \left(c + \color{blue}{\frac{-1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}{b}}\right) \]
      2. mul-1-neg67.8%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{-\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}}{b}\right) \]
      3. associate-*r*67.8%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{\left(4 \cdot i\right) \cdot x} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      4. *-commutative67.8%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{x \cdot \left(4 \cdot i\right)} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      5. *-commutative67.8%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      6. associate-*r*67.8%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(k \cdot 27\right)}\right)}{b}\right) \]
      7. distribute-neg-in67.8%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot \left(4 \cdot i\right)\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}}{b}\right) \]
      8. associate-*r*67.8%

        \[\leadsto b \cdot \left(c + \frac{\left(-\color{blue}{\left(x \cdot 4\right) \cdot i}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      9. distribute-lft-neg-out67.8%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot 4\right) \cdot i} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      10. *-commutative67.8%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{i \cdot \left(-x \cdot 4\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      11. distribute-rgt-neg-in67.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      12. metadata-eval67.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot \color{blue}{-4}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      13. associate-*r*67.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      14. *-commutative67.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{27 \cdot \left(j \cdot k\right)}\right)}{b}\right) \]
      15. distribute-lft-neg-in67.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{\left(-27\right) \cdot \left(j \cdot k\right)}}{b}\right) \]
      16. metadata-eval67.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)}{b}\right) \]
      17. *-commutative67.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \color{blue}{\left(k \cdot j\right)}}{b}\right) \]
    6. Simplified67.8%

      \[\leadsto \color{blue}{b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \left(k \cdot j\right)}{b}\right)} \]
    7. Taylor expanded in i around inf 59.1%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \frac{i \cdot x}{b}}\right) \]
    8. Step-by-step derivation
      1. associate-/l*58.1%

        \[\leadsto b \cdot \left(c + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{b}\right)}\right) \]
    9. Simplified58.1%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \left(i \cdot \frac{x}{b}\right)}\right) \]

    if 5.3e-68 < z < 7.4000000000000002e99

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in t around 0 55.4%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Taylor expanded in b around inf 45.5%

      \[\leadsto \color{blue}{b \cdot \left(c + -4 \cdot \frac{i \cdot x}{b}\right)} - \left(j \cdot 27\right) \cdot k \]
    5. Step-by-step derivation
      1. associate-/l*50.3%

        \[\leadsto b \cdot \left(c + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{b}\right)}\right) - \left(j \cdot 27\right) \cdot k \]
    6. Simplified50.3%

      \[\leadsto \color{blue}{b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    7. Taylor expanded in b around 0 40.7%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) - 27 \cdot \left(j \cdot k\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.9 \cdot 10^{-5}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-68}:\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+99}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 48.5% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \mathbf{if}\;b \leq -4.1 \cdot 10^{+167}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.85 \cdot 10^{+19}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{-78}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* b (+ c (* -4.0 (* i (/ x b)))))))
   (if (<= b -4.1e+167)
     t_1
     (if (<= b -2.85e+19)
       (+ (* j (* k -27.0)) (* a (* t -4.0)))
       (if (<= b 3.5e-78) (- (* (* x i) -4.0) (* 27.0 (* j k))) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 + (-4.0 * (i * (x / b))));
	double tmp;
	if (b <= -4.1e+167) {
		tmp = t_1;
	} else if (b <= -2.85e+19) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if (b <= 3.5e-78) {
		tmp = ((x * i) * -4.0) - (27.0 * (j * k));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (c + ((-4.0d0) * (i * (x / b))))
    if (b <= (-4.1d+167)) then
        tmp = t_1
    else if (b <= (-2.85d+19)) then
        tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
    else if (b <= 3.5d-78) then
        tmp = ((x * i) * (-4.0d0)) - (27.0d0 * (j * k))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 + (-4.0 * (i * (x / b))));
	double tmp;
	if (b <= -4.1e+167) {
		tmp = t_1;
	} else if (b <= -2.85e+19) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if (b <= 3.5e-78) {
		tmp = ((x * i) * -4.0) - (27.0 * (j * k));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = b * (c + (-4.0 * (i * (x / b))))
	tmp = 0
	if b <= -4.1e+167:
		tmp = t_1
	elif b <= -2.85e+19:
		tmp = (j * (k * -27.0)) + (a * (t * -4.0))
	elif b <= 3.5e-78:
		tmp = ((x * i) * -4.0) - (27.0 * (j * k))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b)))))
	tmp = 0.0
	if (b <= -4.1e+167)
		tmp = t_1;
	elseif (b <= -2.85e+19)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0)));
	elseif (b <= 3.5e-78)
		tmp = Float64(Float64(Float64(x * i) * -4.0) - Float64(27.0 * Float64(j * k)));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = b * (c + (-4.0 * (i * (x / b))));
	tmp = 0.0;
	if (b <= -4.1e+167)
		tmp = t_1;
	elseif (b <= -2.85e+19)
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	elseif (b <= 3.5e-78)
		tmp = ((x * i) * -4.0) - (27.0 * (j * k));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.1e+167], t$95$1, If[LessEqual[b, -2.85e+19], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.5e-78], N[(N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.85 \cdot 10^{+19}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\

\mathbf{elif}\;b \leq 3.5 \cdot 10^{-78}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.1e167 or 3.4999999999999999e-78 < b

    1. Initial program 79.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in t around 0 60.3%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Taylor expanded in b around inf 63.0%

      \[\leadsto \color{blue}{b \cdot \left(c + -1 \cdot \frac{4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)}{b}\right)} \]
    5. Step-by-step derivation
      1. associate-*r/63.0%

        \[\leadsto b \cdot \left(c + \color{blue}{\frac{-1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}{b}}\right) \]
      2. mul-1-neg63.0%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{-\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}}{b}\right) \]
      3. associate-*r*63.0%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{\left(4 \cdot i\right) \cdot x} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      4. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{x \cdot \left(4 \cdot i\right)} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      5. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      6. associate-*r*63.0%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(k \cdot 27\right)}\right)}{b}\right) \]
      7. distribute-neg-in63.0%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot \left(4 \cdot i\right)\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}}{b}\right) \]
      8. associate-*r*63.0%

        \[\leadsto b \cdot \left(c + \frac{\left(-\color{blue}{\left(x \cdot 4\right) \cdot i}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      9. distribute-lft-neg-out63.0%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot 4\right) \cdot i} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      10. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{i \cdot \left(-x \cdot 4\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      11. distribute-rgt-neg-in63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      12. metadata-eval63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot \color{blue}{-4}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      13. associate-*r*63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      14. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{27 \cdot \left(j \cdot k\right)}\right)}{b}\right) \]
      15. distribute-lft-neg-in63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{\left(-27\right) \cdot \left(j \cdot k\right)}}{b}\right) \]
      16. metadata-eval63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)}{b}\right) \]
      17. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \color{blue}{\left(k \cdot j\right)}}{b}\right) \]
    6. Simplified63.0%

      \[\leadsto \color{blue}{b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \left(k \cdot j\right)}{b}\right)} \]
    7. Taylor expanded in i around inf 52.6%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \frac{i \cdot x}{b}}\right) \]
    8. Step-by-step derivation
      1. associate-/l*52.6%

        \[\leadsto b \cdot \left(c + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{b}\right)}\right) \]
    9. Simplified52.6%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \left(i \cdot \frac{x}{b}\right)}\right) \]

    if -4.1e167 < b < -2.85e19

    1. Initial program 87.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. Simplified93.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 46.0%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval46.0%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in46.0%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative46.0%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*l*46.0%

        \[\leadsto \left(-\color{blue}{\left(4 \cdot t\right) \cdot a}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-lft-neg-in46.0%

        \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-lft-neg-in46.0%

        \[\leadsto \color{blue}{\left(\left(-4\right) \cdot t\right)} \cdot a + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval46.0%

        \[\leadsto \left(\color{blue}{-4} \cdot t\right) \cdot a + j \cdot \left(k \cdot -27\right) \]
    6. Simplified46.0%

      \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]

    if -2.85e19 < b < 3.4999999999999999e-78

    1. Initial program 88.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. Add Preprocessing
    3. Taylor expanded in t around 0 58.7%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Taylor expanded in b around inf 50.6%

      \[\leadsto \color{blue}{b \cdot \left(c + -4 \cdot \frac{i \cdot x}{b}\right)} - \left(j \cdot 27\right) \cdot k \]
    5. Step-by-step derivation
      1. associate-/l*49.6%

        \[\leadsto b \cdot \left(c + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{b}\right)}\right) - \left(j \cdot 27\right) \cdot k \]
    6. Simplified49.6%

      \[\leadsto \color{blue}{b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    7. Taylor expanded in b around 0 49.9%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) - 27 \cdot \left(j \cdot k\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.1 \cdot 10^{+167}:\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \mathbf{elif}\;b \leq -2.85 \cdot 10^{+19}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{-78}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 48.5% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \mathbf{if}\;b \leq -4.1 \cdot 10^{+167}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -560000000000:\\ \;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{-76}:\\ \;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))) (t_2 (* b (+ c (* -4.0 (* i (/ x b)))))))
   (if (<= b -4.1e+167)
     t_2
     (if (<= b -560000000000.0)
       (+ t_1 (* a (* t -4.0)))
       (if (<= b 1.4e-76) (+ t_1 (* i (* x -4.0))) t_2)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = j * (k * -27.0);
	double t_2 = b * (c + (-4.0 * (i * (x / b))));
	double tmp;
	if (b <= -4.1e+167) {
		tmp = t_2;
	} else if (b <= -560000000000.0) {
		tmp = t_1 + (a * (t * -4.0));
	} else if (b <= 1.4e-76) {
		tmp = t_1 + (i * (x * -4.0));
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = b * (c + ((-4.0d0) * (i * (x / b))))
    if (b <= (-4.1d+167)) then
        tmp = t_2
    else if (b <= (-560000000000.0d0)) then
        tmp = t_1 + (a * (t * (-4.0d0)))
    else if (b <= 1.4d-76) then
        tmp = t_1 + (i * (x * (-4.0d0)))
    else
        tmp = t_2
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = j * (k * -27.0);
	double t_2 = b * (c + (-4.0 * (i * (x / b))));
	double tmp;
	if (b <= -4.1e+167) {
		tmp = t_2;
	} else if (b <= -560000000000.0) {
		tmp = t_1 + (a * (t * -4.0));
	} else if (b <= 1.4e-76) {
		tmp = t_1 + (i * (x * -4.0));
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = b * (c + (-4.0 * (i * (x / b))))
	tmp = 0
	if b <= -4.1e+167:
		tmp = t_2
	elif b <= -560000000000.0:
		tmp = t_1 + (a * (t * -4.0))
	elif b <= 1.4e-76:
		tmp = t_1 + (i * (x * -4.0))
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b)))))
	tmp = 0.0
	if (b <= -4.1e+167)
		tmp = t_2;
	elseif (b <= -560000000000.0)
		tmp = Float64(t_1 + Float64(a * Float64(t * -4.0)));
	elseif (b <= 1.4e-76)
		tmp = Float64(t_1 + Float64(i * Float64(x * -4.0)));
	else
		tmp = t_2;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = b * (c + (-4.0 * (i * (x / b))));
	tmp = 0.0;
	if (b <= -4.1e+167)
		tmp = t_2;
	elseif (b <= -560000000000.0)
		tmp = t_1 + (a * (t * -4.0));
	elseif (b <= 1.4e-76)
		tmp = t_1 + (i * (x * -4.0));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.1e+167], t$95$2, If[LessEqual[b, -560000000000.0], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e-76], N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{+167}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq -560000000000:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\

\mathbf{elif}\;b \leq 1.4 \cdot 10^{-76}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.1e167 or 1.40000000000000005e-76 < b

    1. Initial program 79.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in t around 0 60.3%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Taylor expanded in b around inf 63.0%

      \[\leadsto \color{blue}{b \cdot \left(c + -1 \cdot \frac{4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)}{b}\right)} \]
    5. Step-by-step derivation
      1. associate-*r/63.0%

        \[\leadsto b \cdot \left(c + \color{blue}{\frac{-1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}{b}}\right) \]
      2. mul-1-neg63.0%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{-\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}}{b}\right) \]
      3. associate-*r*63.0%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{\left(4 \cdot i\right) \cdot x} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      4. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{x \cdot \left(4 \cdot i\right)} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      5. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      6. associate-*r*63.0%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(k \cdot 27\right)}\right)}{b}\right) \]
      7. distribute-neg-in63.0%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot \left(4 \cdot i\right)\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}}{b}\right) \]
      8. associate-*r*63.0%

        \[\leadsto b \cdot \left(c + \frac{\left(-\color{blue}{\left(x \cdot 4\right) \cdot i}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      9. distribute-lft-neg-out63.0%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot 4\right) \cdot i} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      10. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{i \cdot \left(-x \cdot 4\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      11. distribute-rgt-neg-in63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      12. metadata-eval63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot \color{blue}{-4}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      13. associate-*r*63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      14. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{27 \cdot \left(j \cdot k\right)}\right)}{b}\right) \]
      15. distribute-lft-neg-in63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{\left(-27\right) \cdot \left(j \cdot k\right)}}{b}\right) \]
      16. metadata-eval63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)}{b}\right) \]
      17. *-commutative63.0%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \color{blue}{\left(k \cdot j\right)}}{b}\right) \]
    6. Simplified63.0%

      \[\leadsto \color{blue}{b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \left(k \cdot j\right)}{b}\right)} \]
    7. Taylor expanded in i around inf 52.6%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \frac{i \cdot x}{b}}\right) \]
    8. Step-by-step derivation
      1. associate-/l*52.6%

        \[\leadsto b \cdot \left(c + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{b}\right)}\right) \]
    9. Simplified52.6%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \left(i \cdot \frac{x}{b}\right)}\right) \]

    if -4.1e167 < b < -5.6e11

    1. Initial program 87.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. Simplified93.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 46.0%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval46.0%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in46.0%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative46.0%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*l*46.0%

        \[\leadsto \left(-\color{blue}{\left(4 \cdot t\right) \cdot a}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-lft-neg-in46.0%

        \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-lft-neg-in46.0%

        \[\leadsto \color{blue}{\left(\left(-4\right) \cdot t\right)} \cdot a + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval46.0%

        \[\leadsto \left(\color{blue}{-4} \cdot t\right) \cdot a + j \cdot \left(k \cdot -27\right) \]
    6. Simplified46.0%

      \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]

    if -5.6e11 < b < 1.40000000000000005e-76

    1. Initial program 88.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. Simplified90.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in i around inf 49.9%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. associate-*r*49.9%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} + j \cdot \left(k \cdot -27\right) \]
      2. *-commutative49.9%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} + j \cdot \left(k \cdot -27\right) \]
      3. associate-*r*49.9%

        \[\leadsto \color{blue}{\left(x \cdot -4\right) \cdot i} + j \cdot \left(k \cdot -27\right) \]
      4. *-commutative49.9%

        \[\leadsto \color{blue}{\left(-4 \cdot x\right)} \cdot i + j \cdot \left(k \cdot -27\right) \]
      5. *-commutative49.9%

        \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified49.9%

      \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.1 \cdot 10^{+167}:\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \mathbf{elif}\;b \leq -560000000000:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{-76}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 72.7% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+34} \lor \neg \left(t \leq 1.25 \cdot 10^{+114}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= t -6.5e+34) (not (<= t 1.25e+114)))
   (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
   (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((t <= -6.5e+34) || !(t <= 1.25e+114)) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else {
		tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((t <= (-6.5d+34)) .or. (.not. (t <= 1.25d+114))) then
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    else
        tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if ((t <= -6.5e+34) || !(t <= 1.25e+114)) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else {
		tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (t <= -6.5e+34) or not (t <= 1.25e+114):
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	else:
		tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k)
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((t <= -6.5e+34) || !(t <= 1.25e+114))
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((t <= -6.5e+34) || ~((t <= 1.25e+114)))
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	else
		tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -6.5e+34], N[Not[LessEqual[t, 1.25e+114]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+34} \lor \neg \left(t \leq 1.25 \cdot 10^{+114}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.50000000000000017e34 or 1.25e114 < t

    1. Initial program 78.9%

      \[\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. Simplified84.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)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 73.0%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if -6.50000000000000017e34 < t < 1.25e114

    1. Initial program 88.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 \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 73.2%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+34} \lor \neg \left(t \leq 1.25 \cdot 10^{+114}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 59.3% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-79} \lor \neg \left(z \leq 1.2 \cdot 10^{+113}\right):\\ \;\;\;\;\left(z \cdot \left(x \cdot y\right)\right) \cdot \left(18 \cdot t\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= z -2.6e-79) (not (<= z 1.2e+113)))
   (- (* (* z (* x y)) (* 18.0 t)) (* (* j 27.0) k))
   (- (* b c) (* 4.0 (+ (* x i) (* t a))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((z <= -2.6e-79) || !(z <= 1.2e+113)) {
		tmp = ((z * (x * y)) * (18.0 * t)) - ((j * 27.0) * k);
	} else {
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((z <= (-2.6d-79)) .or. (.not. (z <= 1.2d+113))) then
        tmp = ((z * (x * y)) * (18.0d0 * t)) - ((j * 27.0d0) * k)
    else
        tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if ((z <= -2.6e-79) || !(z <= 1.2e+113)) {
		tmp = ((z * (x * y)) * (18.0 * t)) - ((j * 27.0) * k);
	} else {
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (z <= -2.6e-79) or not (z <= 1.2e+113):
		tmp = ((z * (x * y)) * (18.0 * t)) - ((j * 27.0) * k)
	else:
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((z <= -2.6e-79) || !(z <= 1.2e+113))
		tmp = Float64(Float64(Float64(z * Float64(x * y)) * Float64(18.0 * t)) - Float64(Float64(j * 27.0) * k));
	else
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a))));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((z <= -2.6e-79) || ~((z <= 1.2e+113)))
		tmp = ((z * (x * y)) * (18.0 * t)) - ((j * 27.0) * k);
	else
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[z, -2.6e-79], N[Not[LessEqual[z, 1.2e+113]], $MachinePrecision]], N[(N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-79} \lor \neg \left(z \leq 1.2 \cdot 10^{+113}\right):\\
\;\;\;\;\left(z \cdot \left(x \cdot y\right)\right) \cdot \left(18 \cdot t\right) - \left(j \cdot 27\right) \cdot k\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.59999999999999994e-79 or 1.19999999999999992e113 < z

    1. Initial program 84.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 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--85.6%

        \[\leadsto \left(\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(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. associate-*r*80.6%

        \[\leadsto \left(\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(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative80.6%

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

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

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

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. associate-*r*53.5%

        \[\leadsto \color{blue}{\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      2. associate-*r*57.1%

        \[\leadsto \left(18 \cdot t\right) \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} - \left(j \cdot 27\right) \cdot k \]
    7. Simplified57.1%

      \[\leadsto \color{blue}{\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right)} - \left(j \cdot 27\right) \cdot k \]

    if -2.59999999999999994e-79 < z < 1.19999999999999992e113

    1. Initial program 85.7%

      \[\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. Add Preprocessing
    3. Taylor expanded in y around 0 82.2%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out82.2%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative82.2%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified82.2%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 71.0%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-79} \lor \neg \left(z \leq 1.2 \cdot 10^{+113}\right):\\ \;\;\;\;\left(z \cdot \left(x \cdot y\right)\right) \cdot \left(18 \cdot t\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 53.0% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+30} \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+181}\right):\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= (* b c) -5e+30) (not (<= (* b c) 2e+181)))
   (* b (+ c (* -4.0 (* i (/ x b)))))
   (+ (* j (* k -27.0)) (* i (* x -4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (((b * c) <= -5e+30) || !((b * c) <= 2e+181)) {
		tmp = b * (c + (-4.0 * (i * (x / b))));
	} else {
		tmp = (j * (k * -27.0)) + (i * (x * -4.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (((b * c) <= (-5d+30)) .or. (.not. ((b * c) <= 2d+181))) then
        tmp = b * (c + ((-4.0d0) * (i * (x / b))))
    else
        tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if (((b * c) <= -5e+30) || !((b * c) <= 2e+181)) {
		tmp = b * (c + (-4.0 * (i * (x / b))));
	} else {
		tmp = (j * (k * -27.0)) + (i * (x * -4.0));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if ((b * c) <= -5e+30) or not ((b * c) <= 2e+181):
		tmp = b * (c + (-4.0 * (i * (x / b))))
	else:
		tmp = (j * (k * -27.0)) + (i * (x * -4.0))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((Float64(b * c) <= -5e+30) || !(Float64(b * c) <= 2e+181))
		tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b)))));
	else
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0)));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (((b * c) <= -5e+30) || ~(((b * c) <= 2e+181)))
		tmp = b * (c + (-4.0 * (i * (x / b))));
	else
		tmp = (j * (k * -27.0)) + (i * (x * -4.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -5e+30], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2e+181]], $MachinePrecision]], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+30} \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+181}\right):\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -4.9999999999999998e30 or 1.9999999999999998e181 < (*.f64 b c)

    1. Initial program 82.8%

      \[\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. Add Preprocessing
    3. Taylor expanded in t around 0 74.2%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Taylor expanded in b around inf 75.5%

      \[\leadsto \color{blue}{b \cdot \left(c + -1 \cdot \frac{4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)}{b}\right)} \]
    5. Step-by-step derivation
      1. associate-*r/75.5%

        \[\leadsto b \cdot \left(c + \color{blue}{\frac{-1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}{b}}\right) \]
      2. mul-1-neg75.5%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{-\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}}{b}\right) \]
      3. associate-*r*75.5%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{\left(4 \cdot i\right) \cdot x} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      4. *-commutative75.5%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{x \cdot \left(4 \cdot i\right)} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      5. *-commutative75.5%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      6. associate-*r*75.6%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(k \cdot 27\right)}\right)}{b}\right) \]
      7. distribute-neg-in75.6%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot \left(4 \cdot i\right)\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}}{b}\right) \]
      8. associate-*r*75.6%

        \[\leadsto b \cdot \left(c + \frac{\left(-\color{blue}{\left(x \cdot 4\right) \cdot i}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      9. distribute-lft-neg-out75.6%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot 4\right) \cdot i} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      10. *-commutative75.6%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{i \cdot \left(-x \cdot 4\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      11. distribute-rgt-neg-in75.6%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      12. metadata-eval75.6%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot \color{blue}{-4}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      13. associate-*r*75.5%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      14. *-commutative75.5%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{27 \cdot \left(j \cdot k\right)}\right)}{b}\right) \]
      15. distribute-lft-neg-in75.5%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{\left(-27\right) \cdot \left(j \cdot k\right)}}{b}\right) \]
      16. metadata-eval75.5%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)}{b}\right) \]
      17. *-commutative75.5%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \color{blue}{\left(k \cdot j\right)}}{b}\right) \]
    6. Simplified75.5%

      \[\leadsto \color{blue}{b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \left(k \cdot j\right)}{b}\right)} \]
    7. Taylor expanded in i around inf 73.4%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \frac{i \cdot x}{b}}\right) \]
    8. Step-by-step derivation
      1. associate-/l*72.4%

        \[\leadsto b \cdot \left(c + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{b}\right)}\right) \]
    9. Simplified72.4%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \left(i \cdot \frac{x}{b}\right)}\right) \]

    if -4.9999999999999998e30 < (*.f64 b c) < 1.9999999999999998e181

    1. Initial program 86.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. Simplified87.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in i around inf 47.7%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. associate-*r*47.7%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} + j \cdot \left(k \cdot -27\right) \]
      2. *-commutative47.7%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} + j \cdot \left(k \cdot -27\right) \]
      3. associate-*r*47.7%

        \[\leadsto \color{blue}{\left(x \cdot -4\right) \cdot i} + j \cdot \left(k \cdot -27\right) \]
      4. *-commutative47.7%

        \[\leadsto \color{blue}{\left(-4 \cdot x\right)} \cdot i + j \cdot \left(k \cdot -27\right) \]
      5. *-commutative47.7%

        \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified47.7%

      \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+30} \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+181}\right):\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 46.2% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \left(x \cdot i\right) \cdot -4\\ \mathbf{if}\;x \leq -2.3 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+18}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+174}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* x i) -4.0)))
   (if (<= x -2.3e+45)
     t_1
     (if (<= x 7.5e+18)
       (+ (* b c) (* j (* k -27.0)))
       (if (<= x 2.2e+174) (* t (* 18.0 (* x (* y z)))) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 * i) * -4.0;
	double tmp;
	if (x <= -2.3e+45) {
		tmp = t_1;
	} else if (x <= 7.5e+18) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (x <= 2.2e+174) {
		tmp = t * (18.0 * (x * (y * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * i) * (-4.0d0)
    if (x <= (-2.3d+45)) then
        tmp = t_1
    else if (x <= 7.5d+18) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else if (x <= 2.2d+174) then
        tmp = t * (18.0d0 * (x * (y * z)))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 * i) * -4.0;
	double tmp;
	if (x <= -2.3e+45) {
		tmp = t_1;
	} else if (x <= 7.5e+18) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (x <= 2.2e+174) {
		tmp = t * (18.0 * (x * (y * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (x * i) * -4.0
	tmp = 0
	if x <= -2.3e+45:
		tmp = t_1
	elif x <= 7.5e+18:
		tmp = (b * c) + (j * (k * -27.0))
	elif x <= 2.2e+174:
		tmp = t * (18.0 * (x * (y * z)))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(x * i) * -4.0)
	tmp = 0.0
	if (x <= -2.3e+45)
		tmp = t_1;
	elseif (x <= 7.5e+18)
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	elseif (x <= 2.2e+174)
		tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z))));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (x * i) * -4.0;
	tmp = 0.0;
	if (x <= -2.3e+45)
		tmp = t_1;
	elseif (x <= 7.5e+18)
		tmp = (b * c) + (j * (k * -27.0));
	elseif (x <= 2.2e+174)
		tmp = t * (18.0 * (x * (y * z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[x, -2.3e+45], t$95$1, If[LessEqual[x, 7.5e+18], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+174], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot i\right) \cdot -4\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 7.5 \cdot 10^{+18}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{+174}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.30000000000000012e45 or 2.2000000000000002e174 < x

    1. Initial program 73.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 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 62.9%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out62.9%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative62.9%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified62.9%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in i around inf 54.9%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. *-commutative54.9%

        \[\leadsto -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
    8. Simplified54.9%

      \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right)} \]

    if -2.30000000000000012e45 < x < 7.5e18

    1. Initial program 94.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. Simplified91.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 54.0%

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]

    if 7.5e18 < x < 2.2000000000000002e174

    1. Initial program 71.8%

      \[\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. Simplified83.0%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 61.0%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Taylor expanded in x around inf 44.5%

      \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+45}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+18}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+174}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 30.9% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{-79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-284}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+99}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (* 18.0 (* x (* y z))))))
   (if (<= z -1.35e-79)
     t_1
     (if (<= z -1.75e-284) (* b c) (if (<= z 7.4e+99) (* (* x i) -4.0) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = t * (18.0 * (x * (y * z)));
	double tmp;
	if (z <= -1.35e-79) {
		tmp = t_1;
	} else if (z <= -1.75e-284) {
		tmp = b * c;
	} else if (z <= 7.4e+99) {
		tmp = (x * i) * -4.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (18.0d0 * (x * (y * z)))
    if (z <= (-1.35d-79)) then
        tmp = t_1
    else if (z <= (-1.75d-284)) then
        tmp = b * c
    else if (z <= 7.4d+99) then
        tmp = (x * i) * (-4.0d0)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 = t * (18.0 * (x * (y * z)));
	double tmp;
	if (z <= -1.35e-79) {
		tmp = t_1;
	} else if (z <= -1.75e-284) {
		tmp = b * c;
	} else if (z <= 7.4e+99) {
		tmp = (x * i) * -4.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = t * (18.0 * (x * (y * z)))
	tmp = 0
	if z <= -1.35e-79:
		tmp = t_1
	elif z <= -1.75e-284:
		tmp = b * c
	elif z <= 7.4e+99:
		tmp = (x * i) * -4.0
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(18.0 * Float64(x * Float64(y * z))))
	tmp = 0.0
	if (z <= -1.35e-79)
		tmp = t_1;
	elseif (z <= -1.75e-284)
		tmp = Float64(b * c);
	elseif (z <= 7.4e+99)
		tmp = Float64(Float64(x * i) * -4.0);
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = t * (18.0 * (x * (y * z)));
	tmp = 0.0;
	if (z <= -1.35e-79)
		tmp = t_1;
	elseif (z <= -1.75e-284)
		tmp = b * c;
	elseif (z <= 7.4e+99)
		tmp = (x * i) * -4.0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-79], t$95$1, If[LessEqual[z, -1.75e-284], N[(b * c), $MachinePrecision], If[LessEqual[z, 7.4e+99], N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-284}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{+99}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3500000000000001e-79 or 7.4000000000000002e99 < z

    1. Initial program 83.9%

      \[\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. Simplified80.5%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 50.1%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Taylor expanded in x around inf 38.8%

      \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]

    if -1.3500000000000001e-79 < z < -1.74999999999999988e-284

    1. Initial program 89.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. Add Preprocessing
    3. Taylor expanded in y around 0 95.0%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out95.0%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative95.0%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified95.0%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in b around inf 35.8%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -1.74999999999999988e-284 < z < 7.4000000000000002e99

    1. Initial program 84.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. Add Preprocessing
    3. Taylor expanded in y around 0 77.6%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out77.6%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative77.6%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified77.6%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in i around inf 37.2%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. *-commutative37.2%

        \[\leadsto -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
    8. Simplified37.2%

      \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification37.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-79}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-284}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+99}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 63.2% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+41} \lor \neg \left(x \leq 1.16 \cdot 10^{+55}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= x -1.8e+41) (not (<= x 1.16e+55)))
   (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
   (- (* b c) (* 4.0 (+ (* x i) (* t a))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((x <= -1.8e+41) || !(x <= 1.16e+55)) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((x <= (-1.8d+41)) .or. (.not. (x <= 1.16d+55))) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else
        tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if ((x <= -1.8e+41) || !(x <= 1.16e+55)) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (x <= -1.8e+41) or not (x <= 1.16e+55):
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	else:
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((x <= -1.8e+41) || !(x <= 1.16e+55))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a))));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((x <= -1.8e+41) || ~((x <= 1.16e+55)))
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	else
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.8e+41], N[Not[LessEqual[x, 1.16e+55]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+41} \lor \neg \left(x \leq 1.16 \cdot 10^{+55}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.80000000000000013e41 or 1.1599999999999999e55 < x

    1. Initial program 72.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. Simplified77.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)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 78.3%

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

    if -1.80000000000000013e41 < x < 1.1599999999999999e55

    1. Initial program 93.9%

      \[\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. Add Preprocessing
    3. Taylor expanded in y around 0 84.2%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out84.2%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative84.2%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified84.2%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 62.2%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+41} \lor \neg \left(x \leq 1.16 \cdot 10^{+55}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 58.5% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-79}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+116}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= z -2.3e-79)
   (+ (* 18.0 (* (* y z) (* x t))) (* j (* k -27.0)))
   (if (<= z 1.1e+116)
     (- (* b c) (* 4.0 (+ (* x i) (* t a))))
     (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (z <= -2.3e-79) {
		tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
	} else if (z <= 1.1e+116) {
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	} else {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (z <= (-2.3d-79)) then
        tmp = (18.0d0 * ((y * z) * (x * t))) + (j * (k * (-27.0d0)))
    else if (z <= 1.1d+116) then
        tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
    else
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if (z <= -2.3e-79) {
		tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
	} else if (z <= 1.1e+116) {
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	} else {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if z <= -2.3e-79:
		tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0))
	elif z <= 1.1e+116:
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)))
	else:
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (z <= -2.3e-79)
		tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + Float64(j * Float64(k * -27.0)));
	elseif (z <= 1.1e+116)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a))));
	else
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (z <= -2.3e-79)
		tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
	elseif (z <= 1.1e+116)
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	else
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, -2.3e-79], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+116], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-79}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+116}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.30000000000000012e-79

    1. Initial program 82.7%

      \[\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. Simplified83.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 59.8%

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. associate-*r*60.1%

        \[\leadsto 18 \cdot \color{blue}{\left(\left(t \cdot x\right) \cdot \left(y \cdot z\right)\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified60.1%

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

    if -2.30000000000000012e-79 < z < 1.1e116

    1. Initial program 85.7%

      \[\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. Add Preprocessing
    3. Taylor expanded in y around 0 82.2%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out82.2%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative82.2%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified82.2%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 71.0%

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

    if 1.1e116 < z

    1. Initial program 86.8%

      \[\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. Simplified76.0%

      \[\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)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 47.2%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-79}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+116}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 42.1% accurate, 1.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{-15} \lor \neg \left(z \leq 6.2 \cdot 10^{+104}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= z -4.5e-15) (not (<= z 6.2e+104)))
   (* t (* 18.0 (* x (* y z))))
   (* b (+ c (* -4.0 (* i (/ x b)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((z <= -4.5e-15) || !(z <= 6.2e+104)) {
		tmp = t * (18.0 * (x * (y * z)));
	} else {
		tmp = b * (c + (-4.0 * (i * (x / b))));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((z <= (-4.5d-15)) .or. (.not. (z <= 6.2d+104))) then
        tmp = t * (18.0d0 * (x * (y * z)))
    else
        tmp = b * (c + ((-4.0d0) * (i * (x / b))))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if ((z <= -4.5e-15) || !(z <= 6.2e+104)) {
		tmp = t * (18.0 * (x * (y * z)));
	} else {
		tmp = b * (c + (-4.0 * (i * (x / b))));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (z <= -4.5e-15) or not (z <= 6.2e+104):
		tmp = t * (18.0 * (x * (y * z)))
	else:
		tmp = b * (c + (-4.0 * (i * (x / b))))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((z <= -4.5e-15) || !(z <= 6.2e+104))
		tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z))));
	else
		tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b)))));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((z <= -4.5e-15) || ~((z <= 6.2e+104)))
		tmp = t * (18.0 * (x * (y * z)));
	else
		tmp = b * (c + (-4.0 * (i * (x / b))));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[z, -4.5e-15], N[Not[LessEqual[z, 6.2e+104]], $MachinePrecision]], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-15} \lor \neg \left(z \leq 6.2 \cdot 10^{+104}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4999999999999998e-15 or 6.20000000000000033e104 < z

    1. Initial program 82.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. Simplified78.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)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 53.4%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Taylor expanded in x around inf 42.7%

      \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]

    if -4.4999999999999998e-15 < z < 6.20000000000000033e104

    1. Initial program 87.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 \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 68.6%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Taylor expanded in b around inf 63.8%

      \[\leadsto \color{blue}{b \cdot \left(c + -1 \cdot \frac{4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)}{b}\right)} \]
    5. Step-by-step derivation
      1. associate-*r/63.8%

        \[\leadsto b \cdot \left(c + \color{blue}{\frac{-1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}{b}}\right) \]
      2. mul-1-neg63.8%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{-\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}}{b}\right) \]
      3. associate-*r*63.8%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{\left(4 \cdot i\right) \cdot x} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      4. *-commutative63.8%

        \[\leadsto b \cdot \left(c + \frac{-\left(\color{blue}{x \cdot \left(4 \cdot i\right)} + 27 \cdot \left(j \cdot k\right)\right)}{b}\right) \]
      5. *-commutative63.8%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      6. associate-*r*63.8%

        \[\leadsto b \cdot \left(c + \frac{-\left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(k \cdot 27\right)}\right)}{b}\right) \]
      7. distribute-neg-in63.8%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot \left(4 \cdot i\right)\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}}{b}\right) \]
      8. associate-*r*63.8%

        \[\leadsto b \cdot \left(c + \frac{\left(-\color{blue}{\left(x \cdot 4\right) \cdot i}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      9. distribute-lft-neg-out63.8%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{\left(-x \cdot 4\right) \cdot i} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      10. *-commutative63.8%

        \[\leadsto b \cdot \left(c + \frac{\color{blue}{i \cdot \left(-x \cdot 4\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      11. distribute-rgt-neg-in63.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      12. metadata-eval63.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot \color{blue}{-4}\right) + \left(-j \cdot \left(k \cdot 27\right)\right)}{b}\right) \]
      13. associate-*r*63.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{\left(j \cdot k\right) \cdot 27}\right)}{b}\right) \]
      14. *-commutative63.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \left(-\color{blue}{27 \cdot \left(j \cdot k\right)}\right)}{b}\right) \]
      15. distribute-lft-neg-in63.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{\left(-27\right) \cdot \left(j \cdot k\right)}}{b}\right) \]
      16. metadata-eval63.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)}{b}\right) \]
      17. *-commutative63.8%

        \[\leadsto b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \color{blue}{\left(k \cdot j\right)}}{b}\right) \]
    6. Simplified63.8%

      \[\leadsto \color{blue}{b \cdot \left(c + \frac{i \cdot \left(x \cdot -4\right) + -27 \cdot \left(k \cdot j\right)}{b}\right)} \]
    7. Taylor expanded in i around inf 52.6%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \frac{i \cdot x}{b}}\right) \]
    8. Step-by-step derivation
      1. associate-/l*53.2%

        \[\leadsto b \cdot \left(c + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{b}\right)}\right) \]
    9. Simplified53.2%

      \[\leadsto b \cdot \left(c + \color{blue}{-4 \cdot \left(i \cdot \frac{x}{b}\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{-15} \lor \neg \left(z \leq 6.2 \cdot 10^{+104}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 34.1% accurate, 1.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+195} \lor \neg \left(b \cdot c \leq 1.8 \cdot 10^{+181}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= (* b c) -2.3e+195) (not (<= (* b c) 1.8e+181)))
   (* b c)
   (* (* x i) -4.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (((b * c) <= -2.3e+195) || !((b * c) <= 1.8e+181)) {
		tmp = b * c;
	} else {
		tmp = (x * i) * -4.0;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (((b * c) <= (-2.3d+195)) .or. (.not. ((b * c) <= 1.8d+181))) then
        tmp = b * c
    else
        tmp = (x * i) * (-4.0d0)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if (((b * c) <= -2.3e+195) || !((b * c) <= 1.8e+181)) {
		tmp = b * c;
	} else {
		tmp = (x * i) * -4.0;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if ((b * c) <= -2.3e+195) or not ((b * c) <= 1.8e+181):
		tmp = b * c
	else:
		tmp = (x * i) * -4.0
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((Float64(b * c) <= -2.3e+195) || !(Float64(b * c) <= 1.8e+181))
		tmp = Float64(b * c);
	else
		tmp = Float64(Float64(x * i) * -4.0);
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (((b * c) <= -2.3e+195) || ~(((b * c) <= 1.8e+181)))
		tmp = b * c;
	else
		tmp = (x * i) * -4.0;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.3e+195], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.8e+181]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+195} \lor \neg \left(b \cdot c \leq 1.8 \cdot 10^{+181}\right):\\
\;\;\;\;b \cdot c\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -2.3000000000000001e195 or 1.79999999999999992e181 < (*.f64 b c)

    1. Initial program 79.8%

      \[\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. Add Preprocessing
    3. Taylor expanded in y around 0 81.7%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out81.7%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative81.7%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified81.7%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in b around inf 76.6%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -2.3000000000000001e195 < (*.f64 b c) < 1.79999999999999992e181

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in y around 0 72.0%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out72.0%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative72.0%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified72.0%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in i around inf 28.1%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. *-commutative28.1%

        \[\leadsto -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
    8. Simplified28.1%

      \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+195} \lor \neg \left(b \cdot c \leq 1.8 \cdot 10^{+181}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 36.7% accurate, 1.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.12 \cdot 10^{+154} \lor \neg \left(b \cdot c \leq 1.2 \cdot 10^{+181}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= (* b c) -1.12e+154) (not (<= (* b c) 1.2e+181)))
   (* b c)
   (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (((b * c) <= -1.12e+154) || !((b * c) <= 1.2e+181)) {
		tmp = b * c;
	} else {
		tmp = -27.0 * (j * k);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (((b * c) <= (-1.12d+154)) .or. (.not. ((b * c) <= 1.2d+181))) then
        tmp = b * c
    else
        tmp = (-27.0d0) * (j * k)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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 tmp;
	if (((b * c) <= -1.12e+154) || !((b * c) <= 1.2e+181)) {
		tmp = b * c;
	} else {
		tmp = -27.0 * (j * k);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if ((b * c) <= -1.12e+154) or not ((b * c) <= 1.2e+181):
		tmp = b * c
	else:
		tmp = -27.0 * (j * k)
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((Float64(b * c) <= -1.12e+154) || !(Float64(b * c) <= 1.2e+181))
		tmp = Float64(b * c);
	else
		tmp = Float64(-27.0 * Float64(j * k));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (((b * c) <= -1.12e+154) || ~(((b * c) <= 1.2e+181)))
		tmp = b * c;
	else
		tmp = -27.0 * (j * k);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.12e+154], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.2e+181]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.12 \cdot 10^{+154} \lor \neg \left(b \cdot c \leq 1.2 \cdot 10^{+181}\right):\\
\;\;\;\;b \cdot c\\

\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.11999999999999994e154 or 1.20000000000000001e181 < (*.f64 b c)

    1. Initial program 79.8%

      \[\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. Add Preprocessing
    3. Taylor expanded in y around 0 81.6%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out81.6%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative81.6%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified81.6%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in b around inf 71.9%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -1.11999999999999994e154 < (*.f64 b c) < 1.20000000000000001e181

    1. Initial program 86.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 \]
    2. Simplified88.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around inf 23.1%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.12 \cdot 10^{+154} \lor \neg \left(b \cdot c \leq 1.2 \cdot 10^{+181}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 23.1% accurate, 10.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ b \cdot c \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < 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) {
	return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(b * c)
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Derivation
  1. Initial program 84.9%

    \[\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. Add Preprocessing
  3. Taylor expanded in y around 0 74.0%

    \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
  4. Step-by-step derivation
    1. distribute-lft-out74.0%

      \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
    2. *-commutative74.0%

      \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
  5. Simplified74.0%

    \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
  6. Taylor expanded in b around inf 22.9%

    \[\leadsto \color{blue}{b \cdot c} \]
  7. Add Preprocessing

Developer Target 1: 89.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\ t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
        (t_2
         (-
          (- (* (* 18.0 t) (* (* x y) z)) t_1)
          (- (* (* k j) 27.0) (* c b)))))
   (if (< t -1.6210815397541398e-69)
     t_2
     (if (< t 165.68027943805222)
       (+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
       t_2))))
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 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((a * t) + (i * x)) * 4.0d0
    t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
    if (t < (-1.6210815397541398d-69)) then
        tmp = t_2
    else if (t < 165.68027943805222d0) then
        tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
    else
        tmp = t_2
    end if
    code = tmp
end function
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 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((a * t) + (i * x)) * 4.0
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b))
	tmp = 0
	if t < -1.6210815397541398e-69:
		tmp = t_2
	elif t < 165.68027943805222:
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0)
	t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b)))
	tmp = 0.0
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((a * t) + (i * x)) * 4.0;
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	tmp = 0.0;
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))

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