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

Percentage Accurate: 86.1% → 88.7%
Time: 19.0s
Alternatives: 20
Speedup: 0.9×

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.40000000000000002e67

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.40000000000000002e67 < z

    1. Initial program 85.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. 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
  3. Recombined 2 regimes into one program.
  4. Final simplification89.3%

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

Alternative 2: 92.5% accurate, 0.5× speedup?

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

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


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

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

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto x \cdot \left({\color{blue}{\left(\left(18 \cdot t\right) \cdot \left(y \cdot z\right)\right)}}^{1} - 4 \cdot i\right) \]
    6. Applied egg-rr57.2%

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

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

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

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

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

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

Alternative 3: 33.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])\\\\ [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 := a \cdot \left(t \cdot -4\right)\\ t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{if}\;k \leq -1.25 \cdot 10^{-68}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq -1.16 \cdot 10^{-253}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;k \leq 3.3 \cdot 10^{-261}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;k \leq 9.2 \cdot 10^{-28}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 1.36 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;k \leq 2.9 \cdot 10^{+138}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;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.
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 (* a (* t -4.0))) (t_2 (* 18.0 (* t (* x (* z y))))))
   (if (<= k -1.25e-68)
     (* k (* j -27.0))
     (if (<= k -1.16e-253)
       t_2
       (if (<= k 3.3e-261)
         t_1
         (if (<= k 9.2e-28)
           (* b c)
           (if (<= k 1.36e+87)
             t_1
             (if (<= k 2.9e+138) t_2 (* j (* k -27.0))))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = a * (t * -4.0);
	double t_2 = 18.0 * (t * (x * (z * y)));
	double tmp;
	if (k <= -1.25e-68) {
		tmp = k * (j * -27.0);
	} else if (k <= -1.16e-253) {
		tmp = t_2;
	} else if (k <= 3.3e-261) {
		tmp = t_1;
	} else if (k <= 9.2e-28) {
		tmp = b * c;
	} else if (k <= 1.36e+87) {
		tmp = t_1;
	} else if (k <= 2.9e+138) {
		tmp = t_2;
	} else {
		tmp = j * (k * -27.0);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = a * (t * (-4.0d0))
    t_2 = 18.0d0 * (t * (x * (z * y)))
    if (k <= (-1.25d-68)) then
        tmp = k * (j * (-27.0d0))
    else if (k <= (-1.16d-253)) then
        tmp = t_2
    else if (k <= 3.3d-261) then
        tmp = t_1
    else if (k <= 9.2d-28) then
        tmp = b * c
    else if (k <= 1.36d+87) then
        tmp = t_1
    else if (k <= 2.9d+138) then
        tmp = t_2
    else
        tmp = j * (k * (-27.0d0))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = a * (t * -4.0);
	double t_2 = 18.0 * (t * (x * (z * y)));
	double tmp;
	if (k <= -1.25e-68) {
		tmp = k * (j * -27.0);
	} else if (k <= -1.16e-253) {
		tmp = t_2;
	} else if (k <= 3.3e-261) {
		tmp = t_1;
	} else if (k <= 9.2e-28) {
		tmp = b * c;
	} else if (k <= 1.36e+87) {
		tmp = t_1;
	} else if (k <= 2.9e+138) {
		tmp = t_2;
	} else {
		tmp = j * (k * -27.0);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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 = a * (t * -4.0)
	t_2 = 18.0 * (t * (x * (z * y)))
	tmp = 0
	if k <= -1.25e-68:
		tmp = k * (j * -27.0)
	elif k <= -1.16e-253:
		tmp = t_2
	elif k <= 3.3e-261:
		tmp = t_1
	elif k <= 9.2e-28:
		tmp = b * c
	elif k <= 1.36e+87:
		tmp = t_1
	elif k <= 2.9e+138:
		tmp = t_2
	else:
		tmp = j * (k * -27.0)
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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(a * Float64(t * -4.0))
	t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(z * y))))
	tmp = 0.0
	if (k <= -1.25e-68)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (k <= -1.16e-253)
		tmp = t_2;
	elseif (k <= 3.3e-261)
		tmp = t_1;
	elseif (k <= 9.2e-28)
		tmp = Float64(b * c);
	elseif (k <= 1.36e+87)
		tmp = t_1;
	elseif (k <= 2.9e+138)
		tmp = t_2;
	else
		tmp = 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])){:}
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 = a * (t * -4.0);
	t_2 = 18.0 * (t * (x * (z * y)));
	tmp = 0.0;
	if (k <= -1.25e-68)
		tmp = k * (j * -27.0);
	elseif (k <= -1.16e-253)
		tmp = t_2;
	elseif (k <= 3.3e-261)
		tmp = t_1;
	elseif (k <= 9.2e-28)
		tmp = b * c;
	elseif (k <= 1.36e+87)
		tmp = t_1;
	elseif (k <= 2.9e+138)
		tmp = t_2;
	else
		tmp = j * (k * -27.0);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.25e-68], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -1.16e-253], t$95$2, If[LessEqual[k, 3.3e-261], t$95$1, If[LessEqual[k, 9.2e-28], N[(b * c), $MachinePrecision], If[LessEqual[k, 1.36e+87], t$95$1, If[LessEqual[k, 2.9e+138], t$95$2, N[(j * N[(k * -27.0), $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])\\\\
[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 := a \cdot \left(t \cdot -4\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{if}\;k \leq -1.25 \cdot 10^{-68}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;k \leq -1.16 \cdot 10^{-253}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;k \leq 3.3 \cdot 10^{-261}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;k \leq 9.2 \cdot 10^{-28}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;k \leq 1.36 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;k \leq 2.9 \cdot 10^{+138}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if k < -1.24999999999999993e-68

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

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

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

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

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

    if -1.24999999999999993e-68 < k < -1.16e-253 or 1.3599999999999999e87 < k < 2.9000000000000001e138

    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. Simplified91.3%

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

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

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

    if -1.16e-253 < k < 3.2999999999999998e-261 or 9.19999999999999942e-28 < k < 1.3599999999999999e87

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative36.0%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. associate-*r*36.0%

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

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

    if 3.2999999999999998e-261 < k < 9.19999999999999942e-28

    1. Initial program 89.5%

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

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

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

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

    if 2.9000000000000001e138 < k

    1. Initial program 84.4%

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

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

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

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

        \[\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*84.0%

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

        \[\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*84.0%

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

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

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

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

        \[\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) \]
      3. *-commutative84.0%

        \[\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) \]
      4. associate-*r*84.0%

        \[\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) \]
      5. *-commutative84.0%

        \[\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) \]
      6. *-commutative84.0%

        \[\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) \]
      7. *-commutative84.0%

        \[\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) \]
      8. associate-*l*84.0%

        \[\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) \]
      9. *-commutative84.0%

        \[\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) \]
      10. *-commutative84.0%

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

      \[\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 j around inf 58.6%

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

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

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

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

        \[\leadsto -\color{blue}{j \cdot \left(k \cdot 27\right)} \]
      5. distribute-rgt-neg-in58.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.25 \cdot 10^{-68}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq -1.16 \cdot 10^{-253}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{elif}\;k \leq 3.3 \cdot 10^{-261}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;k \leq 9.2 \cdot 10^{-28}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 1.36 \cdot 10^{+87}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;k \leq 2.9 \cdot 10^{+138}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 34.4% 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])\\\\ [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}\;k \leq -5.4 \cdot 10^{+19}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;k \leq 1.6 \cdot 10^{-302}:\\ \;\;\;\;z \cdot \left(y \cdot \left(18 \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;k \leq 1.7 \cdot 10^{-28}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 4.2 \cdot 10^{+87}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;k \leq 3.6 \cdot 10^{+135}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;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.
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 (<= k -5.4e+19)
   (* (* j k) -27.0)
   (if (<= k 1.6e-302)
     (* z (* y (* 18.0 (* x t))))
     (if (<= k 1.7e-28)
       (* b c)
       (if (<= k 4.2e+87)
         (* a (* t -4.0))
         (if (<= k 3.6e+135)
           (* 18.0 (* t (* x (* z y))))
           (* j (* k -27.0))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (k <= -5.4e+19) {
		tmp = (j * k) * -27.0;
	} else if (k <= 1.6e-302) {
		tmp = z * (y * (18.0 * (x * t)));
	} else if (k <= 1.7e-28) {
		tmp = b * c;
	} else if (k <= 4.2e+87) {
		tmp = a * (t * -4.0);
	} else if (k <= 3.6e+135) {
		tmp = 18.0 * (t * (x * (z * y)));
	} else {
		tmp = j * (k * -27.0);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (k <= (-5.4d+19)) then
        tmp = (j * k) * (-27.0d0)
    else if (k <= 1.6d-302) then
        tmp = z * (y * (18.0d0 * (x * t)))
    else if (k <= 1.7d-28) then
        tmp = b * c
    else if (k <= 4.2d+87) then
        tmp = a * (t * (-4.0d0))
    else if (k <= 3.6d+135) then
        tmp = 18.0d0 * (t * (x * (z * y)))
    else
        tmp = j * (k * (-27.0d0))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 (k <= -5.4e+19) {
		tmp = (j * k) * -27.0;
	} else if (k <= 1.6e-302) {
		tmp = z * (y * (18.0 * (x * t)));
	} else if (k <= 1.7e-28) {
		tmp = b * c;
	} else if (k <= 4.2e+87) {
		tmp = a * (t * -4.0);
	} else if (k <= 3.6e+135) {
		tmp = 18.0 * (t * (x * (z * y)));
	} else {
		tmp = j * (k * -27.0);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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 k <= -5.4e+19:
		tmp = (j * k) * -27.0
	elif k <= 1.6e-302:
		tmp = z * (y * (18.0 * (x * t)))
	elif k <= 1.7e-28:
		tmp = b * c
	elif k <= 4.2e+87:
		tmp = a * (t * -4.0)
	elif k <= 3.6e+135:
		tmp = 18.0 * (t * (x * (z * y)))
	else:
		tmp = j * (k * -27.0)
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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 (k <= -5.4e+19)
		tmp = Float64(Float64(j * k) * -27.0);
	elseif (k <= 1.6e-302)
		tmp = Float64(z * Float64(y * Float64(18.0 * Float64(x * t))));
	elseif (k <= 1.7e-28)
		tmp = Float64(b * c);
	elseif (k <= 4.2e+87)
		tmp = Float64(a * Float64(t * -4.0));
	elseif (k <= 3.6e+135)
		tmp = Float64(18.0 * Float64(t * Float64(x * Float64(z * y))));
	else
		tmp = 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])){:}
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 (k <= -5.4e+19)
		tmp = (j * k) * -27.0;
	elseif (k <= 1.6e-302)
		tmp = z * (y * (18.0 * (x * t)));
	elseif (k <= 1.7e-28)
		tmp = b * c;
	elseif (k <= 4.2e+87)
		tmp = a * (t * -4.0);
	elseif (k <= 3.6e+135)
		tmp = 18.0 * (t * (x * (z * y)));
	else
		tmp = j * (k * -27.0);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[k, -5.4e+19], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[k, 1.6e-302], N[(z * N[(y * N[(18.0 * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.7e-28], N[(b * c), $MachinePrecision], If[LessEqual[k, 4.2e+87], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.6e+135], N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $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])\\\\
[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}\;k \leq -5.4 \cdot 10^{+19}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\

\mathbf{elif}\;k \leq 1.6 \cdot 10^{-302}:\\
\;\;\;\;z \cdot \left(y \cdot \left(18 \cdot \left(x \cdot t\right)\right)\right)\\

\mathbf{elif}\;k \leq 1.7 \cdot 10^{-28}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;k \leq 4.2 \cdot 10^{+87}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if k < -5.4e19

    1. Initial program 76.7%

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

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

    if -5.4e19 < k < 1.59999999999999989e-302

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

    if 1.59999999999999989e-302 < k < 1.7e-28

    1. Initial program 88.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 50.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 i around 0 33.0%

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

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

    if 1.7e-28 < k < 4.2e87

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative30.7%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. associate-*r*30.7%

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

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

    if 4.2e87 < k < 3.5999999999999998e135

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

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

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

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

    if 3.5999999999999998e135 < k

    1. Initial program 84.4%

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

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

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

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

        \[\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*84.0%

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

        \[\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*84.0%

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

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

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

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

        \[\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) \]
      3. *-commutative84.0%

        \[\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) \]
      4. associate-*r*84.0%

        \[\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) \]
      5. *-commutative84.0%

        \[\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) \]
      6. *-commutative84.0%

        \[\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) \]
      7. *-commutative84.0%

        \[\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) \]
      8. associate-*l*84.0%

        \[\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) \]
      9. *-commutative84.0%

        \[\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) \]
      10. *-commutative84.0%

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

      \[\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 j around inf 58.6%

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

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

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

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

        \[\leadsto -\color{blue}{j \cdot \left(k \cdot 27\right)} \]
      5. distribute-rgt-neg-in58.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -5.4 \cdot 10^{+19}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;k \leq 1.6 \cdot 10^{-302}:\\ \;\;\;\;z \cdot \left(y \cdot \left(18 \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;k \leq 1.7 \cdot 10^{-28}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 4.2 \cdot 10^{+87}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;k \leq 3.6 \cdot 10^{+135}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 34.3% 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])\\\\ [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}\;k \leq -1 \cdot 10^{-68}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.6 \cdot 10^{-302}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;k \leq 1.85 \cdot 10^{-28}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 8.5 \cdot 10^{+91}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;k \leq 1.08 \cdot 10^{+137}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;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.
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 (<= k -1e-68)
   (* k (* j -27.0))
   (if (<= k 1.6e-302)
     (* 18.0 (* y (* z (* x t))))
     (if (<= k 1.85e-28)
       (* b c)
       (if (<= k 8.5e+91)
         (* a (* t -4.0))
         (if (<= k 1.08e+137)
           (* 18.0 (* t (* x (* z y))))
           (* j (* k -27.0))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (k <= -1e-68) {
		tmp = k * (j * -27.0);
	} else if (k <= 1.6e-302) {
		tmp = 18.0 * (y * (z * (x * t)));
	} else if (k <= 1.85e-28) {
		tmp = b * c;
	} else if (k <= 8.5e+91) {
		tmp = a * (t * -4.0);
	} else if (k <= 1.08e+137) {
		tmp = 18.0 * (t * (x * (z * y)));
	} else {
		tmp = j * (k * -27.0);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (k <= (-1d-68)) then
        tmp = k * (j * (-27.0d0))
    else if (k <= 1.6d-302) then
        tmp = 18.0d0 * (y * (z * (x * t)))
    else if (k <= 1.85d-28) then
        tmp = b * c
    else if (k <= 8.5d+91) then
        tmp = a * (t * (-4.0d0))
    else if (k <= 1.08d+137) then
        tmp = 18.0d0 * (t * (x * (z * y)))
    else
        tmp = j * (k * (-27.0d0))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 (k <= -1e-68) {
		tmp = k * (j * -27.0);
	} else if (k <= 1.6e-302) {
		tmp = 18.0 * (y * (z * (x * t)));
	} else if (k <= 1.85e-28) {
		tmp = b * c;
	} else if (k <= 8.5e+91) {
		tmp = a * (t * -4.0);
	} else if (k <= 1.08e+137) {
		tmp = 18.0 * (t * (x * (z * y)));
	} else {
		tmp = j * (k * -27.0);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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 k <= -1e-68:
		tmp = k * (j * -27.0)
	elif k <= 1.6e-302:
		tmp = 18.0 * (y * (z * (x * t)))
	elif k <= 1.85e-28:
		tmp = b * c
	elif k <= 8.5e+91:
		tmp = a * (t * -4.0)
	elif k <= 1.08e+137:
		tmp = 18.0 * (t * (x * (z * y)))
	else:
		tmp = j * (k * -27.0)
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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 (k <= -1e-68)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (k <= 1.6e-302)
		tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t))));
	elseif (k <= 1.85e-28)
		tmp = Float64(b * c);
	elseif (k <= 8.5e+91)
		tmp = Float64(a * Float64(t * -4.0));
	elseif (k <= 1.08e+137)
		tmp = Float64(18.0 * Float64(t * Float64(x * Float64(z * y))));
	else
		tmp = 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])){:}
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 (k <= -1e-68)
		tmp = k * (j * -27.0);
	elseif (k <= 1.6e-302)
		tmp = 18.0 * (y * (z * (x * t)));
	elseif (k <= 1.85e-28)
		tmp = b * c;
	elseif (k <= 8.5e+91)
		tmp = a * (t * -4.0);
	elseif (k <= 1.08e+137)
		tmp = 18.0 * (t * (x * (z * y)));
	else
		tmp = j * (k * -27.0);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[k, -1e-68], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6e-302], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.85e-28], N[(b * c), $MachinePrecision], If[LessEqual[k, 8.5e+91], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.08e+137], N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $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])\\\\
