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

Percentage Accurate: 85.6% → 90.3%
Time: 32.1s
Alternatives: 24
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 24 alternatives:

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

Initial Program: 85.6% 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: 90.3% 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} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{-245}:\\ \;\;\;\;\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(-4 \cdot i\right)\right)\right) + t_1\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-57}:\\ \;\;\;\;t_1 + \mathsf{fma}\left(x, \mathsf{fma}\left(18, y \cdot \left(t \cdot z\right), -4 \cdot i\right), b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot \left(-4\right)\right), t, b \cdot c - \mathsf{fma}\left(j, k \cdot 27, i \cdot \left(x \cdot 4\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= t -6.5e-245)
     (+
      (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
      t_1)
     (if (<= t 6.4e-57)
       (+ t_1 (fma x (fma 18.0 (* y (* t z)) (* -4.0 i)) (* b c)))
       (fma
        (fma x (* z (* 18.0 y)) (* a (- 4.0)))
        t
        (- (* b c) (fma j (* k 27.0) (* i (* x 4.0)))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double tmp;
	if (t <= -6.5e-245) {
		tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + t_1;
	} else if (t <= 6.4e-57) {
		tmp = t_1 + fma(x, fma(18.0, (y * (t * z)), (-4.0 * i)), (b * c));
	} else {
		tmp = fma(fma(x, (z * (18.0 * y)), (a * -4.0)), t, ((b * c) - fma(j, (k * 27.0), (i * (x * 4.0)))));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	tmp = 0.0
	if (t <= -6.5e-245)
		tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + t_1);
	elseif (t <= 6.4e-57)
		tmp = Float64(t_1 + fma(x, fma(18.0, Float64(y * Float64(t * z)), Float64(-4.0 * i)), Float64(b * c)));
	else
		tmp = fma(fma(x, Float64(z * Float64(18.0 * y)), Float64(a * Float64(-4.0))), t, Float64(Float64(b * c) - fma(j, Float64(k * 27.0), Float64(i * Float64(x * 4.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_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e-245], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 6.4e-57], N[(t$95$1 + N[(x * N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] + N[(a * (-4.0)), $MachinePrecision]), $MachinePrecision] * t + N[(N[(b * c), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision] + N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{-245}:\\
\;\;\;\;\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(-4 \cdot i\right)\right)\right) + t_1\\

\mathbf{elif}\;t \leq 6.4 \cdot 10^{-57}:\\
\;\;\;\;t_1 + \mathsf{fma}\left(x, \mathsf{fma}\left(18, y \cdot \left(t \cdot z\right), -4 \cdot i\right), b \cdot c\right)\\

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


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

    1. Initial program 84.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. Simplified92.2%

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

    if -6.5000000000000004e-245 < t < 6.4000000000000002e-57

    1. Initial program 78.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. Simplified79.9%

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

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

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

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

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

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

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

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

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

    if 6.4000000000000002e-57 < t

    1. Initial program 89.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. Simplified97.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--l+97.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{-245}:\\ \;\;\;\;\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(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-57}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + \mathsf{fma}\left(x, \mathsf{fma}\left(18, y \cdot \left(t \cdot z\right), -4 \cdot i\right), b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot \left(-4\right)\right), t, b \cdot c - \mathsf{fma}\left(j, k \cdot 27, i \cdot \left(x \cdot 4\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.3% 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} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{-245} \lor \neg \left(t \leq 7 \cdot 10^{-57}\right):\\ \;\;\;\;\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(-4 \cdot i\right)\right)\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;t_1 + \mathsf{fma}\left(x, \mathsf{fma}\left(18, y \cdot \left(t \cdot z\right), -4 \cdot i\right), b \cdot c\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 (* j (* k -27.0))))
   (if (or (<= t -6.5e-245) (not (<= t 7e-57)))
     (+
      (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
      t_1)
     (+ t_1 (fma x (fma 18.0 (* y (* t z)) (* -4.0 i)) (* 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 t_1 = j * (k * -27.0);
	double tmp;
	if ((t <= -6.5e-245) || !(t <= 7e-57)) {
		tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + t_1;
	} else {
		tmp = t_1 + fma(x, fma(18.0, (y * (t * z)), (-4.0 * i)), (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)
	t_1 = Float64(j * Float64(k * -27.0))
	tmp = 0.0
	if ((t <= -6.5e-245) || !(t <= 7e-57))
		tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + t_1);
	else
		tmp = Float64(t_1 + fma(x, fma(18.0, Float64(y * Float64(t * z)), Float64(-4.0 * i)), Float64(b * c)));
	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_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -6.5e-245], N[Not[LessEqual[t, 7e-57]], $MachinePrecision]], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(x * N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(b * c), $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 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{-245} \lor \neg \left(t \leq 7 \cdot 10^{-57}\right):\\
\;\;\;\;\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(-4 \cdot i\right)\right)\right) + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.5000000000000004e-245 or 6.99999999999999983e-57 < t

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

    if -6.5000000000000004e-245 < t < 6.99999999999999983e-57

    1. Initial program 78.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. Simplified79.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{-245} \lor \neg \left(t \leq 7 \cdot 10^{-57}\right):\\ \;\;\;\;\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(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + \mathsf{fma}\left(x, \mathsf{fma}\left(18, y \cdot \left(t \cdot z\right), -4 \cdot i\right), b \cdot c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 53.2% accurate, 0.4× 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 := j \cdot \left(k \cdot -27\right)\\ t_2 := t_1 + b \cdot c\\ t_3 := t_1 + -4 \cdot \left(t \cdot a\right)\\ t_4 := t_1 + x \cdot \left(-4 \cdot i\right)\\ t_5 := x \cdot \left(y \cdot z\right)\\ \mathbf{if}\;b \cdot c \leq -4.7 \cdot 10^{+39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -2.7 \cdot 10^{-66}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{-166}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{-177}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \cdot c \leq 1.25 \cdot 10^{-110}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{-44}:\\ \;\;\;\;t_5 \cdot \left(t \cdot 18\right)\\ \mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+35}:\\ \;\;\;\;18 \cdot \left(t \cdot t_5\right)\\ \mathbf{elif}\;b \cdot c \leq 2.25 \cdot 10^{+189}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (+ t_1 (* b c)))
        (t_3 (+ t_1 (* -4.0 (* t a))))
        (t_4 (+ t_1 (* x (* -4.0 i))))
        (t_5 (* x (* y z))))
   (if (<= (* b c) -4.7e+39)
     t_2
     (if (<= (* b c) -2.7e-66)
       t_4
       (if (<= (* b c) -3.3e-166)
         t_3
         (if (<= (* b c) 1.65e-177)
           t_4
           (if (<= (* b c) 1.25e-110)
             t_3
             (if (<= (* b c) 1.4e-44)
               (* t_5 (* t 18.0))
               (if (<= (* b c) 4e+17)
                 t_3
                 (if (<= (* b c) 6.2e+35)
                   (* 18.0 (* t t_5))
                   (if (<= (* b c) 2.25e+189) t_4 t_2)))))))))))
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 = j * (k * -27.0);
	double t_2 = t_1 + (b * c);
	double t_3 = t_1 + (-4.0 * (t * a));
	double t_4 = t_1 + (x * (-4.0 * i));
	double t_5 = x * (y * z);
	double tmp;
	if ((b * c) <= -4.7e+39) {
		tmp = t_2;
	} else if ((b * c) <= -2.7e-66) {
		tmp = t_4;
	} else if ((b * c) <= -3.3e-166) {
		tmp = t_3;
	} else if ((b * c) <= 1.65e-177) {
		tmp = t_4;
	} else if ((b * c) <= 1.25e-110) {
		tmp = t_3;
	} else if ((b * c) <= 1.4e-44) {
		tmp = t_5 * (t * 18.0);
	} else if ((b * c) <= 4e+17) {
		tmp = t_3;
	} else if ((b * c) <= 6.2e+35) {
		tmp = 18.0 * (t * t_5);
	} else if ((b * c) <= 2.25e+189) {
		tmp = t_4;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = t_1 + (b * c)
    t_3 = t_1 + ((-4.0d0) * (t * a))
    t_4 = t_1 + (x * ((-4.0d0) * i))
    t_5 = x * (y * z)
    if ((b * c) <= (-4.7d+39)) then
        tmp = t_2
    else if ((b * c) <= (-2.7d-66)) then
        tmp = t_4
    else if ((b * c) <= (-3.3d-166)) then
        tmp = t_3
    else if ((b * c) <= 1.65d-177) then
        tmp = t_4
    else if ((b * c) <= 1.25d-110) then
        tmp = t_3
    else if ((b * c) <= 1.4d-44) then
        tmp = t_5 * (t * 18.0d0)
    else if ((b * c) <= 4d+17) then
        tmp = t_3
    else if ((b * c) <= 6.2d+35) then
        tmp = 18.0d0 * (t * t_5)
    else if ((b * c) <= 2.25d+189) then
        tmp = t_4
    else
        tmp = t_2
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = t_1 + (b * c);
	double t_3 = t_1 + (-4.0 * (t * a));
	double t_4 = t_1 + (x * (-4.0 * i));
	double t_5 = x * (y * z);
	double tmp;
	if ((b * c) <= -4.7e+39) {
		tmp = t_2;
	} else if ((b * c) <= -2.7e-66) {
		tmp = t_4;
	} else if ((b * c) <= -3.3e-166) {
		tmp = t_3;
	} else if ((b * c) <= 1.65e-177) {
		tmp = t_4;
	} else if ((b * c) <= 1.25e-110) {
		tmp = t_3;
	} else if ((b * c) <= 1.4e-44) {
		tmp = t_5 * (t * 18.0);
	} else if ((b * c) <= 4e+17) {
		tmp = t_3;
	} else if ((b * c) <= 6.2e+35) {
		tmp = 18.0 * (t * t_5);
	} else if ((b * c) <= 2.25e+189) {
		tmp = t_4;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t_1 + (b * c)
	t_3 = t_1 + (-4.0 * (t * a))
	t_4 = t_1 + (x * (-4.0 * i))
	t_5 = x * (y * z)
	tmp = 0
	if (b * c) <= -4.7e+39:
		tmp = t_2
	elif (b * c) <= -2.7e-66:
		tmp = t_4
	elif (b * c) <= -3.3e-166:
		tmp = t_3
	elif (b * c) <= 1.65e-177:
		tmp = t_4
	elif (b * c) <= 1.25e-110:
		tmp = t_3
	elif (b * c) <= 1.4e-44:
		tmp = t_5 * (t * 18.0)
	elif (b * c) <= 4e+17:
		tmp = t_3
	elif (b * c) <= 6.2e+35:
		tmp = 18.0 * (t * t_5)
	elif (b * c) <= 2.25e+189:
		tmp = t_4
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(t_1 + Float64(b * c))
	t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	t_4 = Float64(t_1 + Float64(x * Float64(-4.0 * i)))
	t_5 = Float64(x * Float64(y * z))
	tmp = 0.0
	if (Float64(b * c) <= -4.7e+39)
		tmp = t_2;
	elseif (Float64(b * c) <= -2.7e-66)
		tmp = t_4;
	elseif (Float64(b * c) <= -3.3e-166)
		tmp = t_3;
	elseif (Float64(b * c) <= 1.65e-177)
		tmp = t_4;
	elseif (Float64(b * c) <= 1.25e-110)
		tmp = t_3;
	elseif (Float64(b * c) <= 1.4e-44)
		tmp = Float64(t_5 * Float64(t * 18.0));
	elseif (Float64(b * c) <= 4e+17)
		tmp = t_3;
	elseif (Float64(b * c) <= 6.2e+35)
		tmp = Float64(18.0 * Float64(t * t_5));
	elseif (Float64(b * c) <= 2.25e+189)
		tmp = t_4;
	else
		tmp = t_2;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = t_1 + (b * c);
	t_3 = t_1 + (-4.0 * (t * a));
	t_4 = t_1 + (x * (-4.0 * i));
	t_5 = x * (y * z);
	tmp = 0.0;
	if ((b * c) <= -4.7e+39)
		tmp = t_2;
	elseif ((b * c) <= -2.7e-66)
		tmp = t_4;
	elseif ((b * c) <= -3.3e-166)
		tmp = t_3;
	elseif ((b * c) <= 1.65e-177)
		tmp = t_4;
	elseif ((b * c) <= 1.25e-110)
		tmp = t_3;
	elseif ((b * c) <= 1.4e-44)
		tmp = t_5 * (t * 18.0);
	elseif ((b * c) <= 4e+17)
		tmp = t_3;
	elseif ((b * c) <= 6.2e+35)
		tmp = 18.0 * (t * t_5);
	elseif ((b * c) <= 2.25e+189)
		tmp = t_4;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -4.7e+39], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -2.7e-66], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], -3.3e-166], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.65e-177], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], 1.25e-110], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.4e-44], N[(t$95$5 * N[(t * 18.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e+17], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 6.2e+35], N[(18.0 * N[(t * t$95$5), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.25e+189], t$95$4, t$95$2]]]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + b \cdot c\\
t_3 := t_1 + -4 \cdot \left(t \cdot a\right)\\
t_4 := t_1 + x \cdot \left(-4 \cdot i\right)\\
t_5 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;b \cdot c \leq -4.7 \cdot 10^{+39}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq -2.7 \cdot 10^{-66}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{-166}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{-177}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \cdot c \leq 1.25 \cdot 10^{-110}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{-44}:\\
\;\;\;\;t_5 \cdot \left(t \cdot 18\right)\\

\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+17}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+35}:\\
\;\;\;\;18 \cdot \left(t \cdot t_5\right)\\

\mathbf{elif}\;b \cdot c \leq 2.25 \cdot 10^{+189}:\\
\;\;\;\;t_4\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -4.6999999999999999e39 or 2.24999999999999987e189 < (*.f64 b c)

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

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

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

    if -4.6999999999999999e39 < (*.f64 b c) < -2.69999999999999996e-66 or -3.30000000000000018e-166 < (*.f64 b c) < 1.65e-177 or 6.19999999999999973e35 < (*.f64 b c) < 2.24999999999999987e189

    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. 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 i around inf 62.9%

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

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

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

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

    if -2.69999999999999996e-66 < (*.f64 b c) < -3.30000000000000018e-166 or 1.65e-177 < (*.f64 b c) < 1.25e-110 or 1.4e-44 < (*.f64 b c) < 4e17

    1. Initial program 93.1%

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

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

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

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

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

    if 1.25e-110 < (*.f64 b c) < 1.4e-44

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e17 < (*.f64 b c) < 6.19999999999999973e35

    1. Initial program 50.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. Step-by-step derivation
      1. associate--l+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -4.7 \cdot 10^{+39}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -2.7 \cdot 10^{-66}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{-166}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{-177}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.25 \cdot 10^{-110}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{-44}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot 18\right)\\ \mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+17}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+35}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 2.25 \cdot 10^{+189}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 91.0% accurate, 0.5× speedup?

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

