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

Percentage Accurate: 86.1% → 93.5%
Time: 21.0s
Alternatives: 18
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (-
  (-
   (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
   (* (* x 4.0) i))
  (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k):
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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: 86.1% 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: 93.5% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;t\_2 - \left(j \cdot 27\right) \cdot k\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.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)) < -inf.0 or 4.00000000000000021e301 < (-.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)) < +inf.0

    1. Initial program 79.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. Simplified82.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. Taylor expanded in j around 0 90.0%

      \[\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) - 4 \cdot \left(i \cdot x\right)} \]

    if -inf.0 < (-.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)) < 4.00000000000000021e301

    1. Initial program 99.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

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

    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. Simplified22.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 x around inf 64.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i \leq -\infty:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i \leq 4 \cdot 10^{+301}:\\ \;\;\;\;\left(\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i \leq \infty:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\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: 86.2% 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 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\ t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{if}\;x \leq -5.1 \cdot 10^{+219}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-301}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t\_1\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+224}:\\ \;\;\;\;\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + \left(b \cdot c - a \cdot \left(t \cdot 4\right)\right)\right) - 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 (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
        (t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
   (if (<= x -5.1e+219)
     t_2
     (if (<= x -1e-301)
       (- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) t_1)
       (if (<= x 3.3e+224)
         (- (+ (* (* x (* 18.0 y)) (* z t)) (- (* b c) (* a (* t 4.0)))) 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 = (x * (4.0 * i)) + (j * (27.0 * k));
	double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -5.1e+219) {
		tmp = t_2;
	} else if (x <= -1e-301) {
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	} else if (x <= 3.3e+224) {
		tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - 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 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
    t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    if (x <= (-5.1d+219)) then
        tmp = t_2
    else if (x <= (-1d-301)) then
        tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - t_1
    else if (x <= 3.3d+224) then
        tmp = (((x * (18.0d0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0d0)))) - 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 = (x * (4.0 * i)) + (j * (27.0 * k));
	double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -5.1e+219) {
		tmp = t_2;
	} else if (x <= -1e-301) {
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	} else if (x <= 3.3e+224) {
		tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - 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 = (x * (4.0 * i)) + (j * (27.0 * k))
	t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	tmp = 0
	if x <= -5.1e+219:
		tmp = t_2
	elif x <= -1e-301:
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1
	elif x <= 3.3e+224:
		tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - 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(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))
	t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))
	tmp = 0.0
	if (x <= -5.1e+219)
		tmp = t_2;
	elseif (x <= -1e-301)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - t_1);
	elseif (x <= 3.3e+224)
		tmp = Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) + Float64(Float64(b * c) - Float64(a * Float64(t * 4.0)))) - 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 = (x * (4.0 * i)) + (j * (27.0 * k));
	t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	tmp = 0.0;
	if (x <= -5.1e+219)
		tmp = t_2;
	elseif (x <= -1e-301)
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	elseif (x <= 3.3e+224)
		tmp = (((x * (18.0 * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - 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[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.1e+219], t$95$2, If[LessEqual[x, -1e-301], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 3.3e+224], N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -5.1 \cdot 10^{+219}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.09999999999999993e219 or 3.29999999999999996e224 < x

    1. Initial program 57.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. Simplified62.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 x around inf 90.1%

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

    if -5.09999999999999993e219 < x < -1.00000000000000007e-301

    1. Initial program 88.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified88.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

    if -1.00000000000000007e-301 < x < 3.29999999999999996e224

    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. Simplified85.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. associate-*r*88.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. distribute-rgt-out--86.7%

        \[\leadsto \left(\color{blue}{\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 \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-+l-86.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.1 \cdot 10^{+219}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-301}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+224}:\\ \;\;\;\;\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + \left(b \cdot c - a \cdot \left(t \cdot 4\right)\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 3: 87.6% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.09999999999999993e219 or 4.69999999999999991e226 < x

    1. Initial program 57.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. Simplified62.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 x around inf 90.1%

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

    if -5.09999999999999993e219 < x < 4.69999999999999991e226

    1. Initial program 87.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. Simplified87.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
  3. Recombined 2 regimes into one program.
  4. Final simplification87.6%

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

Alternative 4: 33.9% 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 -3.8 \cdot 10^{+266}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.9 \cdot 10^{+182}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq -1.4 \cdot 10^{-93}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(i \cdot -4\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
 (if (<= (* b c) -3.8e+266)
   (* b c)
   (if (<= (* b c) -1.9e+182)
     (* -27.0 (* j k))
     (if (<= (* b c) -1.4e-93)
       (* t (* a -4.0))
       (if (<= (* b c) 4.3e+74) (* x (* i -4.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 tmp;
	if ((b * c) <= -3.8e+266) {
		tmp = b * c;
	} else if ((b * c) <= -1.9e+182) {
		tmp = -27.0 * (j * k);
	} else if ((b * c) <= -1.4e-93) {
		tmp = t * (a * -4.0);
	} else if ((b * c) <= 4.3e+74) {
		tmp = x * (i * -4.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) :: tmp
    if ((b * c) <= (-3.8d+266)) then
        tmp = b * c
    else if ((b * c) <= (-1.9d+182)) then
        tmp = (-27.0d0) * (j * k)
    else if ((b * c) <= (-1.4d-93)) then
        tmp = t * (a * (-4.0d0))
    else if ((b * c) <= 4.3d+74) then
        tmp = x * (i * (-4.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 tmp;
	if ((b * c) <= -3.8e+266) {
		tmp = b * c;
	} else if ((b * c) <= -1.9e+182) {
		tmp = -27.0 * (j * k);
	} else if ((b * c) <= -1.4e-93) {
		tmp = t * (a * -4.0);
	} else if ((b * c) <= 4.3e+74) {
		tmp = x * (i * -4.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):
	tmp = 0
	if (b * c) <= -3.8e+266:
		tmp = b * c
	elif (b * c) <= -1.9e+182:
		tmp = -27.0 * (j * k)
	elif (b * c) <= -1.4e-93:
		tmp = t * (a * -4.0)
	elif (b * c) <= 4.3e+74:
		tmp = x * (i * -4.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)
	tmp = 0.0
	if (Float64(b * c) <= -3.8e+266)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -1.9e+182)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (Float64(b * c) <= -1.4e-93)
		tmp = Float64(t * Float64(a * -4.0));
	elseif (Float64(b * c) <= 4.3e+74)
		tmp = Float64(x * Float64(i * -4.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)
	tmp = 0.0;
	if ((b * c) <= -3.8e+266)
		tmp = b * c;
	elseif ((b * c) <= -1.9e+182)
		tmp = -27.0 * (j * k);
	elseif ((b * c) <= -1.4e-93)
		tmp = t * (a * -4.0);
	elseif ((b * c) <= 4.3e+74)
		tmp = x * (i * -4.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_] := If[LessEqual[N[(b * c), $MachinePrecision], -3.8e+266], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.9e+182], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.4e-93], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.3e+74], N[(x * N[(i * -4.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}
\mathbf{if}\;b \cdot c \leq -3.8 \cdot 10^{+266}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;b \cdot c \leq -1.4 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

\mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{+74}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -3.7999999999999997e266 or 4.30000000000000001e74 < (*.f64 b c)

    1. Initial program 79.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. Simplified76.5%

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

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

        \[\leadsto \left(\color{blue}{\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 \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-+l-79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999997e266 < (*.f64 b c) < -1.90000000000000006e182

    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. Simplified93.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 54.1%

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

    if -1.90000000000000006e182 < (*.f64 b c) < -1.39999999999999999e-93

    1. Initial program 81.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. Simplified83.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. Step-by-step derivation
      1. associate-*r*83.6%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. distribute-rgt-out--81.5%

        \[\leadsto \left(\color{blue}{\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 \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-+l-81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    9. Step-by-step derivation
      1. associate-*r*36.0%

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} \]
    10. Simplified36.0%

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

    if -1.39999999999999999e-93 < (*.f64 b c) < 4.30000000000000001e74

    1. Initial program 85.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified86.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 i around inf 54.0%

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

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

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

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

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in54.0%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in54.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} \]
      2. associate-*r*38.1%

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

        \[\leadsto \color{blue}{\left(x \cdot -4\right) \cdot i} \]
      4. associate-*l*38.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.8 \cdot 10^{+266}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.9 \cdot 10^{+182}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq -1.4 \cdot 10^{-93}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.39999999999999996e-47 or 4e-176 < t

    1. Initial program 83.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified85.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 j around 0 79.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) - 4 \cdot \left(i \cdot x\right)} \]

    if -1.39999999999999996e-47 < t < 4e-176

    1. Initial program 81.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 82.8%

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

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

Alternative 6: 79.0% 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 := 4 \cdot \left(x \cdot i\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t \leq -1 \cdot 10^{-50}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - t\_2\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-176}:\\ \;\;\;\;\left(b \cdot c - t\_1\right) - t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* 4.0 (* x i))) (t_2 (* (* j 27.0) k)))
   (if (<= t -1e-50)
     (- (+ (* b c) (* t (- (* 18.0 (* z (* x y))) (* a 4.0)))) t_2)
     (if (<= t 4e-176)
       (- (- (* b c) t_1) t_2)
       (- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = 4.0 * (x * i);
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t <= -1e-50) {
		tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - t_2;
	} else if (t <= 4e-176) {
		tmp = ((b * c) - t_1) - t_2;
	} else {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - 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) :: t_2
    real(8) :: tmp
    t_1 = 4.0d0 * (x * i)
    t_2 = (j * 27.0d0) * k
    if (t <= (-1d-50)) then
        tmp = ((b * c) + (t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0)))) - t_2
    else if (t <= 4d-176) then
        tmp = ((b * c) - t_1) - t_2
    else
        tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - 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 = 4.0 * (x * i);
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t <= -1e-50) {
		tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - t_2;
	} else if (t <= 4e-176) {
		tmp = ((b * c) - t_1) - t_2;
	} else {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - 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 = 4.0 * (x * i)
	t_2 = (j * 27.0) * k
	tmp = 0
	if t <= -1e-50:
		tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - t_2
	elif t <= 4e-176:
		tmp = ((b * c) - t_1) - t_2
	else:
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - 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(4.0 * Float64(x * i))
	t_2 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t <= -1e-50)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0)))) - t_2);
	elseif (t <= 4e-176)
		tmp = Float64(Float64(Float64(b * c) - t_1) - t_2);
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - 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 = 4.0 * (x * i);
	t_2 = (j * 27.0) * k;
	tmp = 0.0;
	if (t <= -1e-50)
		tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.0)))) - t_2;
	elseif (t <= 4e-176)
		tmp = ((b * c) - t_1) - t_2;
	else
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - 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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t, -1e-50], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 4e-176], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t \leq -1 \cdot 10^{-50}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - t\_2\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-176}:\\
\;\;\;\;\left(b \cdot c - t\_1\right) - t\_2\\

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


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

    1. Initial program 78.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in i around 0 71.5%

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

      \[\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)} - \left(j \cdot 27\right) \cdot k \]
    5. Step-by-step derivation
      1. pow173.0%

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

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

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

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

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

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

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

    if -1.00000000000000001e-50 < t < 4e-176

    1. Initial program 81.5%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 83.3%

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

    if 4e-176 < t

    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. Simplified88.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 j around 0 81.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) - 4 \cdot \left(i \cdot x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.1%

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

Alternative 7: 54.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 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+229}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.75 \cdot 10^{+22}:\\ \;\;\;\;t\_1 + \left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;b \cdot c \leq 7 \cdot 10^{+68}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= (* b c) -1.5e+229)
     (- (* b c) (* 4.0 (* x i)))
     (if (<= (* b c) -1.75e+22)
       (+ t_1 (* (* t a) -4.0))
       (if (<= (* b c) 7e+68) (+ (* i (* x -4.0)) t_1) (+ (* b c) t_1))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double tmp;
	if ((b * c) <= -1.5e+229) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if ((b * c) <= -1.75e+22) {
		tmp = t_1 + ((t * a) * -4.0);
	} else if ((b * c) <= 7e+68) {
		tmp = (i * (x * -4.0)) + t_1;
	} else {
		tmp = (b * c) + t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    if ((b * c) <= (-1.5d+229)) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if ((b * c) <= (-1.75d+22)) then
        tmp = t_1 + ((t * a) * (-4.0d0))
    else if ((b * c) <= 7d+68) then
        tmp = (i * (x * (-4.0d0))) + t_1
    else
        tmp = (b * c) + t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double tmp;
	if ((b * c) <= -1.5e+229) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if ((b * c) <= -1.75e+22) {
		tmp = t_1 + ((t * a) * -4.0);
	} else if ((b * c) <= 7e+68) {
		tmp = (i * (x * -4.0)) + t_1;
	} else {
		tmp = (b * c) + t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	tmp = 0
	if (b * c) <= -1.5e+229:
		tmp = (b * c) - (4.0 * (x * i))
	elif (b * c) <= -1.75e+22:
		tmp = t_1 + ((t * a) * -4.0)
	elif (b * c) <= 7e+68:
		tmp = (i * (x * -4.0)) + t_1
	else:
		tmp = (b * c) + 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(j * Float64(k * -27.0))
	tmp = 0.0
	if (Float64(b * c) <= -1.5e+229)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (Float64(b * c) <= -1.75e+22)
		tmp = Float64(t_1 + Float64(Float64(t * a) * -4.0));
	elseif (Float64(b * c) <= 7e+68)
		tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1);
	else
		tmp = Float64(Float64(b * c) + t_1);
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	tmp = 0.0;
	if ((b * c) <= -1.5e+229)
		tmp = (b * c) - (4.0 * (x * i));
	elseif ((b * c) <= -1.75e+22)
		tmp = t_1 + ((t * a) * -4.0);
	elseif ((b * c) <= 7e+68)
		tmp = (i * (x * -4.0)) + t_1;
	else
		tmp = (b * c) + 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.5e+229], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.75e+22], N[(t$95$1 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7e+68], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+229}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