[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}\;k \leq -1 \cdot 10^{-68}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;k \leq 1.6 \cdot 10^{-302}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\

\mathbf{elif}\;k \leq 1.85 \cdot 10^{-28}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;k \leq 8.5 \cdot 10^{+91}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if k < -1.00000000000000007e-68

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

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

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

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

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

    if -1.00000000000000007e-68 < k < 1.59999999999999989e-302

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

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

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

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

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

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

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

        \[\leadsto 18 \cdot \left(\color{blue}{\left(t \cdot \left(x \cdot z\right)\right)} \cdot y\right) \]
      5. *-commutative31.8%

        \[\leadsto 18 \cdot \left(\color{blue}{\left(\left(x \cdot z\right) \cdot t\right)} \cdot y\right) \]
      6. *-commutative31.8%

        \[\leadsto 18 \cdot \left(\left(\color{blue}{\left(z \cdot x\right)} \cdot t\right) \cdot y\right) \]
      7. associate-*l*33.5%

        \[\leadsto 18 \cdot \left(\color{blue}{\left(z \cdot \left(x \cdot t\right)\right)} \cdot y\right) \]
      8. *-commutative33.5%

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

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

    if 1.59999999999999989e-302 < k < 1.8500000000000001e-28

    1. Initial program 88.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 50.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 i around 0 33.0%

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

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

    if 1.8500000000000001e-28 < k < 8.4999999999999995e91

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative30.7%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. associate-*r*30.7%

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

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

    if 8.4999999999999995e91 < k < 1.0800000000000001e137

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

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

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

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

    if 1.0800000000000001e137 < k

    1. Initial program 84.4%

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

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

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

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

        \[\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*84.0%

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

        \[\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*84.0%

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

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

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

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

        \[\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) \]
      3. *-commutative84.0%

        \[\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) \]
      4. associate-*r*84.0%

        \[\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) \]
      5. *-commutative84.0%

        \[\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) \]
      6. *-commutative84.0%

        \[\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) \]
      7. *-commutative84.0%

        \[\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) \]
      8. associate-*l*84.0%

        \[\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) \]
      9. *-commutative84.0%

        \[\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) \]
      10. *-commutative84.0%

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

      \[\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 j around inf 58.6%

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

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

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

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

        \[\leadsto -\color{blue}{j \cdot \left(k \cdot 27\right)} \]
      5. distribute-rgt-neg-in58.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1 \cdot 10^{-68}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.6 \cdot 10^{-302}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;k \leq 1.85 \cdot 10^{-28}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 8.5 \cdot 10^{+91}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;k \leq 1.08 \cdot 10^{+137}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 87.1% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [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 4 \cdot 10^{+202}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(z \cdot y\right) \cdot \left(t \cdot 18\right) - i \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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= x 4e+202)
   (-
    (+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0))))
    (+ (* x (* i 4.0)) (* j (* 27.0 k))))
   (* x (- (* (* z y) (* t 18.0)) (* i 4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (x <= 4e+202) {
		tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k)));
	} else {
		tmp = x * (((z * y) * (t * 18.0)) - (i * 4.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= 4d+202) then
        tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (27.0d0 * k)))
    else
        tmp = x * (((z * y) * (t * 18.0d0)) - (i * 4.0d0))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= 4e+202) {
		tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k)));
	} else {
		tmp = x * (((z * y) * (t * 18.0)) - (i * 4.0));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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 <= 4e+202:
		tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k)))
	else:
		tmp = x * (((z * y) * (t * 18.0)) - (i * 4.0))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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 <= 4e+202)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(27.0 * k))));
	else
		tmp = Float64(x * Float64(Float64(Float64(z * y) * Float64(t * 18.0)) - Float64(i * 4.0)));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= 4e+202)
		tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k)));
	else
		tmp = x * (((z * y) * (t * 18.0)) - (i * 4.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[x, 4e+202], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(z * y), $MachinePrecision] * N[(t * 18.0), $MachinePrecision]), $MachinePrecision] - N[(i * 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])\\\\