\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 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0

    1. Initial program 96.1%

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

    if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) 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.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 61.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. expm1-log1p-u32.5%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef32.5%

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

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

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

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

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

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

    \[\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(j \cdot 27\right) \leq \infty:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\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 5: 51.4% accurate, 0.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} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t_1 + b \cdot c\\ t_3 := t_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;b \cdot c \leq -5.8 \cdot 10^{-42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq 1.22 \cdot 10^{-110}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 1.5 \cdot 10^{-44}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot 18\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+139}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+169}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 5.6 \cdot 10^{+247}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (+ t_1 (* b c)))
        (t_3 (+ t_1 (* -4.0 (* t a)))))
   (if (<= (* b c) -5.8e-42)
     t_2
     (if (<= (* b c) 1.22e-110)
       t_3
       (if (<= (* b c) 1.5e-44)
         (* (* x (* y z)) (* t 18.0))
         (if (<= (* b c) 5e+139)
           t_3
           (if (<= (* b c) 2.4e+169)
             (* -4.0 (* x i))
             (if (<= (* b c) 5.6e+247) t_3 t_2))))))))
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 = j * (k * -27.0);
	double t_2 = t_1 + (b * c);
	double t_3 = t_1 + (-4.0 * (t * a));
	double tmp;
	if ((b * c) <= -5.8e-42) {
		tmp = t_2;
	} else if ((b * c) <= 1.22e-110) {
		tmp = t_3;
	} else if ((b * c) <= 1.5e-44) {
		tmp = (x * (y * z)) * (t * 18.0);
	} else if ((b * c) <= 5e+139) {
		tmp = t_3;
	} else if ((b * c) <= 2.4e+169) {
		tmp = -4.0 * (x * i);
	} else if ((b * c) <= 5.6e+247) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = t_1 + (b * c)
    t_3 = t_1 + ((-4.0d0) * (t * a))
    if ((b * c) <= (-5.8d-42)) then
        tmp = t_2
    else if ((b * c) <= 1.22d-110) then
        tmp = t_3
    else if ((b * c) <= 1.5d-44) then
        tmp = (x * (y * z)) * (t * 18.0d0)
    else if ((b * c) <= 5d+139) then
        tmp = t_3
    else if ((b * c) <= 2.4d+169) then
        tmp = (-4.0d0) * (x * i)
    else if ((b * c) <= 5.6d+247) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = t_1 + (b * c);
	double t_3 = t_1 + (-4.0 * (t * a));
	double tmp;
	if ((b * c) <= -5.8e-42) {
		tmp = t_2;
	} else if ((b * c) <= 1.22e-110) {
		tmp = t_3;
	} else if ((b * c) <= 1.5e-44) {
		tmp = (x * (y * z)) * (t * 18.0);
	} else if ((b * c) <= 5e+139) {
		tmp = t_3;
	} else if ((b * c) <= 2.4e+169) {
		tmp = -4.0 * (x * i);
	} else if ((b * c) <= 5.6e+247) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t_1 + (b * c)
	t_3 = t_1 + (-4.0 * (t * a))
	tmp = 0
	if (b * c) <= -5.8e-42:
		tmp = t_2
	elif (b * c) <= 1.22e-110:
		tmp = t_3
	elif (b * c) <= 1.5e-44:
		tmp = (x * (y * z)) * (t * 18.0)
	elif (b * c) <= 5e+139:
		tmp = t_3
	elif (b * c) <= 2.4e+169:
		tmp = -4.0 * (x * i)
	elif (b * c) <= 5.6e+247:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(t_1 + Float64(b * c))
	t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	tmp = 0.0
	if (Float64(b * c) <= -5.8e-42)
		tmp = t_2;
	elseif (Float64(b * c) <= 1.22e-110)
		tmp = t_3;
	elseif (Float64(b * c) <= 1.5e-44)
		tmp = Float64(Float64(x * Float64(y * z)) * Float64(t * 18.0));
	elseif (Float64(b * c) <= 5e+139)
		tmp = t_3;
	elseif (Float64(b * c) <= 2.4e+169)
		tmp = Float64(-4.0 * Float64(x * i));
	elseif (Float64(b * c) <= 5.6e+247)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = t_1 + (b * c);
	t_3 = t_1 + (-4.0 * (t * a));
	tmp = 0.0;
	if ((b * c) <= -5.8e-42)
		tmp = t_2;
	elseif ((b * c) <= 1.22e-110)
		tmp = t_3;
	elseif ((b * c) <= 1.5e-44)
		tmp = (x * (y * z)) * (t * 18.0);
	elseif ((b * c) <= 5e+139)
		tmp = t_3;
	elseif ((b * c) <= 2.4e+169)
		tmp = -4.0 * (x * i);
	elseif ((b * c) <= 5.6e+247)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.8e-42], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.22e-110], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.5e-44], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] * N[(t * 18.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+139], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 2.4e+169], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.6e+247], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + b \cdot c\\