\mathbf{elif}\;b \cdot c \leq -1.75 \cdot 10^{+22}:\\
\;\;\;\;t\_1 + \left(t \cdot a\right) \cdot -4\\

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

\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\


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

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

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

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

    if -1.49999999999999999e229 < (*.f64 b c) < -1.75e22

    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. Simplified92.7%

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

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

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

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

    if -1.75e22 < (*.f64 b c) < 6.99999999999999955e68

    1. Initial program 83.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. Simplified84.3%

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in51.1%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in51.1%

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

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

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

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

    if 6.99999999999999955e68 < (*.f64 b c)

    1. Initial program 80.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. Simplified82.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 b around inf 63.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+229}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.75 \cdot 10^{+22}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + \left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;b \cdot c \leq 7 \cdot 10^{+68}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 70.6% 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 := \left(j \cdot 27\right) \cdot k\\ t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{if}\;x \leq -1.1 \cdot 10^{+207}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-115}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\ \mathbf{elif}\;x \leq 10^{-27}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - 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 (* (* j 27.0) k))
        (t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
   (if (<= x -1.1e+207)
     t_2
     (if (<= x -4.8e-115)
       (- (- (* b c) (* 4.0 (* x i))) t_1)
       (if (<= x 1e-27) (- (- (* b c) (* 4.0 (* t a))) 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 = (j * 27.0) * k;
	double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -1.1e+207) {
		tmp = t_2;
	} else if (x <= -4.8e-115) {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	} else if (x <= 1e-27) {
		tmp = ((b * c) - (4.0 * (t * a))) - 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 = (j * 27.0d0) * k
    t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    if (x <= (-1.1d+207)) then
        tmp = t_2
    else if (x <= (-4.8d-115)) then
        tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
    else if (x <= 1d-27) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - 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 = (j * 27.0) * k;
	double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -1.1e+207) {
		tmp = t_2;
	} else if (x <= -4.8e-115) {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	} else if (x <= 1e-27) {
		tmp = ((b * c) - (4.0 * (t * a))) - 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 = (j * 27.0) * k
	t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	tmp = 0
	if x <= -1.1e+207:
		tmp = t_2
	elif x <= -4.8e-115:
		tmp = ((b * c) - (4.0 * (x * i))) - t_1
	elif x <= 1e-27:
		tmp = ((b * c) - (4.0 * (t * a))) - 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(Float64(j * 27.0) * k)
	t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))
	tmp = 0.0
	if (x <= -1.1e+207)
		tmp = t_2;
	elseif (x <= -4.8e-115)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1);
	elseif (x <= 1e-27)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - 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 = (j * 27.0) * k;
	t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	tmp = 0.0;
	if (x <= -1.1e+207)
		tmp = t_2;
	elseif (x <= -4.8e-115)
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	elseif (x <= 1e-27)
		tmp = ((b * c) - (4.0 * (t * a))) - 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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.1e+207], t$95$2, If[LessEqual[x, -4.8e-115], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 1e-27], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{+207}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.10000000000000004e207 or 1e-27 < x

    1. Initial program 72.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. Simplified78.3%

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

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

    if -1.10000000000000004e207 < x < -4.80000000000000042e-115

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

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

    if -4.80000000000000042e-115 < x < 1e-27

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

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

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

Alternative 9: 58.6% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{if}\;x \leq -9.6 \cdot 10^{+144}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.1 \cdot 10^{-102}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-31}:\\ \;\;\;\;b \cdot c + 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 (* j (* k -27.0)))
        (t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
   (if (<= x -9.6e+144)
     t_2
     (if (<= x -1.1e-102)
       (+ (* i (* x -4.0)) t_1)
       (if (<= x 9.5e-31) (+ (* b c) 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 = j * (k * -27.0);
	double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -9.6e+144) {
		tmp = t_2;
	} else if (x <= -1.1e-102) {
		tmp = (i * (x * -4.0)) + t_1;
	} else if (x <= 9.5e-31) {
		tmp = (b * c) + 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 = j * (k * (-27.0d0))
    t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    if (x <= (-9.6d+144)) then
        tmp = t_2
    else if (x <= (-1.1d-102)) then
        tmp = (i * (x * (-4.0d0))) + t_1
    else if (x <= 9.5d-31) then
        tmp = (b * c) + 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 = j * (k * -27.0);
	double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -9.6e+144) {
		tmp = t_2;
	} else if (x <= -1.1e-102) {
		tmp = (i * (x * -4.0)) + t_1;
	} else if (x <= 9.5e-31) {
		tmp = (b * c) + 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 = j * (k * -27.0)
	t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	tmp = 0
	if x <= -9.6e+144:
		tmp = t_2
	elif x <= -1.1e-102:
		tmp = (i * (x * -4.0)) + t_1
	elif x <= 9.5e-31:
		tmp = (b * c) + 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(j * Float64(k * -27.0))
	t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))
	tmp = 0.0
	if (x <= -9.6e+144)
		tmp = t_2;
	elseif (x <= -1.1e-102)
		tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1);
	elseif (x <= 9.5e-31)
		tmp = Float64(Float64(b * c) + 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 = j * (k * -27.0);
	t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	tmp = 0.0;
	if (x <= -9.6e+144)
		tmp = t_2;
	elseif (x <= -1.1e-102)
		tmp = (i * (x * -4.0)) + t_1;
	elseif (x <= 9.5e-31)
		tmp = (b * c) + 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.6e+144], t$95$2, If[LessEqual[x, -1.1e-102], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 9.5e-31], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -9.6 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;x \leq 9.5 \cdot 10^{-31}:\\
\;\;\;\;b \cdot c + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.6000000000000002e144 or 9.5000000000000008e-31 < x

    1. Initial program 74.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. Simplified80.6%

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

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

    if -9.6000000000000002e144 < x < -1.10000000000000006e-102

    1. Initial program 86.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. Simplified88.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 i around inf 56.9%

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000006e-102 < x < 9.5000000000000008e-31

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

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

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

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

Alternative 10: 56.8% accurate, 1.1× speedup?

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-298}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;t \leq 3 \cdot 10^{+34}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.49999999999999924e-44

    1. Initial program 78.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. Simplified80.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. Taylor expanded in t around inf 57.0%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. pow173.2%

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

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

      \[\leadsto t \cdot \left(\color{blue}{{\left(\left(18 \cdot x\right) \cdot \left(y \cdot z\right)\right)}^{1}} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. unpow173.2%

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

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

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

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

    if -9.49999999999999924e-44 < t < -1.5e-298

    1. Initial program 85.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. Simplified83.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 i around inf 61.3%

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

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

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

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

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in61.3%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in61.3%

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

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

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

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

    if -1.5e-298 < t < 3.00000000000000018e34

    1. Initial program 81.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 73.6%

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

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

    if 3.00000000000000018e34 < t

    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. Simplified88.6%

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

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

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

Alternative 11: 56.7% accurate, 1.1× speedup?

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

\mathbf{elif}\;t \leq -3 \cdot 10^{-298}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.25000000000000008e-38 or 9.9999999999999997e34 < t

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

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

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

    if -1.25000000000000008e-38 < t < -2.9999999999999999e-298

    1. Initial program 85.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. Simplified83.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 i around inf 61.3%

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

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

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

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

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in61.3%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in61.3%

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

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

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

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

    if -2.9999999999999999e-298 < t < 9.9999999999999997e34

    1. Initial program 81.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 73.6%

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

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

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

Alternative 12: 34.7% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.6 \cdot 10^{+267}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.6 \cdot 10^{-89}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 7.4 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(i \cdot -4\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
 (if (<= (* b c) -5.6e+267)
   (* b c)
   (if (<= (* b c) -1.6e-89)
     (* -27.0 (* j k))
     (if (<= (* b c) 7.4e+74) (* x (* i -4.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 tmp;
	if ((b * c) <= -5.6e+267) {
		tmp = b * c;
	} else if ((b * c) <= -1.6e-89) {
		tmp = -27.0 * (j * k);
	} else if ((b * c) <= 7.4e+74) {
		tmp = x * (i * -4.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) :: tmp
    if ((b * c) <= (-5.6d+267)) then
        tmp = b * c
    else if ((b * c) <= (-1.6d-89)) then
        tmp = (-27.0d0) * (j * k)
    else if ((b * c) <= 7.4d+74) then
        tmp = x * (i * (-4.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 tmp;
	if ((b * c) <= -5.6e+267) {
		tmp = b * c;
	} else if ((b * c) <= -1.6e-89) {
		tmp = -27.0 * (j * k);
	} else if ((b * c) <= 7.4e+74) {
		tmp = x * (i * -4.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):
	tmp = 0
	if (b * c) <= -5.6e+267:
		tmp = b * c
	elif (b * c) <= -1.6e-89:
		tmp = -27.0 * (j * k)
	elif (b * c) <= 7.4e+74:
		tmp = x * (i * -4.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)
	tmp = 0.0
	if (Float64(b * c) <= -5.6e+267)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -1.6e-89)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (Float64(b * c) <= 7.4e+74)
		tmp = Float64(x * Float64(i * -4.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)
	tmp = 0.0;
	if ((b * c) <= -5.6e+267)
		tmp = b * c;
	elseif ((b * c) <= -1.6e-89)
		tmp = -27.0 * (j * k);
	elseif ((b * c) <= 7.4e+74)
		tmp = x * (i * -4.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_] := If[LessEqual[N[(b * c), $MachinePrecision], -5.6e+267], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.6e-89], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.4e+74], N[(x * N[(i * -4.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}
\mathbf{if}\;b \cdot c \leq -5.6 \cdot 10^{+267}:\\
\;\;\;\;b \cdot c\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -5.6000000000000004e267 or 7.4000000000000002e74 < (*.f64 b c)

    1. Initial program 79.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. Simplified76.5%

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

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

        \[\leadsto \left(\color{blue}{\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 \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-+l-79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6000000000000004e267 < (*.f64 b c) < -1.59999999999999999e-89

    1. Initial program 82.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. Simplified85.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 j around inf 28.6%

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

    if -1.59999999999999999e-89 < (*.f64 b c) < 7.4000000000000002e74

    1. Initial program 85.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. Simplified86.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 i around inf 53.6%

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

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

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

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

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in53.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} \]
      2. associate-*r*37.8%

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

        \[\leadsto \color{blue}{\left(x \cdot -4\right) \cdot i} \]
      4. associate-*l*37.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.6 \cdot 10^{+267}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.6 \cdot 10^{-89}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 7.4 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.4999999999999996e65 or 4.3e-28 < x

    1. Initial program 74.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. Simplified81.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 x around inf 73.0%

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

    if -5.4999999999999996e65 < x < 4.3e-28

    1. Initial program 90.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 74.5%

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

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

Alternative 14: 48.0% accurate, 1.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+198} \lor \neg \left(t \leq 2.25 \cdot 10^{+42}\right):\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + \left(t \cdot a\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \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 (<= t -3e+198) (not (<= t 2.25e+42)))
   (+ (* j (* k -27.0)) (* (* t a) -4.0))
   (- (* b c) (* 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 <= -3e+198) || !(t <= 2.25e+42)) {
		tmp = (j * (k * -27.0)) + ((t * a) * -4.0);
	} else {
		tmp = (b * c) - (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 <= (-3d+198)) .or. (.not. (t <= 2.25d+42))) then
        tmp = (j * (k * (-27.0d0))) + ((t * a) * (-4.0d0))
    else
        tmp = (b * c) - (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 <= -3e+198) || !(t <= 2.25e+42)) {
		tmp = (j * (k * -27.0)) + ((t * a) * -4.0);
	} else {
		tmp = (b * c) - (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 <= -3e+198) or not (t <= 2.25e+42):
		tmp = (j * (k * -27.0)) + ((t * a) * -4.0)
	else:
		tmp = (b * c) - (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 <= -3e+198) || !(t <= 2.25e+42))
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(Float64(t * a) * -4.0));
	else
		tmp = Float64(Float64(b * c) - 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 <= -3e+198) || ~((t <= 2.25e+42)))
		tmp = (j * (k * -27.0)) + ((t * a) * -4.0);
	else
		tmp = (b * c) - (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, -3e+198], N[Not[LessEqual[t, 2.25e+42]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * 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}\;t \leq -3 \cdot 10^{+198} \lor \neg \left(t \leq 2.25 \cdot 10^{+42}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + \left(t \cdot a\right) \cdot -4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.00000000000000019e198 or 2.25000000000000006e42 < t

    1. Initial program 84.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified85.7%

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

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

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

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

    if -3.00000000000000019e198 < t < 2.25000000000000006e42

    1. Initial program 82.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 70.4%

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

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

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

Alternative 15: 52.6% 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}\;i \leq -3.7 \cdot 10^{+69} \lor \neg \left(i \leq 46000000000000\right):\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + 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
 (if (or (<= i -3.7e+69) (not (<= i 46000000000000.0)))
   (- (* b c) (* 4.0 (* x i)))
   (+ (* 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 ((i <= -3.7e+69) || !(i <= 46000000000000.0)) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (b * c) + (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 ((i <= (-3.7d+69)) .or. (.not. (i <= 46000000000000.0d0))) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else
        tmp = (b * c) + (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 ((i <= -3.7e+69) || !(i <= 46000000000000.0)) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (b * c) + (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 (i <= -3.7e+69) or not (i <= 46000000000000.0):
		tmp = (b * c) - (4.0 * (x * i))
	else:
		tmp = (b * c) + (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 ((i <= -3.7e+69) || !(i <= 46000000000000.0))
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	else
		tmp = Float64(Float64(b * c) + 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)
	tmp = 0.0;
	if ((i <= -3.7e+69) || ~((i <= 46000000000000.0)))
		tmp = (b * c) - (4.0 * (x * i));
	else
		tmp = (b * c) + (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[i, -3.7e+69], N[Not[LessEqual[i, 46000000000000.0]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}
\mathbf{if}\;i \leq -3.7 \cdot 10^{+69} \lor \neg \left(i \leq 46000000000000\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -3.6999999999999999e69 or 4.6e13 < i

    1. Initial program 80.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 69.8%

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

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

    if -3.6999999999999999e69 < i < 4.6e13

    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.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 b around inf 46.2%

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

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

Alternative 16: 48.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}\;i \leq -3.15 \cdot 10^{+69} \lor \neg \left(i \leq 3.9 \cdot 10^{+141}\right):\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + 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
 (if (or (<= i -3.15e+69) (not (<= i 3.9e+141)))
   (* x (* i -4.0))
   (+ (* 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 ((i <= -3.15e+69) || !(i <= 3.9e+141)) {
		tmp = x * (i * -4.0);
	} else {
		tmp = (b * c) + (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 ((i <= (-3.15d+69)) .or. (.not. (i <= 3.9d+141))) then
        tmp = x * (i * (-4.0d0))
    else
        tmp = (b * c) + (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 ((i <= -3.15e+69) || !(i <= 3.9e+141)) {
		tmp = x * (i * -4.0);
	} else {
		tmp = (b * c) + (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 (i <= -3.15e+69) or not (i <= 3.9e+141):
		tmp = x * (i * -4.0)
	else:
		tmp = (b * c) + (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 ((i <= -3.15e+69) || !(i <= 3.9e+141))
		tmp = Float64(x * Float64(i * -4.0));
	else
		tmp = Float64(Float64(b * c) + 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)
	tmp = 0.0;
	if ((i <= -3.15e+69) || ~((i <= 3.9e+141)))
		tmp = x * (i * -4.0);
	else
		tmp = (b * c) + (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[i, -3.15e+69], N[Not[LessEqual[i, 3.9e+141]], $MachinePrecision]], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}
\mathbf{if}\;i \leq -3.15 \cdot 10^{+69} \lor \neg \left(i \leq 3.9 \cdot 10^{+141}\right):\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -3.15000000000000004e69 or 3.89999999999999991e141 < i

    1. Initial program 79.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. Simplified82.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 i around inf 63.2%

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

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

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

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

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in63.2%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in63.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} \]
      2. associate-*r*57.1%

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

        \[\leadsto \color{blue}{\left(x \cdot -4\right) \cdot i} \]
      4. associate-*l*57.1%

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

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

    if -3.15000000000000004e69 < i < 3.89999999999999991e141

    1. Initial program 84.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified85.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 b around inf 44.3%

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -3.7999999999999997e266 or 3.4000000000000001e115 < (*.f64 b c)

    1. Initial program 77.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. Simplified75.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. associate-*r*77.4%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. distribute-rgt-out--77.4%

        \[\leadsto \left(\color{blue}{\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 \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-+l-77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999997e266 < (*.f64 b c) < 3.4000000000000001e115

    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. Simplified85.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 22.9%

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

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

Alternative 18: 24.1% accurate, 10.3× speedup?

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

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

      \[\leadsto \left(\color{blue}{\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 \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    3. associate-+l-82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer Target 1: 89.9% 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 2024178 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

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

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