[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 4 \cdot 10^{+202}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(27 \cdot k\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.9999999999999996e202

    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. Simplified90.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

    if 3.9999999999999996e202 < x

    1. Initial program 37.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. Simplified53.5%

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

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

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

        \[\leadsto x \cdot \left({\color{blue}{\left(\left(18 \cdot t\right) \cdot \left(y \cdot z\right)\right)}}^{1} - 4 \cdot i\right) \]
    6. Applied egg-rr86.7%

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

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

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

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

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

Alternative 7: 82.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])\\\\ [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 -1.65 \cdot 10^{+165} \lor \neg \left(i \leq 4 \cdot 10^{-56}\right):\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right) - a \cdot 4\right)\right) - 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.
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 -1.65e+165) (not (<= i 4e-56)))
   (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* 27.0 j)))
   (-
    (+ (* b c) (* t (- (* z (* y (* x 18.0))) (* a 4.0))))
    (* 27.0 (* j k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 ((i <= -1.65e+165) || !(i <= 4e-56)) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	} else {
		tmp = ((b * c) + (t * ((z * (y * (x * 18.0))) - (a * 4.0)))) - (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.
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 <= (-1.65d+165)) .or. (.not. (i <= 4d-56))) then
        tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (27.0d0 * j))
    else
        tmp = ((b * c) + (t * ((z * (y * (x * 18.0d0))) - (a * 4.0d0)))) - (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;
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 <= -1.65e+165) || !(i <= 4e-56)) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	} else {
		tmp = ((b * c) + (t * ((z * (y * (x * 18.0))) - (a * 4.0)))) - (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])