t_3 := t_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -5.8 \cdot 10^{-42}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq 1.22 \cdot 10^{-110}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;b \cdot c \leq 5.6 \cdot 10^{+247}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -5.8000000000000006e-42 or 5.59999999999999961e247 < (*.f64 b c)

    1. Initial program 84.0%

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

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

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

    if -5.8000000000000006e-42 < (*.f64 b c) < 1.22e-110 or 1.5000000000000001e-44 < (*.f64 b c) < 5.0000000000000003e139 or 2.3999999999999998e169 < (*.f64 b c) < 5.59999999999999961e247

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

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

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

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

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

    if 1.22e-110 < (*.f64 b c) < 1.5000000000000001e-44

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e139 < (*.f64 b c) < 2.3999999999999998e169

    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. 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. Step-by-step derivation
      1. associate--l+84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.8 \cdot 10^{-42}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 1.22 \cdot 10^{-110}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 1.5 \cdot 10^{-44}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot 18\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+139}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+169}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 5.6 \cdot 10^{+247}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 69.5% accurate, 0.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} t_1 := 4 \cdot \left(x \cdot i\right)\\ t_2 := k \cdot \left(j \cdot 27\right)\\ t_3 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\ \mathbf{if}\;t_2 \leq -4 \cdot 10^{+53}:\\ \;\;\;\;\left(b \cdot c - t_1\right) - t_2\\ \mathbf{elif}\;t_2 \leq 500:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 3 \cdot 10^{+48}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;t_2 \leq 10^{+106}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + 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
 (let* ((t_1 (* 4.0 (* x i)))
        (t_2 (* k (* j 27.0)))
        (t_3 (- (+ (* b c) (* -4.0 (* t a))) t_1)))
   (if (<= t_2 -4e+53)
     (- (- (* b c) t_1) t_2)
     (if (<= t_2 500.0)
       t_3
       (if (<= t_2 3e+48)
         (* x (- (* 18.0 (* z (* t y))) (* i 4.0)))
         (if (<= t_2 1e+106) t_3 (+ (* 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 t_1 = 4.0 * (x * i);
	double t_2 = k * (j * 27.0);
	double t_3 = ((b * c) + (-4.0 * (t * a))) - t_1;
	double tmp;
	if (t_2 <= -4e+53) {
		tmp = ((b * c) - t_1) - t_2;
	} else if (t_2 <= 500.0) {
		tmp = t_3;
	} else if (t_2 <= 3e+48) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (t_2 <= 1e+106) {
		tmp = t_3;
	} else {
		tmp = (j * (k * -27.0)) + (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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = 4.0d0 * (x * i)
    t_2 = k * (j * 27.0d0)
    t_3 = ((b * c) + ((-4.0d0) * (t * a))) - t_1
    if (t_2 <= (-4d+53)) then
        tmp = ((b * c) - t_1) - t_2
    else if (t_2 <= 500.0d0) then
        tmp = t_3
    else if (t_2 <= 3d+48) then
        tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
    else if (t_2 <= 1d+106) then
        tmp = t_3
    else
        tmp = (j * (k * (-27.0d0))) + (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 t_1 = 4.0 * (x * i);
	double t_2 = k * (j * 27.0);
	double t_3 = ((b * c) + (-4.0 * (t * a))) - t_1;
	double tmp;
	if (t_2 <= -4e+53) {
		tmp = ((b * c) - t_1) - t_2;
	} else if (t_2 <= 500.0) {
		tmp = t_3;
	} else if (t_2 <= 3e+48) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (t_2 <= 1e+106) {
		tmp = t_3;
	} else {
		tmp = (j * (k * -27.0)) + (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):
	t_1 = 4.0 * (x * i)
	t_2 = k * (j * 27.0)
	t_3 = ((b * c) + (-4.0 * (t * a))) - t_1
	tmp = 0
	if t_2 <= -4e+53:
		tmp = ((b * c) - t_1) - t_2
	elif t_2 <= 500.0:
		tmp = t_3
	elif t_2 <= 3e+48:
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0))
	elif t_2 <= 1e+106:
		tmp = t_3
	else:
		tmp = (j * (k * -27.0)) + (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)
	t_1 = Float64(4.0 * Float64(x * i))
	t_2 = Float64(k * Float64(j * 27.0))
	t_3 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1)
	tmp = 0.0
	if (t_2 <= -4e+53)
		tmp = Float64(Float64(Float64(b * c) - t_1) - t_2);
	elseif (t_2 <= 500.0)
		tmp = t_3;
	elseif (t_2 <= 3e+48)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0)));
	elseif (t_2 <= 1e+106)
		tmp = t_3;
	else
		tmp = Float64(Float64(j * Float64(k * -27.0)) + 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)
	t_1 = 4.0 * (x * i);
	t_2 = k * (j * 27.0);
	t_3 = ((b * c) + (-4.0 * (t * a))) - t_1;
	tmp = 0.0;
	if (t_2 <= -4e+53)
		tmp = ((b * c) - t_1) - t_2;
	elseif (t_2 <= 500.0)
		tmp = t_3;
	elseif (t_2 <= 3e+48)
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	elseif (t_2 <= 1e+106)
		tmp = t_3;
	else
		tmp = (j * (k * -27.0)) + (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_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+53], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t$95$2, 500.0], t$95$3, If[LessEqual[t$95$2, 3e+48], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+106], t$95$3, N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $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 := 4 \cdot \left(x \cdot i\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
t_3 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{if}\;t_2 \leq -4 \cdot 10^{+53}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - t_2\\

\mathbf{elif}\;t_2 \leq 500:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t_2 \leq 10^{+106}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j 27) k) < -4e53

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

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

    if -4e53 < (*.f64 (*.f64 j 27) k) < 500 or 3e48 < (*.f64 (*.f64 j 27) k) < 1.00000000000000009e106

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 500 < (*.f64 (*.f64 j 27) k) < 3e48

    1. Initial program 61.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. Simplified71.2%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef58.5%

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

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

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

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

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

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

    if 1.00000000000000009e106 < (*.f64 (*.f64 j 27) k)

    1. Initial program 90.3%

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

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

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

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

Alternative 7: 54.8% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{-36}:\\ \;\;\;\;t_1 + b \cdot c\\ \mathbf{elif}\;x \leq 112000000:\\ \;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+135} \lor \neg \left(x \leq 1.6 \cdot 10^{+237}\right):\\ \;\;\;\;t_1 + x \cdot \left(-4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot x\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= x -5.2e+85)
     (* x (- (* 18.0 (* z (* t y))) (* i 4.0)))
     (if (<= x 9.2e-36)
       (+ t_1 (* b c))
       (if (<= x 112000000.0)
         (+ t_1 (* -4.0 (* t a)))
         (if (or (<= x 3.9e+135) (not (<= x 1.6e+237)))
           (+ t_1 (* x (* -4.0 i)))
           (+ t_1 (* 18.0 (* (* y z) (* t x))))))))))
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 = j * (k * -27.0);
	double tmp;
	if (x <= -5.2e+85) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (x <= 9.2e-36) {
		tmp = t_1 + (b * c);
	} else if (x <= 112000000.0) {
		tmp = t_1 + (-4.0 * (t * a));
	} else if ((x <= 3.9e+135) || !(x <= 1.6e+237)) {
		tmp = t_1 + (x * (-4.0 * i));
	} else {
		tmp = t_1 + (18.0 * ((y * z) * (t * x)));
	}
	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 = j * (k * (-27.0d0))
    if (x <= (-5.2d+85)) then
        tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
    else if (x <= 9.2d-36) then
        tmp = t_1 + (b * c)
    else if (x <= 112000000.0d0) then
        tmp = t_1 + ((-4.0d0) * (t * a))
    else if ((x <= 3.9d+135) .or. (.not. (x <= 1.6d+237))) then
        tmp = t_1 + (x * ((-4.0d0) * i))
    else
        tmp = t_1 + (18.0d0 * ((y * z) * (t * x)))
    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 = j * (k * -27.0);
	double tmp;
	if (x <= -5.2e+85) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (x <= 9.2e-36) {
		tmp = t_1 + (b * c);
	} else if (x <= 112000000.0) {
		tmp = t_1 + (-4.0 * (t * a));
	} else if ((x <= 3.9e+135) || !(x <= 1.6e+237)) {
		tmp = t_1 + (x * (-4.0 * i));
	} else {
		tmp = t_1 + (18.0 * ((y * z) * (t * x)));
	}
	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 = j * (k * -27.0)
	tmp = 0
	if x <= -5.2e+85:
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0))
	elif x <= 9.2e-36:
		tmp = t_1 + (b * c)
	elif x <= 112000000.0:
		tmp = t_1 + (-4.0 * (t * a))
	elif (x <= 3.9e+135) or not (x <= 1.6e+237):
		tmp = t_1 + (x * (-4.0 * i))
	else:
		tmp = t_1 + (18.0 * ((y * z) * (t * x)))
	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(j * Float64(k * -27.0))
	tmp = 0.0
	if (x <= -5.2e+85)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0)));
	elseif (x <= 9.2e-36)
		tmp = Float64(t_1 + Float64(b * c));
	elseif (x <= 112000000.0)
		tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a)));
	elseif ((x <= 3.9e+135) || !(x <= 1.6e+237))
		tmp = Float64(t_1 + Float64(x * Float64(-4.0 * i)));
	else
		tmp = Float64(t_1 + Float64(18.0 * Float64(Float64(y * z) * Float64(t * x))));
	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 = j * (k * -27.0);
	tmp = 0.0;
	if (x <= -5.2e+85)
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	elseif (x <= 9.2e-36)
		tmp = t_1 + (b * c);
	elseif (x <= 112000000.0)
		tmp = t_1 + (-4.0 * (t * a));
	elseif ((x <= 3.9e+135) || ~((x <= 1.6e+237)))
		tmp = t_1 + (x * (-4.0 * i));
	else
		tmp = t_1 + (18.0 * ((y * z) * (t * x)));
	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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.2e+85], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.2e-36], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 112000000.0], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 3.9e+135], N[Not[LessEqual[x, 1.6e+237]], $MachinePrecision]], N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -5.2 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\

