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

Percentage Accurate: 85.4% → 91.9%
Time: 20.1s
Alternatives: 19
Speedup: 0.5×

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 19 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: 91.9% 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} \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(b \cdot c + t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \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
 (if (<=
      (-
       (-
        (+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
        (* (* x 4.0) i))
       (* (* j 27.0) k))
      INFINITY)
   (-
    (+ (* b c) (* t (- (* z (* 18.0 (* x y))) (* a 4.0))))
    (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
   (* 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 tmp;
	if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
		tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} 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 tmp;
	if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
		tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} 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):
	tmp = 0
	if ((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf:
		tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)))
	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)
	tmp = 0.0
	if (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)) <= Inf)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(18.0 * Float64(x * y))) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))));
	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)
	tmp = 0.0;
	if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf)
		tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	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_] := If[LessEqual[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], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $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], 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}
\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(b \cdot c + t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\

\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 97.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. Simplified95.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. Step-by-step derivation
      1. pow195.9%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative97.6%

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

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative97.6%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative97.6%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*97.5%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified97.5%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]

    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 70.0%

      \[\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 simplification95.4%

    \[\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(b \cdot c + t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\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 2: 52.8% accurate, 0.7× 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) + a \cdot \left(t \cdot -4\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ t_3 := b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{if}\;t\_2 \leq -4 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-146}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{-13}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(b \cdot \frac{c}{k} + j \cdot -27\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 (+ (* j (* k -27.0)) (* a (* t -4.0))))
        (t_2 (* (* j 27.0) k))
        (t_3 (- (* b c) (* x (* 4.0 i)))))
   (if (<= t_2 -4e+188)
     t_1
     (if (<= t_2 2e-146)
       t_3
       (if (<= t_2 1e-95)
         t_1
         (if (<= t_2 1e-13) t_3 (* k (+ (* b (/ c k)) (* j -27.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 t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
	double t_2 = (j * 27.0) * k;
	double t_3 = (b * c) - (x * (4.0 * i));
	double tmp;
	if (t_2 <= -4e+188) {
		tmp = t_1;
	} else if (t_2 <= 2e-146) {
		tmp = t_3;
	} else if (t_2 <= 1e-95) {
		tmp = t_1;
	} else if (t_2 <= 1e-13) {
		tmp = t_3;
	} else {
		tmp = k * ((b * (c / k)) + (j * -27.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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
    t_2 = (j * 27.0d0) * k
    t_3 = (b * c) - (x * (4.0d0 * i))
    if (t_2 <= (-4d+188)) then
        tmp = t_1
    else if (t_2 <= 2d-146) then
        tmp = t_3
    else if (t_2 <= 1d-95) then
        tmp = t_1
    else if (t_2 <= 1d-13) then
        tmp = t_3
    else
        tmp = k * ((b * (c / k)) + (j * (-27.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 t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
	double t_2 = (j * 27.0) * k;
	double t_3 = (b * c) - (x * (4.0 * i));
	double tmp;
	if (t_2 <= -4e+188) {
		tmp = t_1;
	} else if (t_2 <= 2e-146) {
		tmp = t_3;
	} else if (t_2 <= 1e-95) {
		tmp = t_1;
	} else if (t_2 <= 1e-13) {
		tmp = t_3;
	} else {
		tmp = k * ((b * (c / k)) + (j * -27.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):
	t_1 = (j * (k * -27.0)) + (a * (t * -4.0))
	t_2 = (j * 27.0) * k
	t_3 = (b * c) - (x * (4.0 * i))
	tmp = 0
	if t_2 <= -4e+188:
		tmp = t_1
	elif t_2 <= 2e-146:
		tmp = t_3
	elif t_2 <= 1e-95:
		tmp = t_1
	elif t_2 <= 1e-13:
		tmp = t_3
	else:
		tmp = k * ((b * (c / k)) + (j * -27.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)
	t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0)))
	t_2 = Float64(Float64(j * 27.0) * k)
	t_3 = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))
	tmp = 0.0
	if (t_2 <= -4e+188)
		tmp = t_1;
	elseif (t_2 <= 2e-146)
		tmp = t_3;
	elseif (t_2 <= 1e-95)
		tmp = t_1;
	elseif (t_2 <= 1e-13)
		tmp = t_3;
	else
		tmp = Float64(k * Float64(Float64(b * Float64(c / k)) + Float64(j * -27.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)
	t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
	t_2 = (j * 27.0) * k;
	t_3 = (b * c) - (x * (4.0 * i));
	tmp = 0.0;
	if (t_2 <= -4e+188)
		tmp = t_1;
	elseif (t_2 <= 2e-146)
		tmp = t_3;
	elseif (t_2 <= 1e-95)
		tmp = t_1;
	elseif (t_2 <= 1e-13)
		tmp = t_3;
	else
		tmp = k * ((b * (c / k)) + (j * -27.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_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+188], t$95$1, If[LessEqual[t$95$2, 2e-146], t$95$3, If[LessEqual[t$95$2, 1e-95], t$95$1, If[LessEqual[t$95$2, 1e-13], t$95$3, N[(k * N[(N[(b * N[(c / k), $MachinePrecision]), $MachinePrecision] + N[(j * -27.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}
t_1 := j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-146}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 10^{-95}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{-13}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.0000000000000001e188 or 2.00000000000000005e-146 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999989e-96

    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. Simplified87.5%

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e188 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000005e-146 or 9.99999999999999989e-96 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e-13

    1. Initial program 92.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. Simplified93.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 0 62.5%

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

      \[\leadsto b \cdot c - \color{blue}{4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. associate-*r*59.4%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
      2. *-commutative59.4%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified59.4%

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

    if 1e-13 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    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. Simplified82.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 t around 0 66.0%

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

      \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. associate-*r*61.4%

        \[\leadsto b \cdot c - \color{blue}{\left(27 \cdot j\right) \cdot k} \]
      2. *-commutative61.4%

        \[\leadsto b \cdot c - \color{blue}{\left(j \cdot 27\right)} \cdot k \]
      3. associate-*r*59.7%

        \[\leadsto b \cdot c - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
    7. Simplified59.7%

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

      \[\leadsto \color{blue}{k \cdot \left(\frac{b \cdot c}{k} - 27 \cdot j\right)} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv61.3%

        \[\leadsto k \cdot \color{blue}{\left(\frac{b \cdot c}{k} + \left(-27\right) \cdot j\right)} \]
      2. metadata-eval61.3%

        \[\leadsto k \cdot \left(\frac{b \cdot c}{k} + \color{blue}{-27} \cdot j\right) \]
      3. associate-/l*61.3%

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

        \[\leadsto k \cdot \left(b \cdot \frac{c}{k} + \color{blue}{j \cdot -27}\right) \]
    10. Simplified61.3%

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

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

Alternative 3: 54.5% accurate, 0.7× 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 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -4 \cdot 10^{+188}:\\ \;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-174}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+101}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\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
 (let* ((t_1 (* j (* k -27.0))) (t_2 (* (* j 27.0) k)))
   (if (<= t_2 -4e+188)
     (+ t_1 (* a (* t -4.0)))
     (if (<= t_2 2e-174)
       (- (* b c) (* x (* 4.0 i)))
       (if (<= t_2 5e+101)
         (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
         (+ t_1 (* 18.0 (* z (* y (* x t))))))))))
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 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -4e+188) {
		tmp = t_1 + (a * (t * -4.0));
	} else if (t_2 <= 2e-174) {
		tmp = (b * c) - (x * (4.0 * i));
	} else if (t_2 <= 5e+101) {
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	} else {
		tmp = t_1 + (18.0 * (z * (y * (x * t))));
	}
	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 = (j * 27.0d0) * k
    if (t_2 <= (-4d+188)) then
        tmp = t_1 + (a * (t * (-4.0d0)))
    else if (t_2 <= 2d-174) then
        tmp = (b * c) - (x * (4.0d0 * i))
    else if (t_2 <= 5d+101) then
        tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
    else
        tmp = t_1 + (18.0d0 * (z * (y * (x * t))))
    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 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -4e+188) {
		tmp = t_1 + (a * (t * -4.0));
	} else if (t_2 <= 2e-174) {
		tmp = (b * c) - (x * (4.0 * i));
	} else if (t_2 <= 5e+101) {
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	} else {
		tmp = t_1 + (18.0 * (z * (y * (x * t))));
	}
	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 = (j * 27.0) * k
	tmp = 0
	if t_2 <= -4e+188:
		tmp = t_1 + (a * (t * -4.0))
	elif t_2 <= 2e-174:
		tmp = (b * c) - (x * (4.0 * i))
	elif t_2 <= 5e+101:
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0))
	else:
		tmp = t_1 + (18.0 * (z * (y * (x * t))))
	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(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t_2 <= -4e+188)
		tmp = Float64(t_1 + Float64(a * Float64(t * -4.0)));
	elseif (t_2 <= 2e-174)
		tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)));
	elseif (t_2 <= 5e+101)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0)));
	else
		tmp = Float64(t_1 + Float64(18.0 * Float64(z * Float64(y * Float64(x * t)))));
	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 = (j * 27.0) * k;
	tmp = 0.0;
	if (t_2 <= -4e+188)
		tmp = t_1 + (a * (t * -4.0));
	elseif (t_2 <= 2e-174)
		tmp = (b * c) - (x * (4.0 * i));
	elseif (t_2 <= 5e+101)
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	else
		tmp = t_1 + (18.0 * (z * (y * (x * t))));
	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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+188], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-174], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+101], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(18.0 * N[(z * N[(y * N[(x * t), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+188}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-174}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+101}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.0000000000000001e188

    1. Initial program 87.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. 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 a around inf 78.8%

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e188 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e-174

    1. Initial program 93.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. Simplified93.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 0 62.4%

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

      \[\leadsto b \cdot c - \color{blue}{4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. associate-*r*58.8%

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

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified58.8%

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

    if 2e-174 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999989e101

    1. Initial program 90.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. pow190.1%

        \[\leadsto \left(\left(\left(\color{blue}{{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)}^{1}} - \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. associate-*r*90.0%

        \[\leadsto \left(\left(\left({\left(\color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)} \cdot t\right)}^{1} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative90.0%

        \[\leadsto \left(\left(\left({\color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right)}}^{1} - \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 \]
      4. associate-*r*90.1%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}\right)}^{1} - \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 \]
      5. *-commutative90.1%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right)}\right)}^{1} - \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 \]
      6. *-commutative90.1%

        \[\leadsto \left(\left(\left({\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right)\right)}^{1} - \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 \]
    4. Applied egg-rr90.1%

      \[\leadsto \left(\left(\left(\color{blue}{{\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\right)}^{1}} - \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 \]
    5. Step-by-step derivation
      1. unpow190.1%

        \[\leadsto \left(\left(\left(\color{blue}{t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)} - \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. associate-*r*92.6%

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

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

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\right) - \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 \]
      5. associate-*r*92.6%

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    6. Simplified92.6%

      \[\leadsto \left(\left(\left(\color{blue}{\left(t \cdot z\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    7. Taylor expanded in x around inf 54.7%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv54.7%

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(-4\right) \cdot i\right)} \]
      2. associate-*r*59.6%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(-4\right) \cdot i\right) \]
      3. metadata-eval59.6%

        \[\leadsto x \cdot \left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + \color{blue}{-4} \cdot i\right) \]
    9. Simplified59.6%

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

    if 4.99999999999999989e101 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 83.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. Simplified77.2%

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

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

        \[\leadsto 18 \cdot \color{blue}{{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}^{1}} + j \cdot \left(k \cdot -27\right) \]
      2. *-commutative64.9%

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

      \[\leadsto 18 \cdot \color{blue}{{\left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)}^{1}} + j \cdot \left(k \cdot -27\right) \]
    7. Step-by-step derivation
      1. unpow164.9%

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

        \[\leadsto 18 \cdot \color{blue}{\left(\left(t \cdot x\right) \cdot \left(z \cdot y\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative66.8%

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

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

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

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

Alternative 4: 80.0% 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} t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\ t_2 := \left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ t_3 := t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;t \leq -4.1 \cdot 10^{+158}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+74}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+163}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \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 (* 18.0 (* x (* y z))))
        (t_2
         (- (- (- (* b c) (* 4.0 (* t a))) (* (* x 4.0) i)) (* (* j 27.0) k)))
        (t_3 (+ (* t (+ t_1 (* a -4.0))) (* j (* k -27.0)))))
   (if (<= t -4.1e+158)
     t_3
     (if (<= t -1.3e+74)
       t_2
       (if (<= t -1.45e-31)
         (- (* t (- t_1 (* a 4.0))) (* 27.0 (* j k)))
         (if (<= t 5.2e+163) t_2 t_3))))))
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 = 18.0 * (x * (y * z));
	double t_2 = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double t_3 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
	double tmp;
	if (t <= -4.1e+158) {
		tmp = t_3;
	} else if (t <= -1.3e+74) {
		tmp = t_2;
	} else if (t <= -1.45e-31) {
		tmp = (t * (t_1 - (a * 4.0))) - (27.0 * (j * k));
	} else if (t <= 5.2e+163) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = 18.0d0 * (x * (y * z))
    t_2 = (((b * c) - (4.0d0 * (t * a))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
    t_3 = (t * (t_1 + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
    if (t <= (-4.1d+158)) then
        tmp = t_3
    else if (t <= (-1.3d+74)) then
        tmp = t_2
    else if (t <= (-1.45d-31)) then
        tmp = (t * (t_1 - (a * 4.0d0))) - (27.0d0 * (j * k))
    else if (t <= 5.2d+163) then
        tmp = t_2
    else
        tmp = t_3
    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 = 18.0 * (x * (y * z));
	double t_2 = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double t_3 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
	double tmp;
	if (t <= -4.1e+158) {
		tmp = t_3;
	} else if (t <= -1.3e+74) {
		tmp = t_2;
	} else if (t <= -1.45e-31) {
		tmp = (t * (t_1 - (a * 4.0))) - (27.0 * (j * k));
	} else if (t <= 5.2e+163) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 = 18.0 * (x * (y * z))
	t_2 = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k)
	t_3 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0))
	tmp = 0
	if t <= -4.1e+158:
		tmp = t_3
	elif t <= -1.3e+74:
		tmp = t_2
	elif t <= -1.45e-31:
		tmp = (t * (t_1 - (a * 4.0))) - (27.0 * (j * k))
	elif t <= 5.2e+163:
		tmp = t_2
	else:
		tmp = t_3
	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(18.0 * Float64(x * Float64(y * z)))
	t_2 = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
	t_3 = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0)))
	tmp = 0.0
	if (t <= -4.1e+158)
		tmp = t_3;
	elseif (t <= -1.3e+74)
		tmp = t_2;
	elseif (t <= -1.45e-31)
		tmp = Float64(Float64(t * Float64(t_1 - Float64(a * 4.0))) - Float64(27.0 * Float64(j * k)));
	elseif (t <= 5.2e+163)
		tmp = t_2;
	else
		tmp = t_3;
	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 = 18.0 * (x * (y * z));
	t_2 = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	t_3 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
	tmp = 0.0;
	if (t <= -4.1e+158)
		tmp = t_3;
	elseif (t <= -1.3e+74)
		tmp = t_2;
	elseif (t <= -1.45e-31)
		tmp = (t * (t_1 - (a * 4.0))) - (27.0 * (j * k));
	elseif (t <= 5.2e+163)
		tmp = t_2;
	else
		tmp = t_3;
	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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.1e+158], t$95$3, If[LessEqual[t, -1.3e+74], t$95$2, If[LessEqual[t, -1.45e-31], N[(N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+163], t$95$2, t$95$3]]]]]]]
\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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := \left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
t_3 := t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -4.1 \cdot 10^{+158}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq -1.3 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.45 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right) - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.10000000000000004e158 or 5.2000000000000003e163 < t

    1. Initial program 81.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. Simplified87.4%

      \[\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 t around inf 91.3%

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

    if -4.10000000000000004e158 < t < -1.3e74 or -1.45e-31 < t < 5.2000000000000003e163

    1. Initial program 93.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 x around 0 91.4%

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

    if -1.3e74 < t < -1.45e-31

    1. Initial program 89.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. Simplified89.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 i around 0 87.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{+158}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+74}:\\ \;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+163}:\\ \;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 30.8% 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} t_1 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;c \leq -6.6 \cdot 10^{-127}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq -7.8 \cdot 10^{-221}:\\ \;\;\;\;18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;c \leq -7.2 \cdot 10^{-282}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{-197}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 2.2 \cdot 10^{-99}:\\ \;\;\;\;\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 7.5 \cdot 10^{+136}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \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 (* -4.0 (* x i))))
   (if (<= c -6.6e-127)
     (* b c)
     (if (<= c -7.8e-221)
       (* 18.0 (* z (* y (* x t))))
       (if (<= c -7.2e-282)
         t_1
         (if (<= c 6.2e-197)
           (* k (* j -27.0))
           (if (<= c 2.2e-99)
             (* (* 18.0 t) (* z (* x y)))
             (if (<= c 1.3e+15)
               t_1
               (if (<= c 7.5e+136) (* j (* k -27.0)) (* 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) {
	double t_1 = -4.0 * (x * i);
	double tmp;
	if (c <= -6.6e-127) {
		tmp = b * c;
	} else if (c <= -7.8e-221) {
		tmp = 18.0 * (z * (y * (x * t)));
	} else if (c <= -7.2e-282) {
		tmp = t_1;
	} else if (c <= 6.2e-197) {
		tmp = k * (j * -27.0);
	} else if (c <= 2.2e-99) {
		tmp = (18.0 * t) * (z * (x * y));
	} else if (c <= 1.3e+15) {
		tmp = t_1;
	} else if (c <= 7.5e+136) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	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 = (-4.0d0) * (x * i)
    if (c <= (-6.6d-127)) then
        tmp = b * c
    else if (c <= (-7.8d-221)) then
        tmp = 18.0d0 * (z * (y * (x * t)))
    else if (c <= (-7.2d-282)) then
        tmp = t_1
    else if (c <= 6.2d-197) then
        tmp = k * (j * (-27.0d0))
    else if (c <= 2.2d-99) then
        tmp = (18.0d0 * t) * (z * (x * y))
    else if (c <= 1.3d+15) then
        tmp = t_1
    else if (c <= 7.5d+136) then
        tmp = j * (k * (-27.0d0))
    else
        tmp = b * c
    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 = -4.0 * (x * i);
	double tmp;
	if (c <= -6.6e-127) {
		tmp = b * c;
	} else if (c <= -7.8e-221) {
		tmp = 18.0 * (z * (y * (x * t)));
	} else if (c <= -7.2e-282) {
		tmp = t_1;
	} else if (c <= 6.2e-197) {
		tmp = k * (j * -27.0);
	} else if (c <= 2.2e-99) {
		tmp = (18.0 * t) * (z * (x * y));
	} else if (c <= 1.3e+15) {
		tmp = t_1;
	} else if (c <= 7.5e+136) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	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 = -4.0 * (x * i)
	tmp = 0
	if c <= -6.6e-127:
		tmp = b * c
	elif c <= -7.8e-221:
		tmp = 18.0 * (z * (y * (x * t)))
	elif c <= -7.2e-282:
		tmp = t_1
	elif c <= 6.2e-197:
		tmp = k * (j * -27.0)
	elif c <= 2.2e-99:
		tmp = (18.0 * t) * (z * (x * y))
	elif c <= 1.3e+15:
		tmp = t_1
	elif c <= 7.5e+136:
		tmp = j * (k * -27.0)
	else:
		tmp = b * c
	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(-4.0 * Float64(x * i))
	tmp = 0.0
	if (c <= -6.6e-127)
		tmp = Float64(b * c);
	elseif (c <= -7.8e-221)
		tmp = Float64(18.0 * Float64(z * Float64(y * Float64(x * t))));
	elseif (c <= -7.2e-282)
		tmp = t_1;
	elseif (c <= 6.2e-197)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (c <= 2.2e-99)
		tmp = Float64(Float64(18.0 * t) * Float64(z * Float64(x * y)));
	elseif (c <= 1.3e+15)
		tmp = t_1;
	elseif (c <= 7.5e+136)
		tmp = Float64(j * Float64(k * -27.0));
	else
		tmp = Float64(b * c);
	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 = -4.0 * (x * i);
	tmp = 0.0;
	if (c <= -6.6e-127)
		tmp = b * c;
	elseif (c <= -7.8e-221)
		tmp = 18.0 * (z * (y * (x * t)));
	elseif (c <= -7.2e-282)
		tmp = t_1;
	elseif (c <= 6.2e-197)
		tmp = k * (j * -27.0);
	elseif (c <= 2.2e-99)
		tmp = (18.0 * t) * (z * (x * y));
	elseif (c <= 1.3e+15)
		tmp = t_1;
	elseif (c <= 7.5e+136)
		tmp = j * (k * -27.0);
	else
		tmp = b * c;
	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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.6e-127], N[(b * c), $MachinePrecision], If[LessEqual[c, -7.8e-221], N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -7.2e-282], t$95$1, If[LessEqual[c, 6.2e-197], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e-99], N[(N[(18.0 * t), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.3e+15], t$95$1, If[LessEqual[c, 7.5e+136], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -6.6 \cdot 10^{-127}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;c \leq -7.8 \cdot 10^{-221}:\\
\;\;\;\;18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\

\mathbf{elif}\;c \leq -7.2 \cdot 10^{-282}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 6.2 \cdot 10^{-197}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

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

\mathbf{elif}\;c \leq 1.3 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;b \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if c < -6.59999999999999961e-127 or 7.5000000000000002e136 < c

    1. Initial program 92.6%

      \[\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.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. Step-by-step derivation
      1. pow189.3%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative91.8%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow191.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative91.8%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative91.8%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*91.8%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified91.8%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in b around inf 37.1%

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

    if -6.59999999999999961e-127 < c < -7.7999999999999997e-221

    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. Add Preprocessing
    3. Step-by-step derivation
      1. pow182.7%

        \[\leadsto \left(\left(\left(\color{blue}{{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)}^{1}} - \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. associate-*r*78.7%

        \[\leadsto \left(\left(\left({\left(\color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)} \cdot t\right)}^{1} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative78.7%

        \[\leadsto \left(\left(\left({\color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right)}}^{1} - \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 \]
      4. associate-*r*82.7%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}\right)}^{1} - \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 \]
      5. *-commutative82.7%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right)}\right)}^{1} - \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 \]
      6. *-commutative82.7%

        \[\leadsto \left(\left(\left({\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right)\right)}^{1} - \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 \]
    4. Applied egg-rr82.7%

      \[\leadsto \left(\left(\left(\color{blue}{{\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\right)}^{1}} - \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 \]
    5. Step-by-step derivation
      1. unpow182.7%

        \[\leadsto \left(\left(\left(\color{blue}{t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)} - \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. associate-*r*79.0%

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

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

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\right) - \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 \]
      5. associate-*r*79.0%

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    6. Simplified79.0%

      \[\leadsto \left(\left(\left(\color{blue}{\left(t \cdot z\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    7. Taylor expanded in x around inf 45.8%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv45.8%

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(-4\right) \cdot i\right)} \]
      2. associate-*r*50.0%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(-4\right) \cdot i\right) \]
      3. metadata-eval50.0%

        \[\leadsto x \cdot \left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + \color{blue}{-4} \cdot i\right) \]
    9. Simplified50.0%

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

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(\left(\left(t \cdot x\right) \cdot y\right) \cdot z\right)} \]
    12. Simplified40.3%

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

    if -7.7999999999999997e-221 < c < -7.1999999999999995e-282 or 2.20000000000000004e-99 < c < 1.3e15

    1. Initial program 89.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. Simplified94.7%

      \[\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. Step-by-step derivation
      1. pow194.7%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative92.0%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow192.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative92.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative92.0%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*92.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified92.0%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in i around inf 31.9%

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

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

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

    if -7.1999999999999995e-282 < c < 6.20000000000000057e-197

    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. Simplified96.2%

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

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

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
    6. Simplified37.2%

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

    if 6.20000000000000057e-197 < c < 2.20000000000000004e-99

    1. Initial program 86.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. pow186.9%

        \[\leadsto \left(\left(\left(\color{blue}{{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)}^{1}} - \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. associate-*r*86.9%

        \[\leadsto \left(\left(\left({\left(\color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)} \cdot t\right)}^{1} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative86.9%

        \[\leadsto \left(\left(\left({\color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right)}}^{1} - \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 \]
      4. associate-*r*86.9%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}\right)}^{1} - \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 \]
      5. *-commutative86.9%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right)}\right)}^{1} - \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 \]
      6. *-commutative86.9%

        \[\leadsto \left(\left(\left({\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right)\right)}^{1} - \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 \]
    4. Applied egg-rr86.9%

      \[\leadsto \left(\left(\left(\color{blue}{{\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\right)}^{1}} - \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 \]
    5. Step-by-step derivation
      1. unpow186.9%

        \[\leadsto \left(\left(\left(\color{blue}{t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)} - \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. associate-*r*86.9%

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

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

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\right) - \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 \]
      5. associate-*r*86.9%

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    6. Simplified86.9%

      \[\leadsto \left(\left(\left(\color{blue}{\left(t \cdot z\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    7. Taylor expanded in x around inf 58.2%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv58.2%

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(-4\right) \cdot i\right)} \]
      2. associate-*r*58.2%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(-4\right) \cdot i\right) \]
      3. metadata-eval58.2%

        \[\leadsto x \cdot \left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + \color{blue}{-4} \cdot i\right) \]
    9. Simplified58.2%

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

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

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

        \[\leadsto \left(18 \cdot t\right) \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} \]
    12. Simplified48.6%

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

    if 1.3e15 < c < 7.5000000000000002e136

    1. Initial program 85.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.4%

      \[\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. Step-by-step derivation
      1. pow185.4%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative89.0%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow189.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative89.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative89.0%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*89.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified89.0%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in j around inf 27.5%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative27.5%

        \[\leadsto \color{blue}{\left(j \cdot k\right) \cdot -27} \]
      2. associate-*r*27.5%

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
    10. Simplified27.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -6.6 \cdot 10^{-127}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq -7.8 \cdot 10^{-221}:\\ \;\;\;\;18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;c \leq -7.2 \cdot 10^{-282}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{-197}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 2.2 \cdot 10^{-99}:\\ \;\;\;\;\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{+15}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq 7.5 \cdot 10^{+136}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 30.9% 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} t_1 := 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ t_2 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;c \leq -8.2 \cdot 10^{-127}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq -6.2 \cdot 10^{-221}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq -4.5 \cdot 10^{-283}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{-197}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{-99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 2.25 \cdot 10^{+15}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq 8 \cdot 10^{+136}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \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 (* 18.0 (* z (* y (* x t))))) (t_2 (* -4.0 (* x i))))
   (if (<= c -8.2e-127)
     (* b c)
     (if (<= c -6.2e-221)
       t_1
       (if (<= c -4.5e-283)
         t_2
         (if (<= c 3.6e-197)
           (* k (* j -27.0))
           (if (<= c 2.7e-99)
             t_1
             (if (<= c 2.25e+15)
               t_2
               (if (<= c 8e+136) (* j (* k -27.0)) (* 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) {
	double t_1 = 18.0 * (z * (y * (x * t)));
	double t_2 = -4.0 * (x * i);
	double tmp;
	if (c <= -8.2e-127) {
		tmp = b * c;
	} else if (c <= -6.2e-221) {
		tmp = t_1;
	} else if (c <= -4.5e-283) {
		tmp = t_2;
	} else if (c <= 3.6e-197) {
		tmp = k * (j * -27.0);
	} else if (c <= 2.7e-99) {
		tmp = t_1;
	} else if (c <= 2.25e+15) {
		tmp = t_2;
	} else if (c <= 8e+136) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	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 = 18.0d0 * (z * (y * (x * t)))
    t_2 = (-4.0d0) * (x * i)
    if (c <= (-8.2d-127)) then
        tmp = b * c
    else if (c <= (-6.2d-221)) then
        tmp = t_1
    else if (c <= (-4.5d-283)) then
        tmp = t_2
    else if (c <= 3.6d-197) then
        tmp = k * (j * (-27.0d0))
    else if (c <= 2.7d-99) then
        tmp = t_1
    else if (c <= 2.25d+15) then
        tmp = t_2
    else if (c <= 8d+136) then
        tmp = j * (k * (-27.0d0))
    else
        tmp = b * c
    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 = 18.0 * (z * (y * (x * t)));
	double t_2 = -4.0 * (x * i);
	double tmp;
	if (c <= -8.2e-127) {
		tmp = b * c;
	} else if (c <= -6.2e-221) {
		tmp = t_1;
	} else if (c <= -4.5e-283) {
		tmp = t_2;
	} else if (c <= 3.6e-197) {
		tmp = k * (j * -27.0);
	} else if (c <= 2.7e-99) {
		tmp = t_1;
	} else if (c <= 2.25e+15) {
		tmp = t_2;
	} else if (c <= 8e+136) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	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 = 18.0 * (z * (y * (x * t)))
	t_2 = -4.0 * (x * i)
	tmp = 0
	if c <= -8.2e-127:
		tmp = b * c
	elif c <= -6.2e-221:
		tmp = t_1
	elif c <= -4.5e-283:
		tmp = t_2
	elif c <= 3.6e-197:
		tmp = k * (j * -27.0)
	elif c <= 2.7e-99:
		tmp = t_1
	elif c <= 2.25e+15:
		tmp = t_2
	elif c <= 8e+136:
		tmp = j * (k * -27.0)
	else:
		tmp = b * c
	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(18.0 * Float64(z * Float64(y * Float64(x * t))))
	t_2 = Float64(-4.0 * Float64(x * i))
	tmp = 0.0
	if (c <= -8.2e-127)
		tmp = Float64(b * c);
	elseif (c <= -6.2e-221)
		tmp = t_1;
	elseif (c <= -4.5e-283)
		tmp = t_2;
	elseif (c <= 3.6e-197)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (c <= 2.7e-99)
		tmp = t_1;
	elseif (c <= 2.25e+15)
		tmp = t_2;
	elseif (c <= 8e+136)
		tmp = Float64(j * Float64(k * -27.0));
	else
		tmp = Float64(b * c);
	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 = 18.0 * (z * (y * (x * t)));
	t_2 = -4.0 * (x * i);
	tmp = 0.0;
	if (c <= -8.2e-127)
		tmp = b * c;
	elseif (c <= -6.2e-221)
		tmp = t_1;
	elseif (c <= -4.5e-283)
		tmp = t_2;
	elseif (c <= 3.6e-197)
		tmp = k * (j * -27.0);
	elseif (c <= 2.7e-99)
		tmp = t_1;
	elseif (c <= 2.25e+15)
		tmp = t_2;
	elseif (c <= 8e+136)
		tmp = j * (k * -27.0);
	else
		tmp = b * c;
	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[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.2e-127], N[(b * c), $MachinePrecision], If[LessEqual[c, -6.2e-221], t$95$1, If[LessEqual[c, -4.5e-283], t$95$2, If[LessEqual[c, 3.6e-197], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.7e-99], t$95$1, If[LessEqual[c, 2.25e+15], t$95$2, If[LessEqual[c, 8e+136], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -8.2 \cdot 10^{-127}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;c \leq -6.2 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq -4.5 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq 3.6 \cdot 10^{-197}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;c \leq 2.7 \cdot 10^{-99}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 2.25 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\

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

\mathbf{else}:\\
\;\;\;\;b \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -8.199999999999999e-127 or 8.00000000000000047e136 < c

    1. Initial program 92.6%

      \[\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.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. Step-by-step derivation
      1. pow189.3%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative91.8%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow191.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative91.8%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative91.8%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*91.8%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified91.8%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in b around inf 37.1%

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

    if -8.199999999999999e-127 < c < -6.1999999999999998e-221 or 3.5999999999999998e-197 < c < 2.7e-99

    1. Initial program 84.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. Step-by-step derivation
      1. pow184.8%

        \[\leadsto \left(\left(\left(\color{blue}{{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)}^{1}} - \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. associate-*r*82.8%

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

        \[\leadsto \left(\left(\left({\color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right)}}^{1} - \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 \]
      4. associate-*r*84.8%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}\right)}^{1} - \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 \]
      5. *-commutative84.8%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right)}\right)}^{1} - \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 \]
      6. *-commutative84.8%

        \[\leadsto \left(\left(\left({\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right)\right)}^{1} - \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 \]
    4. Applied egg-rr84.8%

      \[\leadsto \left(\left(\left(\color{blue}{{\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\right)}^{1}} - \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 \]
    5. Step-by-step derivation
      1. unpow184.8%

        \[\leadsto \left(\left(\left(\color{blue}{t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)} - \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. associate-*r*82.9%

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

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

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\right) - \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 \]
      5. associate-*r*82.9%

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    6. Simplified82.9%

      \[\leadsto \left(\left(\left(\color{blue}{\left(t \cdot z\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    7. Taylor expanded in x around inf 52.0%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv52.0%

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(-4\right) \cdot i\right)} \]
      2. associate-*r*54.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(-4\right) \cdot i\right) \]
      3. metadata-eval54.1%

        \[\leadsto x \cdot \left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + \color{blue}{-4} \cdot i\right) \]
    9. Simplified54.1%

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

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(\left(\left(t \cdot x\right) \cdot y\right) \cdot z\right)} \]
    12. Simplified44.5%

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

    if -6.1999999999999998e-221 < c < -4.4999999999999997e-283 or 2.7e-99 < c < 2.25e15

    1. Initial program 89.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. Simplified94.7%

      \[\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. Step-by-step derivation
      1. pow194.7%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative92.0%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow192.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative92.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative92.0%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*92.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified92.0%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in i around inf 31.9%

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

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

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

    if -4.4999999999999997e-283 < c < 3.5999999999999998e-197

    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. Simplified96.2%

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

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

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
    6. Simplified37.2%

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

    if 2.25e15 < c < 8.00000000000000047e136

    1. Initial program 85.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.4%

      \[\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. Step-by-step derivation
      1. pow185.4%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative89.0%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow189.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative89.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative89.0%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*89.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified89.0%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in j around inf 27.5%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative27.5%

        \[\leadsto \color{blue}{\left(j \cdot k\right) \cdot -27} \]
      2. associate-*r*27.5%

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
    10. Simplified27.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -8.2 \cdot 10^{-127}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq -6.2 \cdot 10^{-221}:\\ \;\;\;\;18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;c \leq -4.5 \cdot 10^{-283}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{-197}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{-99}:\\ \;\;\;\;18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;c \leq 2.25 \cdot 10^{+15}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq 8 \cdot 10^{+136}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.2% 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} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+188}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-174}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+156}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(b \cdot \frac{c}{k} + j \cdot -27\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 (* (* j 27.0) k)))
   (if (<= t_1 -4e+188)
     (+ (* j (* k -27.0)) (* a (* t -4.0)))
     (if (<= t_1 2e-174)
       (- (* b c) (* x (* 4.0 i)))
       (if (<= t_1 2e+156)
         (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
         (* k (+ (* b (/ c k)) (* j -27.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 t_1 = (j * 27.0) * k;
	double tmp;
	if (t_1 <= -4e+188) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if (t_1 <= 2e-174) {
		tmp = (b * c) - (x * (4.0 * i));
	} else if (t_1 <= 2e+156) {
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	} else {
		tmp = k * ((b * (c / k)) + (j * -27.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) :: t_1
    real(8) :: tmp
    t_1 = (j * 27.0d0) * k
    if (t_1 <= (-4d+188)) then
        tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
    else if (t_1 <= 2d-174) then
        tmp = (b * c) - (x * (4.0d0 * i))
    else if (t_1 <= 2d+156) then
        tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
    else
        tmp = k * ((b * (c / k)) + (j * (-27.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 t_1 = (j * 27.0) * k;
	double tmp;
	if (t_1 <= -4e+188) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if (t_1 <= 2e-174) {
		tmp = (b * c) - (x * (4.0 * i));
	} else if (t_1 <= 2e+156) {
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	} else {
		tmp = k * ((b * (c / k)) + (j * -27.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):
	t_1 = (j * 27.0) * k
	tmp = 0
	if t_1 <= -4e+188:
		tmp = (j * (k * -27.0)) + (a * (t * -4.0))
	elif t_1 <= 2e-174:
		tmp = (b * c) - (x * (4.0 * i))
	elif t_1 <= 2e+156:
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0))
	else:
		tmp = k * ((b * (c / k)) + (j * -27.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)
	t_1 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t_1 <= -4e+188)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0)));
	elseif (t_1 <= 2e-174)
		tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)));
	elseif (t_1 <= 2e+156)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0)));
	else
		tmp = Float64(k * Float64(Float64(b * Float64(c / k)) + Float64(j * -27.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)
	t_1 = (j * 27.0) * k;
	tmp = 0.0;
	if (t_1 <= -4e+188)
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	elseif (t_1 <= 2e-174)
		tmp = (b * c) - (x * (4.0 * i));
	elseif (t_1 <= 2e+156)
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	else
		tmp = k * ((b * (c / k)) + (j * -27.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_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+188], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-174], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+156], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(N[(b * N[(c / k), $MachinePrecision]), $MachinePrecision] + N[(j * -27.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}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+188}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-174}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+156}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.0000000000000001e188

    1. Initial program 87.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. 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 a around inf 78.8%

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e188 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e-174

    1. Initial program 93.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. Simplified93.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 0 62.4%

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

      \[\leadsto b \cdot c - \color{blue}{4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. associate-*r*58.8%

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

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified58.8%

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

    if 2e-174 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e156

    1. Initial program 89.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. pow189.4%

        \[\leadsto \left(\left(\left(\color{blue}{{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)}^{1}} - \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. associate-*r*89.4%

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

        \[\leadsto \left(\left(\left({\color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right)}}^{1} - \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 \]
      4. associate-*r*89.4%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}\right)}^{1} - \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 \]
      5. *-commutative89.4%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right)}\right)}^{1} - \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 \]
      6. *-commutative89.4%

        \[\leadsto \left(\left(\left({\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right)\right)}^{1} - \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 \]
    4. Applied egg-rr89.4%

      \[\leadsto \left(\left(\left(\color{blue}{{\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\right)}^{1}} - \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 \]
    5. Step-by-step derivation
      1. unpow189.4%

        \[\leadsto \left(\left(\left(\color{blue}{t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)} - \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. associate-*r*91.6%

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

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

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\right) - \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 \]
      5. associate-*r*91.6%

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    6. Simplified91.6%

      \[\leadsto \left(\left(\left(\color{blue}{\left(t \cdot z\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    7. Taylor expanded in x around inf 55.2%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv55.2%

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(-4\right) \cdot i\right)} \]
      2. associate-*r*59.4%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(-4\right) \cdot i\right) \]
      3. metadata-eval59.4%

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

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

    if 2e156 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 82.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. Simplified75.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 0 73.4%

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

      \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. associate-*r*73.6%

        \[\leadsto b \cdot c - \color{blue}{\left(27 \cdot j\right) \cdot k} \]
      2. *-commutative73.6%

        \[\leadsto b \cdot c - \color{blue}{\left(j \cdot 27\right)} \cdot k \]
      3. associate-*r*71.1%

        \[\leadsto b \cdot c - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
    7. Simplified71.1%

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

      \[\leadsto \color{blue}{k \cdot \left(\frac{b \cdot c}{k} - 27 \cdot j\right)} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv71.1%

        \[\leadsto k \cdot \color{blue}{\left(\frac{b \cdot c}{k} + \left(-27\right) \cdot j\right)} \]
      2. metadata-eval71.1%

        \[\leadsto k \cdot \left(\frac{b \cdot c}{k} + \color{blue}{-27} \cdot j\right) \]
      3. associate-/l*71.1%

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

        \[\leadsto k \cdot \left(b \cdot \frac{c}{k} + \color{blue}{j \cdot -27}\right) \]
    10. Simplified71.1%

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

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

Alternative 8: 72.4% 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}\;t \leq -1.95 \cdot 10^{+155} \lor \neg \left(t \leq -3.8 \cdot 10^{+74} \lor \neg \left(t \leq -7 \cdot 10^{-32}\right) \land t \leq 2 \cdot 10^{+162}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\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 (<= t -1.95e+155)
         (not (or (<= t -3.8e+74) (and (not (<= t -7e-32)) (<= t 2e+162)))))
   (+ (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))) (* j (* k -27.0)))
   (- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x 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 tmp;
	if ((t <= -1.95e+155) || !((t <= -3.8e+74) || (!(t <= -7e-32) && (t <= 2e+162)))) {
		tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
	} else {
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
	}
	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 <= (-1.95d+155)) .or. (.not. (t <= (-3.8d+74)) .or. (.not. (t <= (-7d-32))) .and. (t <= 2d+162))) then
        tmp = (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
    else
        tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
    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 <= -1.95e+155) || !((t <= -3.8e+74) || (!(t <= -7e-32) && (t <= 2e+162)))) {
		tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
	} else {
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * 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):
	tmp = 0
	if (t <= -1.95e+155) or not ((t <= -3.8e+74) or (not (t <= -7e-32) and (t <= 2e+162))):
		tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0))
	else:
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * 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)
	tmp = 0.0
	if ((t <= -1.95e+155) || !((t <= -3.8e+74) || (!(t <= -7e-32) && (t <= 2e+162))))
		tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0)));
	else
		tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * 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)
	tmp = 0.0;
	if ((t <= -1.95e+155) || ~(((t <= -3.8e+74) || (~((t <= -7e-32)) && (t <= 2e+162)))))
		tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
	else
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * 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_] := If[Or[LessEqual[t, -1.95e+155], N[Not[Or[LessEqual[t, -3.8e+74], And[N[Not[LessEqual[t, -7e-32]], $MachinePrecision], LessEqual[t, 2e+162]]]], $MachinePrecision]], N[(N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $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}\;t \leq -1.95 \cdot 10^{+155} \lor \neg \left(t \leq -3.8 \cdot 10^{+74} \lor \neg \left(t \leq -7 \cdot 10^{-32}\right) \land t \leq 2 \cdot 10^{+162}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9499999999999999e155 or -3.7999999999999998e74 < t < -6.9999999999999997e-32 or 1.9999999999999999e162 < t

    1. Initial program 84.6%

      \[\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.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 t around inf 89.0%

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

    if -1.9499999999999999e155 < t < -3.7999999999999998e74 or -6.9999999999999997e-32 < t < 1.9999999999999999e162

    1. Initial program 93.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. Simplified90.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 0 82.3%

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

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

Alternative 9: 72.4% 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} t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\ t_2 := 27 \cdot \left(j \cdot k\right)\\ t_3 := b \cdot c - \left(t\_2 + 4 \cdot \left(x \cdot i\right)\right)\\ t_4 := t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;t \leq -2.3 \cdot 10^{+155}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{+74}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-32}:\\ \;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right) - t\_2\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+162}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_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
 (let* ((t_1 (* 18.0 (* x (* y z))))
        (t_2 (* 27.0 (* j k)))
        (t_3 (- (* b c) (+ t_2 (* 4.0 (* x i)))))
        (t_4 (+ (* t (+ t_1 (* a -4.0))) (* j (* k -27.0)))))
   (if (<= t -2.3e+155)
     t_4
     (if (<= t -1.7e+74)
       t_3
       (if (<= t -4.4e-32)
         (- (* t (- t_1 (* a 4.0))) t_2)
         (if (<= t 2e+162) t_3 t_4))))))
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 = 18.0 * (x * (y * z));
	double t_2 = 27.0 * (j * k);
	double t_3 = (b * c) - (t_2 + (4.0 * (x * i)));
	double t_4 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
	double tmp;
	if (t <= -2.3e+155) {
		tmp = t_4;
	} else if (t <= -1.7e+74) {
		tmp = t_3;
	} else if (t <= -4.4e-32) {
		tmp = (t * (t_1 - (a * 4.0))) - t_2;
	} else if (t <= 2e+162) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	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) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = 18.0d0 * (x * (y * z))
    t_2 = 27.0d0 * (j * k)
    t_3 = (b * c) - (t_2 + (4.0d0 * (x * i)))
    t_4 = (t * (t_1 + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
    if (t <= (-2.3d+155)) then
        tmp = t_4
    else if (t <= (-1.7d+74)) then
        tmp = t_3
    else if (t <= (-4.4d-32)) then
        tmp = (t * (t_1 - (a * 4.0d0))) - t_2
    else if (t <= 2d+162) then
        tmp = t_3
    else
        tmp = t_4
    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 = 18.0 * (x * (y * z));
	double t_2 = 27.0 * (j * k);
	double t_3 = (b * c) - (t_2 + (4.0 * (x * i)));
	double t_4 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
	double tmp;
	if (t <= -2.3e+155) {
		tmp = t_4;
	} else if (t <= -1.7e+74) {
		tmp = t_3;
	} else if (t <= -4.4e-32) {
		tmp = (t * (t_1 - (a * 4.0))) - t_2;
	} else if (t <= 2e+162) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	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 = 18.0 * (x * (y * z))
	t_2 = 27.0 * (j * k)
	t_3 = (b * c) - (t_2 + (4.0 * (x * i)))
	t_4 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0))
	tmp = 0
	if t <= -2.3e+155:
		tmp = t_4
	elif t <= -1.7e+74:
		tmp = t_3
	elif t <= -4.4e-32:
		tmp = (t * (t_1 - (a * 4.0))) - t_2
	elif t <= 2e+162:
		tmp = t_3
	else:
		tmp = t_4
	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(18.0 * Float64(x * Float64(y * z)))
	t_2 = Float64(27.0 * Float64(j * k))
	t_3 = Float64(Float64(b * c) - Float64(t_2 + Float64(4.0 * Float64(x * i))))
	t_4 = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0)))
	tmp = 0.0
	if (t <= -2.3e+155)
		tmp = t_4;
	elseif (t <= -1.7e+74)
		tmp = t_3;
	elseif (t <= -4.4e-32)
		tmp = Float64(Float64(t * Float64(t_1 - Float64(a * 4.0))) - t_2);
	elseif (t <= 2e+162)
		tmp = t_3;
	else
		tmp = t_4;
	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 = 18.0 * (x * (y * z));
	t_2 = 27.0 * (j * k);
	t_3 = (b * c) - (t_2 + (4.0 * (x * i)));
	t_4 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
	tmp = 0.0;
	if (t <= -2.3e+155)
		tmp = t_4;
	elseif (t <= -1.7e+74)
		tmp = t_3;
	elseif (t <= -4.4e-32)
		tmp = (t * (t_1 - (a * 4.0))) - t_2;
	elseif (t <= 2e+162)
		tmp = t_3;
	else
		tmp = t_4;
	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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(t$95$2 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+155], t$95$4, If[LessEqual[t, -1.7e+74], t$95$3, If[LessEqual[t, -4.4e-32], N[(N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 2e+162], t$95$3, t$95$4]]]]]]]]
\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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 27 \cdot \left(j \cdot k\right)\\
t_3 := b \cdot c - \left(t\_2 + 4 \cdot \left(x \cdot i\right)\right)\\
t_4 := t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+155}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t \leq -1.7 \cdot 10^{+74}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-32}:\\
\;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right) - t\_2\\