[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 <= -1.65e+165) or not (i <= 4e-56):
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j))
	else:
		tmp = ((b * c) + (t * ((z * (y * (x * 18.0))) - (a * 4.0)))) - (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])
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 <= -1.65e+165) || !(i <= 4e-56))
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(k * Float64(27.0 * j)));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(y * Float64(x * 18.0))) - Float64(a * 4.0)))) - 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])){:}
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 <= -1.65e+165) || ~((i <= 4e-56)))
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	else
		tmp = ((b * c) + (t * ((z * (y * (x * 18.0))) - (a * 4.0)))) - (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.
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, -1.65e+165], N[Not[LessEqual[i, 4e-56]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $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])\\\\
[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 -1.65 \cdot 10^{+165} \lor \neg \left(i \leq 4 \cdot 10^{-56}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(27 \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -1.6499999999999999e165 or 4.0000000000000002e-56 < i

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

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

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

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

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

    if -1.6499999999999999e165 < i < 4.0000000000000002e-56

    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. Simplified88.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 i around 0 84.3%

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

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

        \[\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) - 27 \cdot \left(j \cdot k\right) \]
    6. Applied egg-rr83.7%

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

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

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

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

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

Alternative 8: 82.8% 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])\\\\ [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 -1.7 \cdot 10^{-12} \lor \neg \left(i \leq 6 \cdot 10^{-59}\right):\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\right) - 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.
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 -1.7e-12) (not (<= i 6e-59)))
   (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* 27.0 j)))
   (-
    (+ (* b c) (* t (- (* 18.0 (* x (* z y))) (* a 4.0))))
    (* 27.0 (* j k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 ((i <= -1.7e-12) || !(i <= 6e-59)) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	} else {
		tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (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.
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 <= (-1.7d-12)) .or. (.not. (i <= 6d-59))) then
        tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (27.0d0 * j))
    else
        tmp = ((b * c) + (t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0)))) - (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;
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 <= -1.7e-12) || !(i <= 6e-59)) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	} else {
		tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (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])