\mathbf{elif}\;x \leq 9.2 \cdot 10^{-36}:\\
\;\;\;\;t_1 + b \cdot c\\

\mathbf{elif}\;x \leq 112000000:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{+135} \lor \neg \left(x \leq 1.6 \cdot 10^{+237}\right):\\
\;\;\;\;t_1 + x \cdot \left(-4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -5.20000000000000021e85

    1. Initial program 69.6%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef59.8%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p77.5%

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

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

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

    if -5.20000000000000021e85 < x < 9.19999999999999986e-36

    1. Initial program 92.0%

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

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

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

    if 9.19999999999999986e-36 < x < 1.12e8

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

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

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

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

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

    if 1.12e8 < x < 3.90000000000000032e135 or 1.60000000000000009e237 < x

    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. Simplified95.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 i around inf 66.4%

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

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

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

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

    if 3.90000000000000032e135 < x < 1.60000000000000009e237

    1. Initial program 72.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{-36}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;x \leq 112000000:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+135} \lor \neg \left(x \leq 1.6 \cdot 10^{+237}\right):\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 55.0% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;x \leq -8.8 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-37}:\\ \;\;\;\;t_1 + b \cdot c\\ \mathbf{elif}\;x \leq 112000000:\\ \;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 5.3 \cdot 10^{+143} \lor \neg \left(x \leq 1.05 \cdot 10^{+241}\right):\\ \;\;\;\;t_1 + x \cdot \left(-4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + x \cdot \left(\left(t \cdot y\right) \cdot \left(18 \cdot z\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= x -8.8e+85)
     (* x (- (* 18.0 (* z (* t y))) (* i 4.0)))
     (if (<= x 7e-37)
       (+ t_1 (* b c))
       (if (<= x 112000000.0)
         (+ t_1 (* -4.0 (* t a)))
         (if (or (<= x 5.3e+143) (not (<= x 1.05e+241)))
           (+ t_1 (* x (* -4.0 i)))
           (+ t_1 (* x (* (* t y) (* 18.0 z))))))))))
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 = j * (k * -27.0);
	double tmp;
	if (x <= -8.8e+85) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (x <= 7e-37) {
		tmp = t_1 + (b * c);
	} else if (x <= 112000000.0) {
		tmp = t_1 + (-4.0 * (t * a));
	} else if ((x <= 5.3e+143) || !(x <= 1.05e+241)) {
		tmp = t_1 + (x * (-4.0 * i));
	} else {
		tmp = t_1 + (x * ((t * y) * (18.0 * z)));
	}
	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 = j * (k * (-27.0d0))
    if (x <= (-8.8d+85)) then
        tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
    else if (x <= 7d-37) then
        tmp = t_1 + (b * c)
    else if (x <= 112000000.0d0) then
        tmp = t_1 + ((-4.0d0) * (t * a))
    else if ((x <= 5.3d+143) .or. (.not. (x <= 1.05d+241))) then
        tmp = t_1 + (x * ((-4.0d0) * i))
    else
        tmp = t_1 + (x * ((t * y) * (18.0d0 * z)))
    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 = j * (k * -27.0);
	double tmp;
	if (x <= -8.8e+85) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (x <= 7e-37) {
		tmp = t_1 + (b * c);
	} else if (x <= 112000000.0) {
		tmp = t_1 + (-4.0 * (t * a));
	} else if ((x <= 5.3e+143) || !(x <= 1.05e+241)) {
		tmp = t_1 + (x * (-4.0 * i));
	} else {
		tmp = t_1 + (x * ((t * y) * (18.0 * z)));
	}
	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 = j * (k * -27.0)
	tmp = 0
	if x <= -8.8e+85:
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0))
	elif x <= 7e-37:
		tmp = t_1 + (b * c)
	elif x <= 112000000.0:
		tmp = t_1 + (-4.0 * (t * a))
	elif (x <= 5.3e+143) or not (x <= 1.05e+241):
		tmp = t_1 + (x * (-4.0 * i))
	else:
		tmp = t_1 + (x * ((t * y) * (18.0 * z)))
	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(j * Float64(k * -27.0))
	tmp = 0.0
	if (x <= -8.8e+85)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0)));
	elseif (x <= 7e-37)
		tmp = Float64(t_1 + Float64(b * c));
	elseif (x <= 112000000.0)
		tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a)));
	elseif ((x <= 5.3e+143) || !(x <= 1.05e+241))
		tmp = Float64(t_1 + Float64(x * Float64(-4.0 * i)));
	else
		tmp = Float64(t_1 + Float64(x * Float64(Float64(t * y) * Float64(18.0 * z))));
	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 = j * (k * -27.0);
	tmp = 0.0;
	if (x <= -8.8e+85)
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	elseif (x <= 7e-37)
		tmp = t_1 + (b * c);
	elseif (x <= 112000000.0)
		tmp = t_1 + (-4.0 * (t * a));
	elseif ((x <= 5.3e+143) || ~((x <= 1.05e+241)))
		tmp = t_1 + (x * (-4.0 * i));
	else
		tmp = t_1 + (x * ((t * y) * (18.0 * z)));
	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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.8e+85], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7e-37], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 112000000.0], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 5.3e+143], N[Not[LessEqual[x, 1.05e+241]], $MachinePrecision]], N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x * N[(N[(t * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -8.8 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\

\mathbf{elif}\;x \leq 7 \cdot 10^{-37}:\\
\;\;\;\;t_1 + b \cdot c\\

\mathbf{elif}\;x \leq 112000000:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\

\mathbf{elif}\;x \leq 5.3 \cdot 10^{+143} \lor \neg \left(x \leq 1.05 \cdot 10^{+241}\right):\\
\;\;\;\;t_1 + x \cdot \left(-4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -8.8000000000000007e85

    1. Initial program 69.6%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef59.8%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p77.5%

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

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

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

    if -8.8000000000000007e85 < x < 7.0000000000000003e-37

    1. Initial program 92.0%

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

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

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

    if 7.0000000000000003e-37 < x < 1.12e8

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

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

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

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

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

    if 1.12e8 < x < 5.3e143 or 1.05e241 < x

    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. Simplified95.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 i around inf 66.4%

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

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

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

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

    if 5.3e143 < x < 1.05e241

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-37}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;x \leq 112000000:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 5.3 \cdot 10^{+143} \lor \neg \left(x \leq 1.05 \cdot 10^{+241}\right):\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(\left(t \cdot y\right) \cdot \left(18 \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.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 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ t_2 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 10^{-217}:\\ \;\;\;\;t_2 + b \cdot c\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+112}:\\ \;\;\;\;t_2 + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+162}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\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) (* -4.0 (* t a))) (* 4.0 (* x i))))
        (t_2 (* j (* k -27.0))))
   (if (<= x -5.2e+85)
     (* x (- (* 18.0 (* z (* t y))) (* i 4.0)))
     (if (<= x 1e-217)
       (+ t_2 (* b c))
       (if (<= x 1.3e+59)
         t_1
         (if (<= x 1.7e+112)
           (+ t_2 (* x (* -4.0 i)))
           (if (<= x 1.2e+162)
             t_1
             (* x (- (* 18.0 (* t (* y z))) (* 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) + (-4.0 * (t * a))) - (4.0 * (x * i));
	double t_2 = j * (k * -27.0);
	double tmp;
	if (x <= -5.2e+85) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (x <= 1e-217) {
		tmp = t_2 + (b * c);
	} else if (x <= 1.3e+59) {
		tmp = t_1;
	} else if (x <= 1.7e+112) {
		tmp = t_2 + (x * (-4.0 * i));
	} else if (x <= 1.2e+162) {
		tmp = t_1;
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))
    t_2 = j * (k * (-27.0d0))
    if (x <= (-5.2d+85)) then
        tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
    else if (x <= 1d-217) then
        tmp = t_2 + (b * c)
    else if (x <= 1.3d+59) then
        tmp = t_1
    else if (x <= 1.7d+112) then
        tmp = t_2 + (x * ((-4.0d0) * i))
    else if (x <= 1.2d+162) then
        tmp = t_1
    else
        tmp = x * ((18.0d0 * (t * (y * z))) - (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 t_1 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	double t_2 = j * (k * -27.0);
	double tmp;
	if (x <= -5.2e+85) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (x <= 1e-217) {
		tmp = t_2 + (b * c);
	} else if (x <= 1.3e+59) {
		tmp = t_1;
	} else if (x <= 1.7e+112) {
		tmp = t_2 + (x * (-4.0 * i));
	} else if (x <= 1.2e+162) {
		tmp = t_1;
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (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) + (-4.0 * (t * a))) - (4.0 * (x * i))
	t_2 = j * (k * -27.0)
	tmp = 0
	if x <= -5.2e+85:
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0))
	elif x <= 1e-217:
		tmp = t_2 + (b * c)
	elif x <= 1.3e+59:
		tmp = t_1
	elif x <= 1.7e+112:
		tmp = t_2 + (x * (-4.0 * i))
	elif x <= 1.2e+162:
		tmp = t_1
	else:
		tmp = x * ((18.0 * (t * (y * z))) - (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(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i)))
	t_2 = Float64(j * Float64(k * -27.0))
	tmp = 0.0
	if (x <= -5.2e+85)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0)));
	elseif (x <= 1e-217)
		tmp = Float64(t_2 + Float64(b * c));
	elseif (x <= 1.3e+59)
		tmp = t_1;
	elseif (x <= 1.7e+112)
		tmp = Float64(t_2 + Float64(x * Float64(-4.0 * i)));
	elseif (x <= 1.2e+162)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - 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) + (-4.0 * (t * a))) - (4.0 * (x * i));
	t_2 = j * (k * -27.0);
	tmp = 0.0;
	if (x <= -5.2e+85)
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	elseif (x <= 1e-217)
		tmp = t_2 + (b * c);
	elseif (x <= 1.3e+59)
		tmp = t_1;
	elseif (x <= 1.7e+112)
		tmp = t_2 + (x * (-4.0 * i));
	elseif (x <= 1.2e+162)
		tmp = t_1;
	else
		tmp = x * ((18.0 * (t * (y * z))) - (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[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.2e+85], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e-217], N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+59], t$95$1, If[LessEqual[x, 1.7e+112], N[(t$95$2 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e+162], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $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(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -5.2 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\

\mathbf{elif}\;x \leq 10^{-217}:\\
\;\;\;\;t_2 + b \cdot c\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{+59}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.2 \cdot 10^{+162}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -5.20000000000000021e85

    1. Initial program 69.6%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef59.8%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p77.5%

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

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

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

    if -5.20000000000000021e85 < x < 1.00000000000000008e-217

    1. Initial program 92.0%

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

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

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

    if 1.00000000000000008e-217 < x < 1.3e59 or 1.69999999999999997e112 < x < 1.20000000000000005e162

    1. Initial program 89.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}{\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--l+90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e59 < x < 1.69999999999999997e112

    1. Initial program 88.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. Simplified94.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 i around inf 76.8%

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

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

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

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

    if 1.20000000000000005e162 < x

    1. Initial program 73.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. Simplified80.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 77.1%

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.38000000000000007e73 or 3.40000000000000001e-93 < t < 1.39999999999999999e-42 or 5.1e7 < t

    1. Initial program 79.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. Simplified92.3%

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

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

    if -1.38000000000000007e73 < t < 3.40000000000000001e-93 or 1.39999999999999999e-42 < t < 5.1e7

    1. Initial program 88.5%

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

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

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

Alternative 11: 75.4% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-97}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-43}:\\
\;\;\;\;\left(18 \cdot \left(t \cdot t_1\right) - 4 \cdot \left(t \cdot a\right)\right) - t_2\\

\mathbf{elif}\;t \leq 57000000:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35e73 or 5.7e7 < t

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

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

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

    if -1.35e73 < t < 5.7999999999999999e-97 or 1.25000000000000005e-43 < t < 5.7e7

    1. Initial program 88.5%

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

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

    if 5.7999999999999999e-97 < t < 1.25000000000000005e-43

    1. Initial program 82.2%

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

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

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

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

Alternative 12: 58.0% accurate, 0.8× speedup?

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

\mathbf{elif}\;x \leq 1.28 \cdot 10^{-36}:\\
\;\;\;\;t_2 + b \cdot c\\

\mathbf{elif}\;x \leq 96000000:\\
\;\;\;\;t_2 + -4 \cdot \left(t \cdot a\right)\\

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

\mathbf{elif}\;x \leq 2.15 \cdot 10^{+131}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -8.4999999999999994e85 or 2.1500000000000001e131 < x

    1. Initial program 71.2%

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

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

    if -8.4999999999999994e85 < x < 1.28e-36

    1. Initial program 92.0%

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

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

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

    if 1.28e-36 < x < 9.6e7

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

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

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

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

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

    if 9.6e7 < x < 1.9000000000000002e131

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

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

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

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

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

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

    if 1.9000000000000002e131 < x < 2.1500000000000001e131

    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. Step-by-step derivation
      1. associate--l+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 58.1% 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 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;x \leq -6 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-36}:\\ \;\;\;\;t_1 + b \cdot c\\ \mathbf{elif}\;x \leq 62000000:\\ \;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+131}:\\ \;\;\;\;t_1 + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;x \leq 2.15 \cdot 10^{+131}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\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 (* j (* k -27.0))))
   (if (<= x -6e+85)
     (* x (- (* 18.0 (* z (* t y))) (* i 4.0)))
     (if (<= x 3.9e-36)
       (+ t_1 (* b c))
       (if (<= x 62000000.0)
         (+ t_1 (* -4.0 (* t a)))
         (if (<= x 2.1e+131)
           (+ t_1 (* x (* -4.0 i)))
           (if (<= x 2.15e+131)
             (* t (* a -4.0))
             (* x (- (* 18.0 (* t (* y z))) (* 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 = j * (k * -27.0);
	double tmp;
	if (x <= -6e+85) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (x <= 3.9e-36) {
		tmp = t_1 + (b * c);
	} else if (x <= 62000000.0) {
		tmp = t_1 + (-4.0 * (t * a));
	} else if (x <= 2.1e+131) {
		tmp = t_1 + (x * (-4.0 * i));
	} else if (x <= 2.15e+131) {
		tmp = t * (a * -4.0);
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (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) :: t_1
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    if (x <= (-6d+85)) then
        tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
    else if (x <= 3.9d-36) then
        tmp = t_1 + (b * c)
    else if (x <= 62000000.0d0) then
        tmp = t_1 + ((-4.0d0) * (t * a))
    else if (x <= 2.1d+131) then
        tmp = t_1 + (x * ((-4.0d0) * i))
    else if (x <= 2.15d+131) then
        tmp = t * (a * (-4.0d0))
    else
        tmp = x * ((18.0d0 * (t * (y * z))) - (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 t_1 = j * (k * -27.0);
	double tmp;
	if (x <= -6e+85) {
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	} else if (x <= 3.9e-36) {
		tmp = t_1 + (b * c);
	} else if (x <= 62000000.0) {
		tmp = t_1 + (-4.0 * (t * a));
	} else if (x <= 2.1e+131) {
		tmp = t_1 + (x * (-4.0 * i));
	} else if (x <= 2.15e+131) {
		tmp = t * (a * -4.0);
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (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 = j * (k * -27.0)
	tmp = 0
	if x <= -6e+85:
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0))
	elif x <= 3.9e-36:
		tmp = t_1 + (b * c)
	elif x <= 62000000.0:
		tmp = t_1 + (-4.0 * (t * a))
	elif x <= 2.1e+131:
		tmp = t_1 + (x * (-4.0 * i))
	elif x <= 2.15e+131:
		tmp = t * (a * -4.0)
	else:
		tmp = x * ((18.0 * (t * (y * z))) - (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(j * Float64(k * -27.0))
	tmp = 0.0
	if (x <= -6e+85)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0)));
	elseif (x <= 3.9e-36)
		tmp = Float64(t_1 + Float64(b * c));
	elseif (x <= 62000000.0)
		tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a)));
	elseif (x <= 2.1e+131)
		tmp = Float64(t_1 + Float64(x * Float64(-4.0 * i)));
	elseif (x <= 2.15e+131)
		tmp = Float64(t * Float64(a * -4.0));
	else
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - 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 = j * (k * -27.0);
	tmp = 0.0;
	if (x <= -6e+85)
		tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
	elseif (x <= 3.9e-36)
		tmp = t_1 + (b * c);
	elseif (x <= 62000000.0)
		tmp = t_1 + (-4.0 * (t * a));
	elseif (x <= 2.1e+131)
		tmp = t_1 + (x * (-4.0 * i));
	elseif (x <= 2.15e+131)
		tmp = t * (a * -4.0);
	else
		tmp = x * ((18.0 * (t * (y * z))) - (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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6e+85], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e-36], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 62000000.0], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+131], N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.15e+131], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $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 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{-36}:\\
\;\;\;\;t_1 + b \cdot c\\

\mathbf{elif}\;x \leq 62000000:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\

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

\mathbf{elif}\;x \leq 2.15 \cdot 10^{+131}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -6.0000000000000001e85

    1. Initial program 69.6%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef59.8%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p77.5%

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

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

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

    if -6.0000000000000001e85 < x < 3.9000000000000001e-36

    1. Initial program 92.0%

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

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

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

    if 3.9000000000000001e-36 < x < 6.2e7

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

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

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

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

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

    if 6.2e7 < x < 2.09999999999999985e131

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

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

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

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

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

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

    if 2.09999999999999985e131 < x < 2.1500000000000001e131

    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. Step-by-step derivation
      1. associate--l+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1500000000000001e131 < x

    1. Initial program 73.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. Simplified79.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 70.9%

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

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

Alternative 14: 81.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} t_1 := k \cdot \left(j \cdot 27\right)\\ t_2 := 4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;i \leq -8.5 \cdot 10^{-140} \lor \neg \left(i \leq 5.5 \cdot 10^{-16}\right):\\ \;\;\;\;\left(b \cdot c - \left(t_2 + 4 \cdot \left(x \cdot i\right)\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - t_2\right) - t_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* k (* j 27.0))) (t_2 (* 4.0 (* t a))))
   (if (or (<= i -8.5e-140) (not (<= i 5.5e-16)))
     (- (- (* b c) (+ t_2 (* 4.0 (* x i)))) t_1)
     (- (- (+ (* b c) (* 18.0 (* t (* x (* y z))))) t_2) 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 = k * (j * 27.0);
	double t_2 = 4.0 * (t * a);
	double tmp;
	if ((i <= -8.5e-140) || !(i <= 5.5e-16)) {
		tmp = ((b * c) - (t_2 + (4.0 * (x * i)))) - t_1;
	} else {
		tmp = (((b * c) + (18.0 * (t * (x * (y * z))))) - t_2) - 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) :: t_2
    real(8) :: tmp
    t_1 = k * (j * 27.0d0)
    t_2 = 4.0d0 * (t * a)
    if ((i <= (-8.5d-140)) .or. (.not. (i <= 5.5d-16))) then
        tmp = ((b * c) - (t_2 + (4.0d0 * (x * i)))) - t_1
    else
        tmp = (((b * c) + (18.0d0 * (t * (x * (y * z))))) - t_2) - 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 = k * (j * 27.0);
	double t_2 = 4.0 * (t * a);
	double tmp;
	if ((i <= -8.5e-140) || !(i <= 5.5e-16)) {
		tmp = ((b * c) - (t_2 + (4.0 * (x * i)))) - t_1;
	} else {
		tmp = (((b * c) + (18.0 * (t * (x * (y * z))))) - t_2) - 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 = k * (j * 27.0)
	t_2 = 4.0 * (t * a)
	tmp = 0
	if (i <= -8.5e-140) or not (i <= 5.5e-16):
		tmp = ((b * c) - (t_2 + (4.0 * (x * i)))) - t_1
	else:
		tmp = (((b * c) + (18.0 * (t * (x * (y * z))))) - t_2) - 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(k * Float64(j * 27.0))
	t_2 = Float64(4.0 * Float64(t * a))
	tmp = 0.0
	if ((i <= -8.5e-140) || !(i <= 5.5e-16))
		tmp = Float64(Float64(Float64(b * c) - Float64(t_2 + Float64(4.0 * Float64(x * i)))) - t_1);
	else
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))) - t_2) - 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 = k * (j * 27.0);
	t_2 = 4.0 * (t * a);
	tmp = 0.0;
	if ((i <= -8.5e-140) || ~((i <= 5.5e-16)))
		tmp = ((b * c) - (t_2 + (4.0 * (x * i)))) - t_1;
	else
		tmp = (((b * c) + (18.0 * (t * (x * (y * z))))) - t_2) - 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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[i, -8.5e-140], N[Not[LessEqual[i, 5.5e-16]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(t$95$2 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
t_2 := 4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;i \leq -8.5 \cdot 10^{-140} \lor \neg \left(i \leq 5.5 \cdot 10^{-16}\right):\\
\;\;\;\;\left(b \cdot c - \left(t_2 + 4 \cdot \left(x \cdot i\right)\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -8.49999999999999997e-140 or 5.49999999999999964e-16 < i

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

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

    if -8.49999999999999997e-140 < i < 5.49999999999999964e-16

    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 i around 0 88.1%

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

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

Alternative 15: 59.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} t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ t_2 := j \cdot \left(k \cdot -27\right)\\ t_3 := t_2 + b \cdot c\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{+86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-189}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-121}:\\ \;\;\;\;t_2 + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;t \leq 520000000:\\ \;\;\;\;t_3\\ \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 (* y z))) (* a 4.0))))
        (t_2 (* j (* k -27.0)))
        (t_3 (+ t_2 (* b c))))
   (if (<= t -5.5e+86)
     t_1
     (if (<= t 6.8e-189)
       t_3
       (if (<= t 3.6e-121)
         (+ t_2 (* x (* -4.0 i)))
         (if (<= t 520000000.0) t_3 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 * (y * z))) - (a * 4.0));
	double t_2 = j * (k * -27.0);
	double t_3 = t_2 + (b * c);
	double tmp;
	if (t <= -5.5e+86) {
		tmp = t_1;
	} else if (t <= 6.8e-189) {
		tmp = t_3;
	} else if (t <= 3.6e-121) {
		tmp = t_2 + (x * (-4.0 * i));
	} else if (t <= 520000000.0) {
		tmp = t_3;
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    t_2 = j * (k * (-27.0d0))
    t_3 = t_2 + (b * c)
    if (t <= (-5.5d+86)) then
        tmp = t_1
    else if (t <= 6.8d-189) then
        tmp = t_3
    else if (t <= 3.6d-121) then
        tmp = t_2 + (x * ((-4.0d0) * i))
    else if (t <= 520000000.0d0) then
        tmp = t_3
    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 * (y * z))) - (a * 4.0));
	double t_2 = j * (k * -27.0);
	double t_3 = t_2 + (b * c);
	double tmp;
	if (t <= -5.5e+86) {
		tmp = t_1;
	} else if (t <= 6.8e-189) {
		tmp = t_3;
	} else if (t <= 3.6e-121) {
		tmp = t_2 + (x * (-4.0 * i));
	} else if (t <= 520000000.0) {
		tmp = t_3;
	} 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 * (y * z))) - (a * 4.0))
	t_2 = j * (k * -27.0)
	t_3 = t_2 + (b * c)
	tmp = 0
	if t <= -5.5e+86:
		tmp = t_1
	elif t <= 6.8e-189:
		tmp = t_3
	elif t <= 3.6e-121:
		tmp = t_2 + (x * (-4.0 * i))
	elif t <= 520000000.0:
		tmp = t_3
	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(y * z))) - Float64(a * 4.0)))
	t_2 = Float64(j * Float64(k * -27.0))
	t_3 = Float64(t_2 + Float64(b * c))
	tmp = 0.0
	if (t <= -5.5e+86)
		tmp = t_1;
	elseif (t <= 6.8e-189)
		tmp = t_3;
	elseif (t <= 3.6e-121)
		tmp = Float64(t_2 + Float64(x * Float64(-4.0 * i)));
	elseif (t <= 520000000.0)
		tmp = t_3;
	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 * (y * z))) - (a * 4.0));
	t_2 = j * (k * -27.0);
	t_3 = t_2 + (b * c);
	tmp = 0.0;
	if (t <= -5.5e+86)
		tmp = t_1;
	elseif (t <= 6.8e-189)
		tmp = t_3;
	elseif (t <= 3.6e-121)
		tmp = t_2 + (x * (-4.0 * i));
	elseif (t <= 520000000.0)
		tmp = t_3;
	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[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+86], t$95$1, If[LessEqual[t, 6.8e-189], t$95$3, If[LessEqual[t, 3.6e-121], N[(t$95$2 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 520000000.0], t$95$3, 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(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t_2 + b \cdot c\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+86}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6.8 \cdot 10^{-189}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 3.6 \cdot 10^{-121}:\\
\;\;\;\;t_2 + x \cdot \left(-4 \cdot i\right)\\

\mathbf{elif}\;t \leq 520000000:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.5000000000000002e86 or 5.2e8 < t

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000002e86 < t < 6.8000000000000002e-189 or 3.59999999999999984e-121 < t < 5.2e8

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

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

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

    if 6.8000000000000002e-189 < t < 3.59999999999999984e-121

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

\mathbf{elif}\;k \leq 7.4 \cdot 10^{+74}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\right) - t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -3.90000000000000001e-118

    1. Initial program 82.2%

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

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

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

    if -3.90000000000000001e-118 < k < 7.4000000000000002e74

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

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

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

    if 7.4000000000000002e74 < k

    1. Initial program 92.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 92.1%

      \[\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 \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.3%

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

Alternative 17: 79.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 69.6%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef59.8%

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p77.5%

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

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

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

    if -3.2999999999999999e86 < x < 6.00000000000000023e167

    1. Initial program 90.5%

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

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

    if 6.00000000000000023e167 < x

    1. Initial program 73.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. Simplified80.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 77.1%

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

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

Alternative 18: 33.8% accurate, 1.1× speedup?

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

\mathbf{elif}\;k \leq 1.4 \cdot 10^{-196}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;k \leq 9.5 \cdot 10^{-123}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\

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

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


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

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

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

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

    if -1.45e-60 < k < 1.3999999999999999e-196

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3999999999999999e-196 < k < 9.5000000000000002e-123

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5000000000000002e-123 < k < 3.29999999999999998e75

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.29999999999999998e75 < k

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.45 \cdot 10^{-60}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{-196}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 9.5 \cdot 10^{-123}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 3.3 \cdot 10^{+75}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 33.5% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [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 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;k \leq -1.45 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 1.5 \cdot 10^{-196}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 8 \cdot 10^{+21}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 6.8 \cdot 10^{+96}:\\ \;\;\;\;b \cdot c\\ \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 (* -27.0 (* j k))))
   (if (<= k -1.45e-60)
     t_1
     (if (<= k 1.5e-196)
       (* b c)
       (if (<= k 8e+21) (* -4.0 (* x i)) (if (<= k 6.8e+96) (* b c) 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 = -27.0 * (j * k);
	double tmp;
	if (k <= -1.45e-60) {
		tmp = t_1;
	} else if (k <= 1.5e-196) {
		tmp = b * c;
	} else if (k <= 8e+21) {
		tmp = -4.0 * (x * i);
	} else if (k <= 6.8e+96) {
		tmp = b * c;
	} 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 = (-27.0d0) * (j * k)
    if (k <= (-1.45d-60)) then
        tmp = t_1
    else if (k <= 1.5d-196) then
        tmp = b * c
    else if (k <= 8d+21) then
        tmp = (-4.0d0) * (x * i)
    else if (k <= 6.8d+96) then
        tmp = b * c
    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 = -27.0 * (j * k);
	double tmp;
	if (k <= -1.45e-60) {
		tmp = t_1;
	} else if (k <= 1.5e-196) {
		tmp = b * c;
	} else if (k <= 8e+21) {
		tmp = -4.0 * (x * i);
	} else if (k <= 6.8e+96) {
		tmp = b * c;
	} 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 = -27.0 * (j * k)
	tmp = 0
	if k <= -1.45e-60:
		tmp = t_1
	elif k <= 1.5e-196:
		tmp = b * c
	elif k <= 8e+21:
		tmp = -4.0 * (x * i)
	elif k <= 6.8e+96:
		tmp = b * c
	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(-27.0 * Float64(j * k))
	tmp = 0.0
	if (k <= -1.45e-60)
		tmp = t_1;
	elseif (k <= 1.5e-196)
		tmp = Float64(b * c);
	elseif (k <= 8e+21)
		tmp = Float64(-4.0 * Float64(x * i));
	elseif (k <= 6.8e+96)
		tmp = Float64(b * c);
	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 = -27.0 * (j * k);
	tmp = 0.0;
	if (k <= -1.45e-60)
		tmp = t_1;
	elseif (k <= 1.5e-196)
		tmp = b * c;
	elseif (k <= 8e+21)
		tmp = -4.0 * (x * i);
	elseif (k <= 6.8e+96)
		tmp = b * c;
	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[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.45e-60], t$95$1, If[LessEqual[k, 1.5e-196], N[(b * c), $MachinePrecision], If[LessEqual[k, 8e+21], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.8e+96], N[(b * c), $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 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;k \leq -1.45 \cdot 10^{-60}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;k \leq 1.5 \cdot 10^{-196}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;k \leq 6.8 \cdot 10^{+96}:\\
\;\;\;\;b \cdot c\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -1.45e-60 or 6.8000000000000002e96 < k

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

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

    if -1.45e-60 < k < 1.5e-196 or 8e21 < k < 6.8000000000000002e96

    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. 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. Step-by-step derivation
      1. associate--l+88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e-196 < k < 8e21

    1. Initial program 79.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. 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. Step-by-step derivation
      1. associate--l+88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.45 \cdot 10^{-60}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1.5 \cdot 10^{-196}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 8 \cdot 10^{+21}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 6.8 \cdot 10^{+96}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 33.5% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [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.4 \cdot 10^{-60}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{-196}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 1.1 \cdot 10^{+22}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 7.2 \cdot 10^{+96}:\\ \;\;\;\;b \cdot c\\ \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 -1.4e-60)
   (* -27.0 (* j k))
   (if (<= k 1.4e-196)
     (* b c)
     (if (<= k 1.1e+22)
       (* -4.0 (* x i))
       (if (<= k 7.2e+96) (* 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 (k <= -1.4e-60) {
		tmp = -27.0 * (j * k);
	} else if (k <= 1.4e-196) {
		tmp = b * c;
	} else if (k <= 1.1e+22) {
		tmp = -4.0 * (x * i);
	} else if (k <= 7.2e+96) {
		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 (k <= (-1.4d-60)) then
        tmp = (-27.0d0) * (j * k)
    else if (k <= 1.4d-196) then
        tmp = b * c
    else if (k <= 1.1d+22) then
        tmp = (-4.0d0) * (x * i)
    else if (k <= 7.2d+96) 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 (k <= -1.4e-60) {
		tmp = -27.0 * (j * k);
	} else if (k <= 1.4e-196) {
		tmp = b * c;
	} else if (k <= 1.1e+22) {
		tmp = -4.0 * (x * i);
	} else if (k <= 7.2e+96) {
		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 k <= -1.4e-60:
		tmp = -27.0 * (j * k)
	elif k <= 1.4e-196:
		tmp = b * c
	elif k <= 1.1e+22:
		tmp = -4.0 * (x * i)
	elif k <= 7.2e+96:
		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 (k <= -1.4e-60)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (k <= 1.4e-196)
		tmp = Float64(b * c);
	elseif (k <= 1.1e+22)
		tmp = Float64(-4.0 * Float64(x * i));
	elseif (k <= 7.2e+96)
		tmp = Float64(b * c);
	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 <= -1.4e-60)
		tmp = -27.0 * (j * k);
	elseif (k <= 1.4e-196)
		tmp = b * c;
	elseif (k <= 1.1e+22)
		tmp = -4.0 * (x * i);
	elseif (k <= 7.2e+96)
		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[LessEqual[k, -1.4e-60], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.4e-196], N[(b * c), $MachinePrecision], If[LessEqual[k, 1.1e+22], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+96], N[(b * c), $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.4 \cdot 10^{-60}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;k \leq 1.4 \cdot 10^{-196}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;k \leq 7.2 \cdot 10^{+96}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -1.4000000000000001e-60

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

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

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

    if -1.4000000000000001e-60 < k < 1.3999999999999999e-196 or 1.1e22 < k < 7.20000000000000026e96

    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. 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. Step-by-step derivation
      1. associate--l+88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3999999999999999e-196 < k < 1.1e22

    1. Initial program 79.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. 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. Step-by-step derivation
      1. associate--l+88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.20000000000000026e96 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.4 \cdot 10^{-60}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{-196}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 1.1 \cdot 10^{+22}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 7.2 \cdot 10^{+96}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 33.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}\;k \leq -1.22 \cdot 10^{-60}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{-196}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 3.2 \cdot 10^{+22}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 7.8 \cdot 10^{+97}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 -1.22e-60)
   (* -27.0 (* j k))
   (if (<= k 1.4e-196)
     (* b c)
     (if (<= k 3.2e+22)
       (* -4.0 (* x i))
       (if (<= k 7.8e+97) (* b c) (* k (* j -27.0)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -1.22e-60) {
		tmp = -27.0 * (j * k);
	} else if (k <= 1.4e-196) {
		tmp = b * c;
	} else if (k <= 3.2e+22) {
		tmp = -4.0 * (x * i);
	} else if (k <= 7.8e+97) {
		tmp = b * c;
	} else {
		tmp = k * (j * -27.0);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-1.22d-60)) then
        tmp = (-27.0d0) * (j * k)
    else if (k <= 1.4d-196) then
        tmp = b * c
    else if (k <= 3.2d+22) then
        tmp = (-4.0d0) * (x * i)
    else if (k <= 7.8d+97) then
        tmp = b * c
    else
        tmp = k * (j * (-27.0d0))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -1.22e-60) {
		tmp = -27.0 * (j * k);
	} else if (k <= 1.4e-196) {
		tmp = b * c;
	} else if (k <= 3.2e+22) {
		tmp = -4.0 * (x * i);
	} else if (k <= 7.8e+97) {
		tmp = b * c;
	} else {
		tmp = k * (j * -27.0);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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 <= -1.22e-60:
		tmp = -27.0 * (j * k)
	elif k <= 1.4e-196:
		tmp = b * c
	elif k <= 3.2e+22:
		tmp = -4.0 * (x * i)
	elif k <= 7.8e+97:
		tmp = b * c
	else:
		tmp = k * (j * -27.0)
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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 <= -1.22e-60)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (k <= 1.4e-196)
		tmp = Float64(b * c);
	elseif (k <= 3.2e+22)
		tmp = Float64(-4.0 * Float64(x * i));
	elseif (k <= 7.8e+97)
		tmp = Float64(b * c);
	else
		tmp = Float64(k * Float64(j * -27.0));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -1.22e-60)
		tmp = -27.0 * (j * k);
	elseif (k <= 1.4e-196)
		tmp = b * c;
	elseif (k <= 3.2e+22)
		tmp = -4.0 * (x * i);
	elseif (k <= 7.8e+97)
		tmp = b * c;
	else
		tmp = k * (j * -27.0);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, -1.22e-60], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.4e-196], N[(b * c), $MachinePrecision], If[LessEqual[k, 3.2e+22], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.8e+97], N[(b * c), $MachinePrecision], N[(k * N[(j * -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.22 \cdot 10^{-60}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;k \leq 1.4 \cdot 10^{-196}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;k \leq 7.8 \cdot 10^{+97}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -1.22e-60

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

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

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

    if -1.22e-60 < k < 1.3999999999999999e-196 or 3.2e22 < k < 7.7999999999999999e97

    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. 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. Step-by-step derivation
      1. associate--l+88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3999999999999999e-196 < k < 3.2e22

    1. Initial program 79.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. 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. Step-by-step derivation
      1. associate--l+88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999999e97 < k

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.22 \cdot 10^{-60}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{-196}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 3.2 \cdot 10^{+22}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 7.8 \cdot 10^{+97}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 47.9% accurate, 1.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2999999999999999e89 < x < 1.90000000000000008e126

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

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

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

    if 1.90000000000000008e126 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 23: 33.4% accurate, 2.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}\;k \leq -1.45 \cdot 10^{-60} \lor \neg \left(k \leq 1.25 \cdot 10^{+98}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\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 (or (<= k -1.45e-60) (not (<= k 1.25e+98))) (* -27.0 (* j k)) (* 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 ((k <= -1.45e-60) || !(k <= 1.25e+98)) {
		tmp = -27.0 * (j * k);
	} 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 ((k <= (-1.45d-60)) .or. (.not. (k <= 1.25d+98))) then
        tmp = (-27.0d0) * (j * k)
    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 ((k <= -1.45e-60) || !(k <= 1.25e+98)) {
		tmp = -27.0 * (j * k);
	} 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 (k <= -1.45e-60) or not (k <= 1.25e+98):
		tmp = -27.0 * (j * k)
	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 ((k <= -1.45e-60) || !(k <= 1.25e+98))
		tmp = Float64(-27.0 * Float64(j * k));
	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 ((k <= -1.45e-60) || ~((k <= 1.25e+98)))
		tmp = -27.0 * (j * k);
	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[Or[LessEqual[k, -1.45e-60], N[Not[LessEqual[k, 1.25e+98]], $MachinePrecision]], N[(-27.0 * N[(j * k), $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}\;k \leq -1.45 \cdot 10^{-60} \lor \neg \left(k \leq 1.25 \cdot 10^{+98}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -1.45e-60 or 1.25e98 < k

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

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

    if -1.45e-60 < k < 1.25e98

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 24: 23.5% 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.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{b \cdot c} \]
  7. Final simplification25.9%

    \[\leadsto b \cdot c \]
  8. Add Preprocessing

Developer target: 89.4% accurate, 0.8× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}

Reproduce

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

  :herbie-target
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

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