\mathbf{elif}\;t \leq 2 \cdot 10^{+162}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.29999999999999998e155 or 1.9999999999999999e162 < t

    1. Initial program 81.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. Simplified87.4%

      \[\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 t around inf 91.3%

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

    if -2.29999999999999998e155 < t < -1.7e74 or -4.4e-32 < t < 1.9999999999999999e162

    1. Initial program 93.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. Simplified90.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 0 82.3%

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

    if -1.7e74 < t < -4.4e-32

    1. Initial program 89.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. Simplified89.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 i around 0 87.9%

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

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

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

Alternative 10: 66.6% 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}\;b \cdot c \leq -2 \cdot 10^{+210}:\\ \;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;b \cdot c \leq 10^{+278}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - x \cdot \left(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
 (if (<= (* b c) -2e+210)
   (- (+ (* b c) (* (* t a) -4.0)) (* 27.0 (* j k)))
   (if (<= (* b c) 2e+66)
     (- (* -4.0 (+ (* t a) (* x i))) (* (* j 27.0) k))
     (if (<= (* b c) 1e+278)
       (+ (* j (* k -27.0)) (* 18.0 (* z (* y (* x t)))))
       (- (* b c) (* x (* 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 tmp;
	if ((b * c) <= -2e+210) {
		tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
	} else if ((b * c) <= 2e+66) {
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	} else if ((b * c) <= 1e+278) {
		tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
	} else {
		tmp = (b * c) - (x * (4.0 * i));
	}
	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) <= (-2d+210)) then
        tmp = ((b * c) + ((t * a) * (-4.0d0))) - (27.0d0 * (j * k))
    else if ((b * c) <= 2d+66) then
        tmp = ((-4.0d0) * ((t * a) + (x * i))) - ((j * 27.0d0) * k)
    else if ((b * c) <= 1d+278) then
        tmp = (j * (k * (-27.0d0))) + (18.0d0 * (z * (y * (x * t))))
    else
        tmp = (b * c) - (x * (4.0d0 * i))
    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) <= -2e+210) {
		tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
	} else if ((b * c) <= 2e+66) {
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	} else if ((b * c) <= 1e+278) {
		tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
	} else {
		tmp = (b * c) - (x * (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):
	tmp = 0
	if (b * c) <= -2e+210:
		tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k))
	elif (b * c) <= 2e+66:
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k)
	elif (b * c) <= 1e+278:
		tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))))
	else:
		tmp = (b * c) - (x * (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)
	tmp = 0.0
	if (Float64(b * c) <= -2e+210)
		tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(27.0 * Float64(j * k)));
	elseif (Float64(b * c) <= 2e+66)
		tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - Float64(Float64(j * 27.0) * k));
	elseif (Float64(b * c) <= 1e+278)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(z * Float64(y * Float64(x * t)))));
	else
		tmp = Float64(Float64(b * c) - Float64(x * 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)
	tmp = 0.0;
	if ((b * c) <= -2e+210)
		tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
	elseif ((b * c) <= 2e+66)
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	elseif ((b * c) <= 1e+278)
		tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
	else
		tmp = (b * c) - (x * (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_] := If[LessEqual[N[(b * c), $MachinePrecision], -2e+210], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+66], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+278], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(x * 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}
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+210}:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -1.99999999999999985e210

    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. Simplified79.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 x around 0 79.6%

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

    if -1.99999999999999985e210 < (*.f64 b c) < 1.99999999999999989e66

    1. Initial program 92.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 x around 0 82.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    5. Step-by-step derivation
      1. mul-1-neg77.3%

        \[\leadsto \color{blue}{\left(-\left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      2. distribute-lft-out77.3%

        \[\leadsto \left(-\color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      3. distribute-lft-neg-in77.3%

        \[\leadsto \color{blue}{\left(-4\right) \cdot \left(a \cdot t + i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      4. metadata-eval77.3%

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

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

    if 1.99999999999999989e66 < (*.f64 b c) < 9.99999999999999964e277

    1. Initial program 86.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. Simplified90.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 y around inf 60.2%

      \[\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. pow160.2%

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

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

      \[\leadsto 18 \cdot \color{blue}{{\left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)}^{1}} + j \cdot \left(k \cdot -27\right) \]
    7. Step-by-step derivation
      1. unpow160.2%

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

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

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

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

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

    if 9.99999999999999964e277 < (*.f64 b c)

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

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

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

      \[\leadsto b \cdot c - \color{blue}{4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. associate-*r*100.0%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
      2. *-commutative100.0%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified100.0%

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

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

Alternative 11: 66.6% 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}\;b \cdot c \leq -5 \cdot 10^{+199}:\\ \;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;b \cdot c \leq 10^{+278}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - x \cdot \left(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
 (if (<= (* b c) -5e+199)
   (- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
   (if (<= (* b c) 2e+66)
     (- (* -4.0 (+ (* t a) (* x i))) (* (* j 27.0) k))
     (if (<= (* b c) 1e+278)
       (+ (* j (* k -27.0)) (* 18.0 (* z (* y (* x t)))))
       (- (* b c) (* x (* 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 tmp;
	if ((b * c) <= -5e+199) {
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
	} else if ((b * c) <= 2e+66) {
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	} else if ((b * c) <= 1e+278) {
		tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
	} else {
		tmp = (b * c) - (x * (4.0 * i));
	}
	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+199)) then
        tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
    else if ((b * c) <= 2d+66) then
        tmp = ((-4.0d0) * ((t * a) + (x * i))) - ((j * 27.0d0) * k)
    else if ((b * c) <= 1d+278) then
        tmp = (j * (k * (-27.0d0))) + (18.0d0 * (z * (y * (x * t))))
    else
        tmp = (b * c) - (x * (4.0d0 * i))
    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+199) {
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
	} else if ((b * c) <= 2e+66) {
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	} else if ((b * c) <= 1e+278) {
		tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
	} else {
		tmp = (b * c) - (x * (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):
	tmp = 0
	if (b * c) <= -5e+199:
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)))
	elif (b * c) <= 2e+66:
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k)
	elif (b * c) <= 1e+278:
		tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))))
	else:
		tmp = (b * c) - (x * (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)
	tmp = 0.0
	if (Float64(b * c) <= -5e+199)
		tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i))));
	elseif (Float64(b * c) <= 2e+66)
		tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - Float64(Float64(j * 27.0) * k));
	elseif (Float64(b * c) <= 1e+278)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(z * Float64(y * Float64(x * t)))));
	else
		tmp = Float64(Float64(b * c) - Float64(x * 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)
	tmp = 0.0;
	if ((b * c) <= -5e+199)
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
	elseif ((b * c) <= 2e+66)
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	elseif ((b * c) <= 1e+278)
		tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
	else
		tmp = (b * c) - (x * (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_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+199], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+66], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+278], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(x * 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}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+199}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\

\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -4.9999999999999998e199

    1. Initial program 83.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. Simplified80.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 0 76.8%

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

    if -4.9999999999999998e199 < (*.f64 b c) < 1.99999999999999989e66

    1. Initial program 92.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 x around 0 82.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    5. Step-by-step derivation
      1. mul-1-neg77.2%

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

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

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

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

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

    if 1.99999999999999989e66 < (*.f64 b c) < 9.99999999999999964e277

    1. Initial program 86.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. Simplified90.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 y around inf 60.2%

      \[\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. pow160.2%

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

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

      \[\leadsto 18 \cdot \color{blue}{{\left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)}^{1}} + j \cdot \left(k \cdot -27\right) \]
    7. Step-by-step derivation
      1. unpow160.2%

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

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

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

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

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

    if 9.99999999999999964e277 < (*.f64 b c)

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

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

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

      \[\leadsto b \cdot c - \color{blue}{4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. associate-*r*100.0%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
      2. *-commutative100.0%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified100.0%

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

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

Alternative 12: 66.1% 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} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+210}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;b \cdot c \leq 10^{+278}:\\ \;\;\;\;t\_1 + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - x \cdot \left(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 (* j (* k -27.0))))
   (if (<= (* b c) -2e+210)
     (+ (* b c) t_1)
     (if (<= (* b c) 2e+66)
       (- (* -4.0 (+ (* t a) (* x i))) (* (* j 27.0) k))
       (if (<= (* b c) 1e+278)
         (+ t_1 (* 18.0 (* z (* y (* x t)))))
         (- (* b c) (* x (* 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 = j * (k * -27.0);
	double tmp;
	if ((b * c) <= -2e+210) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= 2e+66) {
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	} else if ((b * c) <= 1e+278) {
		tmp = t_1 + (18.0 * (z * (y * (x * t))));
	} else {
		tmp = (b * c) - (x * (4.0 * i));
	}
	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 * (k * (-27.0d0))
    if ((b * c) <= (-2d+210)) then
        tmp = (b * c) + t_1
    else if ((b * c) <= 2d+66) then
        tmp = ((-4.0d0) * ((t * a) + (x * i))) - ((j * 27.0d0) * k)
    else if ((b * c) <= 1d+278) then
        tmp = t_1 + (18.0d0 * (z * (y * (x * t))))
    else
        tmp = (b * c) - (x * (4.0d0 * i))
    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 tmp;
	if ((b * c) <= -2e+210) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= 2e+66) {
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	} else if ((b * c) <= 1e+278) {
		tmp = t_1 + (18.0 * (z * (y * (x * t))));
	} else {
		tmp = (b * c) - (x * (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 = j * (k * -27.0)
	tmp = 0
	if (b * c) <= -2e+210:
		tmp = (b * c) + t_1
	elif (b * c) <= 2e+66:
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k)
	elif (b * c) <= 1e+278:
		tmp = t_1 + (18.0 * (z * (y * (x * t))))
	else:
		tmp = (b * c) - (x * (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(j * Float64(k * -27.0))
	tmp = 0.0
	if (Float64(b * c) <= -2e+210)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (Float64(b * c) <= 2e+66)
		tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - Float64(Float64(j * 27.0) * k));
	elseif (Float64(b * c) <= 1e+278)
		tmp = Float64(t_1 + Float64(18.0 * Float64(z * Float64(y * Float64(x * t)))));
	else
		tmp = Float64(Float64(b * c) - Float64(x * 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 = j * (k * -27.0);
	tmp = 0.0;
	if ((b * c) <= -2e+210)
		tmp = (b * c) + t_1;
	elseif ((b * c) <= 2e+66)
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	elseif ((b * c) <= 1e+278)
		tmp = t_1 + (18.0 * (z * (y * (x * t))));
	else
		tmp = (b * c) - (x * (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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+210], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+66], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+278], N[(t$95$1 + N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(x * 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 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+210}:\\
\;\;\;\;b \cdot c + t\_1\\

\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\

\mathbf{elif}\;b \cdot c \leq 10^{+278}:\\
\;\;\;\;t\_1 + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -1.99999999999999985e210

    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. Simplified79.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 72.9%

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

    if -1.99999999999999985e210 < (*.f64 b c) < 1.99999999999999989e66

    1. Initial program 92.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 x around 0 82.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    5. Step-by-step derivation
      1. mul-1-neg77.3%

        \[\leadsto \color{blue}{\left(-\left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      2. distribute-lft-out77.3%

        \[\leadsto \left(-\color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      3. distribute-lft-neg-in77.3%

        \[\leadsto \color{blue}{\left(-4\right) \cdot \left(a \cdot t + i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      4. metadata-eval77.3%

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

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

    if 1.99999999999999989e66 < (*.f64 b c) < 9.99999999999999964e277

    1. Initial program 86.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. Simplified90.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 y around inf 60.2%

      \[\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. pow160.2%

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

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

      \[\leadsto 18 \cdot \color{blue}{{\left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)}^{1}} + j \cdot \left(k \cdot -27\right) \]
    7. Step-by-step derivation
      1. unpow160.2%

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

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

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

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

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

    if 9.99999999999999964e277 < (*.f64 b c)

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

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

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

      \[\leadsto b \cdot c - \color{blue}{4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. associate-*r*100.0%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
      2. *-commutative100.0%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified100.0%

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

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

Alternative 13: 83.0% accurate, 1.0× 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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{-34}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+162}:\\ \;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\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 (* 18.0 (* x (* y z)))))
   (if (<= t -6.2e-34)
     (- (+ (* b c) (* t (- t_1 (* a 4.0)))) (* 27.0 (* j k)))
     (if (<= t 3.4e+162)
       (- (- (- (* b c) (* 4.0 (* t a))) (* (* x 4.0) i)) (* (* j 27.0) k))
       (+ (* t (+ t_1 (* a -4.0))) (* j (* k -27.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 t_1 = 18.0 * (x * (y * z));
	double tmp;
	if (t <= -6.2e-34) {
		tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
	} else if (t <= 3.4e+162) {
		tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	} else {
		tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.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) :: t_1
    real(8) :: tmp
    t_1 = 18.0d0 * (x * (y * z))
    if (t <= (-6.2d-34)) then
        tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - (27.0d0 * (j * k))
    else if (t <= 3.4d+162) then
        tmp = (((b * c) - (4.0d0 * (t * a))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
    else
        tmp = (t * (t_1 + (a * (-4.0d0)))) + (j * (k * (-27.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 t_1 = 18.0 * (x * (y * z));
	double tmp;
	if (t <= -6.2e-34) {
		tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
	} else if (t <= 3.4e+162) {
		tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	} else {
		tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.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):
	t_1 = 18.0 * (x * (y * z))
	tmp = 0
	if t <= -6.2e-34:
		tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k))
	elif t <= 3.4e+162:
		tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k)
	else:
		tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.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)
	t_1 = Float64(18.0 * Float64(x * Float64(y * z)))
	tmp = 0.0
	if (t <= -6.2e-34)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k)));
	elseif (t <= 3.4e+162)
		tmp = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k));
	else
		tmp = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(k * -27.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)
	t_1 = 18.0 * (x * (y * z));
	tmp = 0.0;
	if (t <= -6.2e-34)
		tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
	elseif (t <= 3.4e+162)
		tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	else
		tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.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_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-34], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+162], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.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}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{-34}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{+162}:\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.1999999999999996e-34

    1. Initial program 88.6%

      \[\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.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 i around 0 86.6%

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

    if -6.1999999999999996e-34 < t < 3.40000000000000003e162

    1. Initial program 92.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 x around 0 91.1%

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

    if 3.40000000000000003e162 < t

    1. Initial program 83.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 t around inf 90.6%

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} + j \cdot \left(k \cdot -27\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.8%

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

Alternative 14: 32.2% 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 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;j \leq -1.1 \cdot 10^{+81}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -1.7 \cdot 10^{-25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -6.8 \cdot 10^{-146}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 5 \cdot 10^{-80}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \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 (* -4.0 (* x i))))
   (if (<= j -1.1e+81)
     (* j (* k -27.0))
     (if (<= j -1.7e-25)
       t_1
       (if (<= j -6.8e-146)
         (* b c)
         (if (<= j 5e-80) t_1 (* (* j k) -27.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 t_1 = -4.0 * (x * i);
	double tmp;
	if (j <= -1.1e+81) {
		tmp = j * (k * -27.0);
	} else if (j <= -1.7e-25) {
		tmp = t_1;
	} else if (j <= -6.8e-146) {
		tmp = b * c;
	} else if (j <= 5e-80) {
		tmp = t_1;
	} else {
		tmp = (j * k) * -27.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) :: t_1
    real(8) :: tmp
    t_1 = (-4.0d0) * (x * i)
    if (j <= (-1.1d+81)) then
        tmp = j * (k * (-27.0d0))
    else if (j <= (-1.7d-25)) then
        tmp = t_1
    else if (j <= (-6.8d-146)) then
        tmp = b * c
    else if (j <= 5d-80) then
        tmp = t_1
    else
        tmp = (j * k) * (-27.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 t_1 = -4.0 * (x * i);
	double tmp;
	if (j <= -1.1e+81) {
		tmp = j * (k * -27.0);
	} else if (j <= -1.7e-25) {
		tmp = t_1;
	} else if (j <= -6.8e-146) {
		tmp = b * c;
	} else if (j <= 5e-80) {
		tmp = t_1;
	} else {
		tmp = (j * k) * -27.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):
	t_1 = -4.0 * (x * i)
	tmp = 0
	if j <= -1.1e+81:
		tmp = j * (k * -27.0)
	elif j <= -1.7e-25:
		tmp = t_1
	elif j <= -6.8e-146:
		tmp = b * c
	elif j <= 5e-80:
		tmp = t_1
	else:
		tmp = (j * k) * -27.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)
	t_1 = Float64(-4.0 * Float64(x * i))
	tmp = 0.0
	if (j <= -1.1e+81)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (j <= -1.7e-25)
		tmp = t_1;
	elseif (j <= -6.8e-146)
		tmp = Float64(b * c);
	elseif (j <= 5e-80)
		tmp = t_1;
	else
		tmp = Float64(Float64(j * k) * -27.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)
	t_1 = -4.0 * (x * i);
	tmp = 0.0;
	if (j <= -1.1e+81)
		tmp = j * (k * -27.0);
	elseif (j <= -1.7e-25)
		tmp = t_1;
	elseif (j <= -6.8e-146)
		tmp = b * c;
	elseif (j <= 5e-80)
		tmp = t_1;
	else
		tmp = (j * k) * -27.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_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.1e+81], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.7e-25], t$95$1, If[LessEqual[j, -6.8e-146], N[(b * c), $MachinePrecision], If[LessEqual[j, 5e-80], t$95$1, N[(N[(j * k), $MachinePrecision] * -27.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}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;j \leq -1.1 \cdot 10^{+81}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;j \leq -1.7 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq -6.8 \cdot 10^{-146}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;j \leq 5 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -1.09999999999999993e81

    1. Initial program 92.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. Simplified94.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. Step-by-step derivation
      1. pow194.2%

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

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

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

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

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

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

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

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*92.4%

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

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in j around inf 46.5%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative46.5%

        \[\leadsto \color{blue}{\left(j \cdot k\right) \cdot -27} \]
      2. associate-*r*46.6%

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
    10. Simplified46.6%

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

    if -1.09999999999999993e81 < j < -1.70000000000000001e-25 or -6.8000000000000001e-146 < j < 5e-80

    1. Initial program 88.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. Simplified87.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. Step-by-step derivation
      1. pow187.1%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative91.0%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow191.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative91.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative91.0%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*91.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified91.0%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in i around inf 32.1%

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

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

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

    if -1.70000000000000001e-25 < j < -6.8000000000000001e-146

    1. Initial program 93.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. Simplified93.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. Step-by-step derivation
      1. pow193.3%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative93.3%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow193.3%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative93.3%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative93.3%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*93.3%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified93.3%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in b around inf 33.6%

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

    if 5e-80 < j

    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.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 j around inf 31.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.1 \cdot 10^{+81}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -1.7 \cdot 10^{-25}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq -6.8 \cdot 10^{-146}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 5 \cdot 10^{-80}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 32.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 := -4 \cdot \left(x \cdot i\right)\\ t_2 := \left(j \cdot k\right) \cdot -27\\ \mathbf{if}\;j \leq -1.7 \cdot 10^{+81}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;j \leq -1.42 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq -1.85 \cdot 10^{-156}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 2.35 \cdot 10^{-80}:\\ \;\;\;\;t\_1\\ \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 (* -4.0 (* x i))) (t_2 (* (* j k) -27.0)))
   (if (<= j -1.7e+81)
     t_2
     (if (<= j -1.42e-24)
       t_1
       (if (<= j -1.85e-156) (* b c) (if (<= j 2.35e-80) t_1 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 = -4.0 * (x * i);
	double t_2 = (j * k) * -27.0;
	double tmp;
	if (j <= -1.7e+81) {
		tmp = t_2;
	} else if (j <= -1.42e-24) {
		tmp = t_1;
	} else if (j <= -1.85e-156) {
		tmp = b * c;
	} else if (j <= 2.35e-80) {
		tmp = t_1;
	} 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 = (-4.0d0) * (x * i)
    t_2 = (j * k) * (-27.0d0)
    if (j <= (-1.7d+81)) then
        tmp = t_2
    else if (j <= (-1.42d-24)) then
        tmp = t_1
    else if (j <= (-1.85d-156)) then
        tmp = b * c
    else if (j <= 2.35d-80) then
        tmp = t_1
    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 = -4.0 * (x * i);
	double t_2 = (j * k) * -27.0;
	double tmp;
	if (j <= -1.7e+81) {
		tmp = t_2;
	} else if (j <= -1.42e-24) {
		tmp = t_1;
	} else if (j <= -1.85e-156) {
		tmp = b * c;
	} else if (j <= 2.35e-80) {
		tmp = t_1;
	} 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 = -4.0 * (x * i)
	t_2 = (j * k) * -27.0
	tmp = 0
	if j <= -1.7e+81:
		tmp = t_2
	elif j <= -1.42e-24:
		tmp = t_1
	elif j <= -1.85e-156:
		tmp = b * c
	elif j <= 2.35e-80:
		tmp = t_1
	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(-4.0 * Float64(x * i))
	t_2 = Float64(Float64(j * k) * -27.0)
	tmp = 0.0
	if (j <= -1.7e+81)
		tmp = t_2;
	elseif (j <= -1.42e-24)
		tmp = t_1;
	elseif (j <= -1.85e-156)
		tmp = Float64(b * c);
	elseif (j <= 2.35e-80)
		tmp = t_1;
	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 = -4.0 * (x * i);
	t_2 = (j * k) * -27.0;
	tmp = 0.0;
	if (j <= -1.7e+81)
		tmp = t_2;
	elseif (j <= -1.42e-24)
		tmp = t_1;
	elseif (j <= -1.85e-156)
		tmp = b * c;
	elseif (j <= 2.35e-80)
		tmp = t_1;
	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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, If[LessEqual[j, -1.7e+81], t$95$2, If[LessEqual[j, -1.42e-24], t$95$1, If[LessEqual[j, -1.85e-156], N[(b * c), $MachinePrecision], If[LessEqual[j, 2.35e-80], t$95$1, 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 := -4 \cdot \left(x \cdot i\right)\\
t_2 := \left(j \cdot k\right) \cdot -27\\
\mathbf{if}\;j \leq -1.7 \cdot 10^{+81}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;j \leq -1.42 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq -1.85 \cdot 10^{-156}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;j \leq 2.35 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -1.70000000000000001e81 or 2.34999999999999986e-80 < j

    1. Initial program 90.6%

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

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

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

    if -1.70000000000000001e81 < j < -1.42e-24 or -1.85e-156 < j < 2.34999999999999986e-80

    1. Initial program 88.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. Simplified87.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. Step-by-step derivation
      1. pow187.9%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative90.9%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow190.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative90.9%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative90.9%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*90.9%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified90.9%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in i around inf 32.4%

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

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

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

    if -1.42e-24 < j < -1.85e-156

    1. Initial program 93.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.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. Step-by-step derivation
      1. pow190.1%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative93.5%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow193.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative93.5%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative93.5%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*93.5%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified93.5%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in b around inf 35.9%

      \[\leadsto \color{blue}{b \cdot c} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification35.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.7 \cdot 10^{+81}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;j \leq -1.42 \cdot 10^{-24}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq -1.85 \cdot 10^{-156}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 2.35 \cdot 10^{-80}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 48.6% 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 := 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{if}\;x \leq -1.6 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.42 \cdot 10^{+45}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq 6.9 \cdot 10^{+46}:\\ \;\;\;\;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 (* 18.0 (* z (* y (* x t))))))
   (if (<= x -1.6e+104)
     t_1
     (if (<= x -1.42e+45)
       (* -4.0 (* x i))
       (if (<= x 6.9e+46) (+ (* 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 = 18.0 * (z * (y * (x * t)));
	double tmp;
	if (x <= -1.6e+104) {
		tmp = t_1;
	} else if (x <= -1.42e+45) {
		tmp = -4.0 * (x * i);
	} else if (x <= 6.9e+46) {
		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 = 18.0d0 * (z * (y * (x * t)))
    if (x <= (-1.6d+104)) then
        tmp = t_1
    else if (x <= (-1.42d+45)) then
        tmp = (-4.0d0) * (x * i)
    else if (x <= 6.9d+46) 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 = 18.0 * (z * (y * (x * t)));
	double tmp;
	if (x <= -1.6e+104) {
		tmp = t_1;
	} else if (x <= -1.42e+45) {
		tmp = -4.0 * (x * i);
	} else if (x <= 6.9e+46) {
		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 = 18.0 * (z * (y * (x * t)))
	tmp = 0
	if x <= -1.6e+104:
		tmp = t_1
	elif x <= -1.42e+45:
		tmp = -4.0 * (x * i)
	elif x <= 6.9e+46:
		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(18.0 * Float64(z * Float64(y * Float64(x * t))))
	tmp = 0.0
	if (x <= -1.6e+104)
		tmp = t_1;
	elseif (x <= -1.42e+45)
		tmp = Float64(-4.0 * Float64(x * i));
	elseif (x <= 6.9e+46)
		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 = 18.0 * (z * (y * (x * t)));
	tmp = 0.0;
	if (x <= -1.6e+104)
		tmp = t_1;
	elseif (x <= -1.42e+45)
		tmp = -4.0 * (x * i);
	elseif (x <= 6.9e+46)
		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[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e+104], t$95$1, If[LessEqual[x, -1.42e+45], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.9e+46], 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 := 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 6.9 \cdot 10^{+46}:\\
\;\;\;\;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 < -1.6e104 or 6.90000000000000018e46 < x

    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. pow184.1%

        \[\leadsto \left(\left(\left(\color{blue}{{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)}^{1}} - \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. associate-*r*85.2%

        \[\leadsto \left(\left(\left({\left(\color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)} \cdot t\right)}^{1} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative85.2%

        \[\leadsto \left(\left(\left({\color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right)}}^{1} - \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 \]
      4. associate-*r*84.1%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}\right)}^{1} - \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 \]
      5. *-commutative84.1%

        \[\leadsto \left(\left(\left({\left(t \cdot \color{blue}{\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right)}\right)}^{1} - \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 \]
      6. *-commutative84.1%

        \[\leadsto \left(\left(\left({\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right)\right)}^{1} - \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 \]
    4. Applied egg-rr84.1%

      \[\leadsto \left(\left(\left(\color{blue}{{\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)\right)}^{1}} - \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 \]
    5. Step-by-step derivation
      1. unpow184.1%

        \[\leadsto \left(\left(\left(\color{blue}{t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)} - \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. associate-*r*83.0%

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

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

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\right) - \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 \]
      5. associate-*r*83.0%

        \[\leadsto \left(\left(\left(\left(t \cdot z\right) \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    6. Simplified83.0%

      \[\leadsto \left(\left(\left(\color{blue}{\left(t \cdot z\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)} - \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 \]
    7. Taylor expanded in x around inf 68.5%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv68.5%

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(-4\right) \cdot i\right)} \]
      2. associate-*r*67.4%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(-4\right) \cdot i\right) \]
      3. metadata-eval67.4%

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

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

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(\left(\left(t \cdot x\right) \cdot y\right) \cdot z\right)} \]
    12. Simplified49.3%

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

    if -1.6e104 < x < -1.42e45

    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. Simplified99.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. Step-by-step derivation
      1. pow199.9%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative93.9%

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

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

      \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. unpow193.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative93.9%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative93.9%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*93.9%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified93.9%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in i around inf 58.8%

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

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

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

    if -1.42e45 < x < 6.90000000000000018e46

    1. Initial program 93.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. Simplified90.4%

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

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

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

Alternative 17: 50.9% 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}\;j \leq -3.6 \cdot 10^{+57} \lor \neg \left(j \leq 1.55 \cdot 10^{-79}\right):\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - x \cdot \left(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
 (if (or (<= j -3.6e+57) (not (<= j 1.55e-79)))
   (+ (* b c) (* j (* k -27.0)))
   (- (* b c) (* x (* 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 tmp;
	if ((j <= -3.6e+57) || !(j <= 1.55e-79)) {
		tmp = (b * c) + (j * (k * -27.0));
	} else {
		tmp = (b * c) - (x * (4.0 * i));
	}
	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 ((j <= (-3.6d+57)) .or. (.not. (j <= 1.55d-79))) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else
        tmp = (b * c) - (x * (4.0d0 * i))
    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 ((j <= -3.6e+57) || !(j <= 1.55e-79)) {
		tmp = (b * c) + (j * (k * -27.0));
	} else {
		tmp = (b * c) - (x * (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):
	tmp = 0
	if (j <= -3.6e+57) or not (j <= 1.55e-79):
		tmp = (b * c) + (j * (k * -27.0))
	else:
		tmp = (b * c) - (x * (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)
	tmp = 0.0
	if ((j <= -3.6e+57) || !(j <= 1.55e-79))
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	else
		tmp = Float64(Float64(b * c) - Float64(x * 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)
	tmp = 0.0;
	if ((j <= -3.6e+57) || ~((j <= 1.55e-79)))
		tmp = (b * c) + (j * (k * -27.0));
	else
		tmp = (b * c) - (x * (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_] := If[Or[LessEqual[j, -3.6e+57], N[Not[LessEqual[j, 1.55e-79]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(x * 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}
\mathbf{if}\;j \leq -3.6 \cdot 10^{+57} \lor \neg \left(j \leq 1.55 \cdot 10^{-79}\right):\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -3.6000000000000002e57 or 1.55e-79 < j

    1. Initial program 89.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. Simplified90.6%

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

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

    if -3.6000000000000002e57 < j < 1.55e-79

    1. Initial program 90.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. Simplified89.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 0 55.5%

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

      \[\leadsto b \cdot c - \color{blue}{4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. associate-*r*48.9%

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

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

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

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

Alternative 18: 36.2% 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 -5.8 \cdot 10^{+199} \lor \neg \left(b \cdot c \leq 1.06 \cdot 10^{+37}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \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) -5.8e+199) (not (<= (* b c) 1.06e+37)))
   (* b c)
   (* (* j k) -27.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) <= -5.8e+199) || !((b * c) <= 1.06e+37)) {
		tmp = b * c;
	} else {
		tmp = (j * k) * -27.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) <= (-5.8d+199)) .or. (.not. ((b * c) <= 1.06d+37))) then
        tmp = b * c
    else
        tmp = (j * k) * (-27.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) <= -5.8e+199) || !((b * c) <= 1.06e+37)) {
		tmp = b * c;
	} else {
		tmp = (j * k) * -27.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) <= -5.8e+199) or not ((b * c) <= 1.06e+37):
		tmp = b * c
	else:
		tmp = (j * k) * -27.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) <= -5.8e+199) || !(Float64(b * c) <= 1.06e+37))
		tmp = Float64(b * c);
	else
		tmp = Float64(Float64(j * k) * -27.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) <= -5.8e+199) || ~(((b * c) <= 1.06e+37)))
		tmp = b * c;
	else
		tmp = (j * k) * -27.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], -5.8e+199], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.06e+37]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.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 -5.8 \cdot 10^{+199} \lor \neg \left(b \cdot c \leq 1.06 \cdot 10^{+37}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -5.7999999999999998e199 or 1.06e37 < (*.f64 b c)

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

      \[\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. Step-by-step derivation
      1. pow185.7%

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

        \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative88.1%

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

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
      2. *-commutative88.1%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative88.1%

        \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
      4. associate-*r*88.1%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
    7. Simplified88.1%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
    8. Taylor expanded in b around inf 55.8%

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

    if -5.7999999999999998e199 < (*.f64 b c) < 1.06e37

    1. Initial program 91.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. Simplified92.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 30.4%

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

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

Alternative 19: 23.3% 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 90.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.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. Step-by-step derivation
    1. pow190.0%

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

      \[\leadsto \left(t \cdot \left({\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)}}^{1} - 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. *-commutative91.5%

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

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

    \[\leadsto \left(t \cdot \left(\color{blue}{{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right)}^{1}} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
  6. Step-by-step derivation
    1. unpow191.5%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(y \cdot \left(x \cdot 18\right)\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) \]
    2. *-commutative91.5%

      \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot y\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. *-commutative91.5%

      \[\leadsto \left(t \cdot \left(z \cdot \left(\color{blue}{\left(18 \cdot x\right)} \cdot y\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) \]
    4. associate-*r*91.5%

      \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(18 \cdot \left(x \cdot y\right)\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) \]
  7. Simplified91.5%

    \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(18 \cdot \left(x \cdot y\right)\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) \]
  8. Taylor expanded in b around inf 22.3%

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

Developer target: 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 2024090 
(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
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

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