[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 <= -1.7e-12) or not (i <= 6e-59):
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j))
	else:
		tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (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])
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 <= -1.7e-12) || !(i <= 6e-59))
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(k * Float64(27.0 * j)));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0)))) - 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])){:}
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 <= -1.7e-12) || ~((i <= 6e-59)))
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	else
		tmp = ((b * c) + (t * ((18.0 * (x * (z * y))) - (a * 4.0)))) - (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.
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, -1.7e-12], N[Not[LessEqual[i, 6e-59]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $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])\\\\
[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 -1.7 \cdot 10^{-12} \lor \neg \left(i \leq 6 \cdot 10^{-59}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(27 \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -1.7e-12 or 6.0000000000000002e-59 < i

    1. Initial program 86.2%

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

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

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

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

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

    if -1.7e-12 < i < 6.0000000000000002e-59

    1. Initial program 82.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. 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 i around 0 88.2%

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

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

Alternative 9: 79.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])\\\\ [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(z \cdot y\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -7.2 \cdot 10^{+20}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;t \leq 7.3 \cdot 10^{+101}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - k \cdot \left(27 \cdot j\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.
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 (* z y))) (* a 4.0)))))
   (if (<= t -7.2e+20)
     (+ (* b c) t_1)
     (if (<= t 7.3e+101)
       (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* k (* 27.0 j)))
       t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
	double tmp;
	if (t <= -7.2e+20) {
		tmp = (b * c) + t_1;
	} else if (t <= 7.3e+101) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	} 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.
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 * (z * y))) - (a * 4.0d0))
    if (t <= (-7.2d+20)) then
        tmp = (b * c) + t_1
    else if (t <= 7.3d+101) then
        tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - (k * (27.0d0 * j))
    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;
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 * (z * y))) - (a * 4.0));
	double tmp;
	if (t <= -7.2e+20) {
		tmp = (b * c) + t_1;
	} else if (t <= 7.3e+101) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	} 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])
[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 * (z * y))) - (a * 4.0))
	tmp = 0
	if t <= -7.2e+20:
		tmp = (b * c) + t_1
	elif t <= 7.3e+101:
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j))
	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])
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(z * y))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -7.2e+20)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (t <= 7.3e+101)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(k * Float64(27.0 * j)));
	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])){:}
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 * (z * y))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -7.2e+20)
		tmp = (b * c) + t_1;
	elseif (t <= 7.3e+101)
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - (k * (27.0 * j));
	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.
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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+20], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 7.3e+101], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $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])\\\\
[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(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+20}:\\
\;\;\;\;b \cdot c + t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.2e20

    1. Initial program 82.8%

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

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

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

    if -7.2e20 < t < 7.2999999999999994e101

    1. Initial program 86.5%

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

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

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

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

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

    if 7.2999999999999994e101 < t

    1. Initial program 80.6%

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

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

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

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

Alternative 10: 37.2% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [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 -6 \cdot 10^{+37}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -4.15 \cdot 10^{-72}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+46}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) -6e+37)
   (* b c)
   (if (<= (* b c) -4.15e-72)
     (* a (* t -4.0))
     (if (<= (* b c) 3e+46) (* j (* k -27.0)) (* b c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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) <= -6e+37) {
		tmp = b * c;
	} else if ((b * c) <= -4.15e-72) {
		tmp = a * (t * -4.0);
	} else if ((b * c) <= 3e+46) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) <= (-6d+37)) then
        tmp = b * c
    else if ((b * c) <= (-4.15d-72)) then
        tmp = a * (t * (-4.0d0))
    else if ((b * c) <= 3d+46) then
        tmp = j * (k * (-27.0d0))
    else
        tmp = b * c
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) <= -6e+37) {
		tmp = b * c;
	} else if ((b * c) <= -4.15e-72) {
		tmp = a * (t * -4.0);
	} else if ((b * c) <= 3e+46) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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) <= -6e+37:
		tmp = b * c
	elif (b * c) <= -4.15e-72:
		tmp = a * (t * -4.0)
	elif (b * c) <= 3e+46:
		tmp = j * (k * -27.0)
	else:
		tmp = b * c
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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) <= -6e+37)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -4.15e-72)
		tmp = Float64(a * Float64(t * -4.0));
	elseif (Float64(b * c) <= 3e+46)
		tmp = Float64(j * Float64(k * -27.0));
	else
		tmp = Float64(b * c);
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) <= -6e+37)
		tmp = b * c;
	elseif ((b * c) <= -4.15e-72)
		tmp = a * (t * -4.0);
	elseif ((b * c) <= 3e+46)
		tmp = j * (k * -27.0);
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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], -6e+37], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.15e-72], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3e+46], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 -6 \cdot 10^{+37}:\\
\;\;\;\;b \cdot c\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -6.00000000000000043e37 or 3.00000000000000023e46 < (*.f64 b c)

    1. Initial program 82.3%

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

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

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

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

    if -6.00000000000000043e37 < (*.f64 b c) < -4.1499999999999999e-72

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative38.3%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. associate-*r*38.3%

        \[\leadsto \color{blue}{a \cdot \left(t \cdot -4\right)} \]
    7. Simplified38.3%

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

    if -4.1499999999999999e-72 < (*.f64 b c) < 3.00000000000000023e46

    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. Simplified89.0%

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

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

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

        \[\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*86.4%

        \[\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. fma-neg87.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*88.0%

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

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

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

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

        \[\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) \]
      3. *-commutative87.2%

        \[\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) \]
      4. associate-*r*87.2%

        \[\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) \]
      5. *-commutative87.2%

        \[\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) \]
      6. *-commutative87.2%

        \[\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) \]
      7. *-commutative87.2%

        \[\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) \]
      8. associate-*l*86.4%

        \[\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) \]
      9. *-commutative86.4%

        \[\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) \]
      10. *-commutative86.4%

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

      \[\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 j around inf 36.9%

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

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

        \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
      3. *-commutative36.9%

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

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

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

        \[\leadsto j \cdot \color{blue}{\left(k \cdot \left(-27\right)\right)} \]
      7. metadata-eval36.9%

        \[\leadsto j \cdot \left(k \cdot \color{blue}{-27}\right) \]
      8. *-commutative36.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -6 \cdot 10^{+37}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -4.15 \cdot 10^{-72}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+46}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 71.4% 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])\\\\ [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 -78 \lor \neg \left(t \leq 7.3 \cdot 10^{+101}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(27 \cdot j\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.
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 -78.0) (not (<= t 7.3e+101)))
   (* t (- (* 18.0 (* x (* z y))) (* a 4.0)))
   (- (- (* b c) (* 4.0 (* x i))) (* k (* 27.0 j)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 ((t <= -78.0) || !(t <= 7.3e+101)) {
		tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
	} else {
		tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-78.0d0)) .or. (.not. (t <= 7.3d+101))) then
        tmp = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
    else
        tmp = ((b * c) - (4.0d0 * (x * i))) - (k * (27.0d0 * j))
    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;
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 <= -78.0) || !(t <= 7.3e+101)) {
		tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
	} else {
		tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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 <= -78.0) or not (t <= 7.3e+101):
		tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0))
	else:
		tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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 <= -78.0) || !(t <= 7.3e+101))
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0)));
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(27.0 * j)));
	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])){:}
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 <= -78.0) || ~((t <= 7.3e+101)))
		tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
	else
		tmp = ((b * c) - (4.0 * (x * i))) - (k * (27.0 * j));
	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.
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, -78.0], N[Not[LessEqual[t, 7.3e+101]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $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])\\\\
[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 -78 \lor \neg \left(t \leq 7.3 \cdot 10^{+101}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -78 or 7.2999999999999994e101 < t

    1. Initial program 81.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. Simplified89.3%

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

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

    if -78 < t < 7.2999999999999994e101

    1. Initial program 87.1%

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

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

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

Alternative 12: 54.1% 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])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+47} \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+46}\right):\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \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.
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) -2e+47) (not (<= (* b c) 2e+46)))
   (- (* b c) (* 4.0 (* x i)))
   (+ (* j (* k -27.0)) (* a (* t -4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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) <= -2e+47) || !((b * c) <= 2e+46)) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (j * (k * -27.0)) + (a * (t * -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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (((b * c) <= (-2d+47)) .or. (.not. ((b * c) <= 2d+46))) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else
        tmp = (j * (k * (-27.0d0))) + (a * (t * (-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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (((b * c) <= -2e+47) || !((b * c) <= 2e+46)) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (j * (k * -27.0)) + (a * (t * -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])
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if ((b * c) <= -2e+47) or not ((b * c) <= 2e+46):
		tmp = (b * c) - (4.0 * (x * i))
	else:
		tmp = (j * (k * -27.0)) + (a * (t * -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])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((Float64(b * c) <= -2e+47) || !(Float64(b * c) <= 2e+46))
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	else
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (((b * c) <= -2e+47) || ~(((b * c) <= 2e+46)))
		tmp = (b * c) - (4.0 * (x * i));
	else
		tmp = (j * (k * -27.0)) + (a * (t * -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.
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], -2e+47], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2e+46]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+47} \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+46}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -2.0000000000000001e47 or 2e46 < (*.f64 b c)

    1. Initial program 81.8%

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

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

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

    if -2.0000000000000001e47 < (*.f64 b c) < 2e46

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 81.8%

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

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

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

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

    if -5.5000000000000002e-5 < t < 7.2999999999999994e101

    1. Initial program 87.1%

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

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

    if 7.2999999999999994e101 < t

    1. Initial program 80.6%

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.5500000000000001e86

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

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

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

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

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

    if -1.5500000000000001e86 < x < 4.7e142

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

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

    if 4.7e142 < x

    1. Initial program 52.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. Simplified62.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 77.6%

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

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

        \[\leadsto x \cdot \left({\color{blue}{\left(\left(18 \cdot t\right) \cdot \left(y \cdot z\right)\right)}}^{1} - 4 \cdot i\right) \]
    6. Applied egg-rr77.6%

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

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

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

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

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

Alternative 15: 46.9% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [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 -2.2 \cdot 10^{+160}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+84}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(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.
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 -2.2e+160)
   (* a (* t -4.0))
   (if (<= t -6.5e+32)
     (* t (* 18.0 (* x (* z y))))
     (if (<= t 2.6e+84) (- (* b c) (* 27.0 (* j k))) (* t (* a -4.0))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (t <= -2.2e+160) {
		tmp = a * (t * -4.0);
	} else if (t <= -6.5e+32) {
		tmp = t * (18.0 * (x * (z * y)));
	} else if (t <= 2.6e+84) {
		tmp = (b * c) - (27.0 * (j * k));
	} else {
		tmp = t * (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.
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 <= (-2.2d+160)) then
        tmp = a * (t * (-4.0d0))
    else if (t <= (-6.5d+32)) then
        tmp = t * (18.0d0 * (x * (z * y)))
    else if (t <= 2.6d+84) then
        tmp = (b * c) - (27.0d0 * (j * k))
    else
        tmp = t * (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;
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 <= -2.2e+160) {
		tmp = a * (t * -4.0);
	} else if (t <= -6.5e+32) {
		tmp = t * (18.0 * (x * (z * y)));
	} else if (t <= 2.6e+84) {
		tmp = (b * c) - (27.0 * (j * k));
	} else {
		tmp = t * (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])
[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 <= -2.2e+160:
		tmp = a * (t * -4.0)
	elif t <= -6.5e+32:
		tmp = t * (18.0 * (x * (z * y)))
	elif t <= 2.6e+84:
		tmp = (b * c) - (27.0 * (j * k))
	else:
		tmp = t * (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])
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 <= -2.2e+160)
		tmp = Float64(a * Float64(t * -4.0));
	elseif (t <= -6.5e+32)
		tmp = Float64(t * Float64(18.0 * Float64(x * Float64(z * y))));
	elseif (t <= 2.6e+84)
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	else
		tmp = Float64(t * 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])){:}
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 <= -2.2e+160)
		tmp = a * (t * -4.0);
	elseif (t <= -6.5e+32)
		tmp = t * (18.0 * (x * (z * y)));
	elseif (t <= 2.6e+84)
		tmp = (b * c) - (27.0 * (j * k));
	else
		tmp = t * (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.
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, -2.2e+160], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e+32], N[(t * N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+84], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(a * -4.0), $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])\\\\
[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 -2.2 \cdot 10^{+160}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.19999999999999992e160

    1. Initial program 75.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. Simplified84.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 87.5%

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative48.0%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. associate-*r*48.0%

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

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

    if -2.19999999999999992e160 < t < -6.4999999999999994e32

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

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

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

    if -6.4999999999999994e32 < t < 2.6000000000000001e84

    1. Initial program 87.9%

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

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

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

    if 2.6000000000000001e84 < t

    1. Initial program 76.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. Simplified88.3%

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative54.3%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. *-commutative54.3%

        \[\leadsto \color{blue}{\left(t \cdot a\right)} \cdot -4 \]
      3. associate-*r*54.3%

        \[\leadsto \color{blue}{t \cdot \left(a \cdot -4\right)} \]
      4. *-commutative54.3%

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a\right)} \]
    7. Simplified54.3%

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification57.0%

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

Alternative 16: 46.9% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+161}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{+30}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+82}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(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.
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 -6.8e+161)
   (* a (* t -4.0))
   (if (<= t -1.7e+30)
     (* t (* 18.0 (* x (* z y))))
     (if (<= t 5.5e+82) (+ (* b c) (* j (* k -27.0))) (* t (* a -4.0))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (t <= -6.8e+161) {
		tmp = a * (t * -4.0);
	} else if (t <= -1.7e+30) {
		tmp = t * (18.0 * (x * (z * y)));
	} else if (t <= 5.5e+82) {
		tmp = (b * c) + (j * (k * -27.0));
	} else {
		tmp = t * (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t <= (-6.8d+161)) then
        tmp = a * (t * (-4.0d0))
    else if (t <= (-1.7d+30)) then
        tmp = t * (18.0d0 * (x * (z * y)))
    else if (t <= 5.5d+82) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else
        tmp = t * (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (t <= -6.8e+161) {
		tmp = a * (t * -4.0);
	} else if (t <= -1.7e+30) {
		tmp = t * (18.0 * (x * (z * y)));
	} else if (t <= 5.5e+82) {
		tmp = (b * c) + (j * (k * -27.0));
	} else {
		tmp = t * (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])
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -6.8e+161:
		tmp = a * (t * -4.0)
	elif t <= -1.7e+30:
		tmp = t * (18.0 * (x * (z * y)))
	elif t <= 5.5e+82:
		tmp = (b * c) + (j * (k * -27.0))
	else:
		tmp = t * (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])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -6.8e+161)
		tmp = Float64(a * Float64(t * -4.0));
	elseif (t <= -1.7e+30)
		tmp = Float64(t * Float64(18.0 * Float64(x * Float64(z * y))));
	elseif (t <= 5.5e+82)
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	else
		tmp = Float64(t * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -6.8e+161)
		tmp = a * (t * -4.0);
	elseif (t <= -1.7e+30)
		tmp = t * (18.0 * (x * (z * y)));
	elseif (t <= 5.5e+82)
		tmp = (b * c) + (j * (k * -27.0));
	else
		tmp = t * (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.
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, -6.8e+161], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e+30], N[(t * N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+82], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(a * -4.0), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+161}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.79999999999999986e161

    1. Initial program 75.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. Simplified84.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 87.5%

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative48.0%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. associate-*r*48.0%

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

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

    if -6.79999999999999986e161 < t < -1.7000000000000001e30

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

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

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

    if -1.7000000000000001e30 < t < 5.49999999999999997e82

    1. Initial program 87.9%

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

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

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

    if 5.49999999999999997e82 < t

    1. Initial program 76.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. Simplified88.3%

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative54.3%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. *-commutative54.3%

        \[\leadsto \color{blue}{\left(t \cdot a\right)} \cdot -4 \]
      3. associate-*r*54.3%

        \[\leadsto \color{blue}{t \cdot \left(a \cdot -4\right)} \]
      4. *-commutative54.3%

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a\right)} \]
    7. Simplified54.3%

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification57.0%

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

Alternative 17: 58.9% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [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 -10 \lor \neg \left(t \leq 3.05 \cdot 10^{+78}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \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.
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 -10.0) (not (<= t 3.05e+78)))
   (* t (- (* 18.0 (* x (* z y))) (* a 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);
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 <= -10.0) || !(t <= 3.05e+78)) {
		tmp = t * ((18.0 * (x * (z * y))) - (a * 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.
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 <= (-10.0d0)) .or. (.not. (t <= 3.05d+78))) then
        tmp = t * ((18.0d0 * (x * (z * y))) - (a * 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;
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 <= -10.0) || !(t <= 3.05e+78)) {
		tmp = t * ((18.0 * (x * (z * y))) - (a * 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])
[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 <= -10.0) or not (t <= 3.05e+78):
		tmp = t * ((18.0 * (x * (z * y))) - (a * 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])
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 <= -10.0) || !(t <= 3.05e+78))
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 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])){:}
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 <= -10.0) || ~((t <= 3.05e+78)))
		tmp = t * ((18.0 * (x * (z * y))) - (a * 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.
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, -10.0], N[Not[LessEqual[t, 3.05e+78]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $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])\\\\
[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 -10 \lor \neg \left(t \leq 3.05 \cdot 10^{+78}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \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 t < -10 or 3.05000000000000006e78 < t

    1. Initial program 79.9%

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

    if -10 < t < 3.05000000000000006e78

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

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

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

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

Alternative 18: 33.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])\\\\ [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}\;c \leq -2.65 \cdot 10^{-19}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 5.8 \cdot 10^{+35}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;c \leq 5.7 \cdot 10^{+103}:\\ \;\;\;\;a \cdot \left(t \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.
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 (<= c -2.65e-19)
   (* b c)
   (if (<= c 5.8e+35)
     (* (* j k) -27.0)
     (if (<= c 5.7e+103) (* a (* t -4.0)) (* b c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (c <= -2.65e-19) {
		tmp = b * c;
	} else if (c <= 5.8e+35) {
		tmp = (j * k) * -27.0;
	} else if (c <= 5.7e+103) {
		tmp = a * (t * -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.
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 (c <= (-2.65d-19)) then
        tmp = b * c
    else if (c <= 5.8d+35) then
        tmp = (j * k) * (-27.0d0)
    else if (c <= 5.7d+103) then
        tmp = a * (t * (-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;
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 (c <= -2.65e-19) {
		tmp = b * c;
	} else if (c <= 5.8e+35) {
		tmp = (j * k) * -27.0;
	} else if (c <= 5.7e+103) {
		tmp = a * (t * -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])
[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 c <= -2.65e-19:
		tmp = b * c
	elif c <= 5.8e+35:
		tmp = (j * k) * -27.0
	elif c <= 5.7e+103:
		tmp = a * (t * -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])
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 (c <= -2.65e-19)
		tmp = Float64(b * c);
	elseif (c <= 5.8e+35)
		tmp = Float64(Float64(j * k) * -27.0);
	elseif (c <= 5.7e+103)
		tmp = Float64(a * Float64(t * -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])){:}
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 (c <= -2.65e-19)
		tmp = b * c;
	elseif (c <= 5.8e+35)
		tmp = (j * k) * -27.0;
	elseif (c <= 5.7e+103)
		tmp = a * (t * -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.
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[c, -2.65e-19], N[(b * c), $MachinePrecision], If[LessEqual[c, 5.8e+35], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[c, 5.7e+103], N[(a * N[(t * -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])\\\\
[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}\;c \leq -2.65 \cdot 10^{-19}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;c \leq 5.7 \cdot 10^{+103}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.64999999999999986e-19 or 5.70000000000000033e103 < c

    1. Initial program 83.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 61.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 i around 0 47.0%

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

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

    if -2.64999999999999986e-19 < c < 5.79999999999999989e35

    1. Initial program 84.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. Simplified89.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 j around inf 33.1%

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

    if 5.79999999999999989e35 < c < 5.70000000000000033e103

    1. Initial program 100.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. Simplified100.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 90.5%

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

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

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. associate-*r*42.1%

        \[\leadsto \color{blue}{a \cdot \left(t \cdot -4\right)} \]
    7. Simplified42.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.65 \cdot 10^{-19}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 5.8 \cdot 10^{+35}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;c \leq 5.7 \cdot 10^{+103}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 37.5% 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])\\\\ [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 -4.2 \cdot 10^{+61} \lor \neg \left(b \cdot c \leq 10^{+47}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) -4.2e+61) (not (<= (* b c) 1e+47)))
   (* 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);
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) <= -4.2e+61) || !((b * c) <= 1e+47)) {
		tmp = b * c;
	} else {
		tmp = (j * k) * -27.0;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) <= (-4.2d+61)) .or. (.not. ((b * c) <= 1d+47))) then
        tmp = b * c
    else
        tmp = (j * k) * (-27.0d0)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) <= -4.2e+61) || !((b * c) <= 1e+47)) {
		tmp = b * c;
	} else {
		tmp = (j * k) * -27.0;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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) <= -4.2e+61) or not ((b * c) <= 1e+47):
		tmp = b * c
	else:
		tmp = (j * k) * -27.0
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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) <= -4.2e+61) || !(Float64(b * c) <= 1e+47))
		tmp = Float64(b * c);
	else
		tmp = Float64(Float64(j * k) * -27.0);
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) <= -4.2e+61) || ~(((b * c) <= 1e+47)))
		tmp = b * c;
	else
		tmp = (j * k) * -27.0;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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], -4.2e+61], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1e+47]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 -4.2 \cdot 10^{+61} \lor \neg \left(b \cdot c \leq 10^{+47}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -4.2000000000000002e61 or 1e47 < (*.f64 b c)

    1. Initial program 82.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 65.0%

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

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

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

    if -4.2000000000000002e61 < (*.f64 b c) < 1e47

    1. Initial program 86.2%

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

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

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

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

Alternative 20: 24.2% 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])\\\\ [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.
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);
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.
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;
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])
[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])
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])){:}
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.
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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Derivation
  1. Initial program 84.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 58.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 i around 0 43.9%

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

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

Developer Target 1: 89.7% 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 2024133 
(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)))