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

Percentage Accurate: 84.8% → 90.5%
Time: 20.9s
Alternatives: 23
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 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: 84.8% 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.5% 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])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;y \leq -6.3 \cdot 10^{+162}:\\ \;\;\;\;y \cdot \left(\left(-4 \cdot \frac{a \cdot t}{y} + \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right) + \frac{b \cdot c}{y}\right)\right) - \left(4 \cdot \frac{x \cdot i}{y} + 27 \cdot \frac{j \cdot k}{y}\right)\right)\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{+33}:\\ \;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_1 + z \cdot \left(\left(-4 \cdot \left(i \cdot \frac{x}{z}\right) + \left(t \cdot 18\right) \cdot \left(y \cdot x\right)\right) + \frac{\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)}{z}\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= y -6.3e+162)
     (*
      y
      (-
       (+ (* -4.0 (/ (* a t) y)) (+ (* 18.0 (* t (* x z))) (/ (* b c) y)))
       (+ (* 4.0 (/ (* x i) y)) (* 27.0 (/ (* j k) y)))))
     (if (<= y 2.45e+33)
       (+
        (fma t (fma x (* 18.0 (* y z)) (* -4.0 a)) (fma b c (* x (* -4.0 i))))
        t_1)
       (+
        t_1
        (*
         z
         (+
          (+ (* -4.0 (* i (/ x z))) (* (* t 18.0) (* y x)))
          (/ (fma -4.0 (* a t) (* b c)) z))))))))
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 (y <= -6.3e+162) {
		tmp = y * (((-4.0 * ((a * t) / y)) + ((18.0 * (t * (x * z))) + ((b * c) / y))) - ((4.0 * ((x * i) / y)) + (27.0 * ((j * k) / y))));
	} else if (y <= 2.45e+33) {
		tmp = fma(t, fma(x, (18.0 * (y * z)), (-4.0 * a)), fma(b, c, (x * (-4.0 * i)))) + t_1;
	} else {
		tmp = t_1 + (z * (((-4.0 * (i * (x / z))) + ((t * 18.0) * (y * x))) + (fma(-4.0, (a * t), (b * c)) / z)));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	tmp = 0.0
	if (y <= -6.3e+162)
		tmp = Float64(y * Float64(Float64(Float64(-4.0 * Float64(Float64(a * t) / y)) + Float64(Float64(18.0 * Float64(t * Float64(x * z))) + Float64(Float64(b * c) / y))) - Float64(Float64(4.0 * Float64(Float64(x * i) / y)) + Float64(27.0 * Float64(Float64(j * k) / y)))));
	elseif (y <= 2.45e+33)
		tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + t_1);
	else
		tmp = Float64(t_1 + Float64(z * Float64(Float64(Float64(-4.0 * Float64(i * Float64(x / z))) + Float64(Float64(t * 18.0) * Float64(y * x))) + Float64(fma(-4.0, Float64(a * t), Float64(b * c)) / z))));
	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.
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[y, -6.3e+162], N[(y * N[(N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(N[(x * i), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e+33], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(z * N[(N[(N[(-4.0 * N[(i * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t * 18.0), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] / 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])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;y \leq -6.3 \cdot 10^{+162}:\\
\;\;\;\;y \cdot \left(\left(-4 \cdot \frac{a \cdot t}{y} + \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right) + \frac{b \cdot c}{y}\right)\right) - \left(4 \cdot \frac{x \cdot i}{y} + 27 \cdot \frac{j \cdot k}{y}\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.3000000000000001e162

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

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

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

    if -6.3000000000000001e162 < y < 2.45000000000000007e33

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

    if 2.45000000000000007e33 < y

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.1% accurate, 0.5× speedup?

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

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


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

    1. Initial program 94.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--94.3%

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

Alternative 3: 89.7% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.19999999999999982e73

    1. Initial program 72.0%

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

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

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

    if -3.19999999999999982e73 < y

    1. Initial program 91.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--92.7%

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

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

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

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

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

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

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

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

Alternative 4: 59.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])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := b \cdot c + t\_1\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{+95}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-24}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-190}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-303}:\\ \;\;\;\;t\_1 + i \cdot \left(-4 \cdot x\right)\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-58}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-4 \cdot \frac{a}{y} + 18 \cdot \left(x \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.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
   (if (<= t -2.25e+95)
     (* t (+ (* 18.0 (* x (* y z))) (* -4.0 a)))
     (if (<= t -1.8e-24)
       (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
       (if (<= t -6.5e-190)
         t_2
         (if (<= t -2e-303)
           (+ t_1 (* i (* -4.0 x)))
           (if (<= t 4.3e-58)
             t_2
             (* t (* y (+ (* -4.0 (/ a y)) (* 18.0 (* x z))))))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = (b * c) + t_1;
	double tmp;
	if (t <= -2.25e+95) {
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	} else if (t <= -1.8e-24) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (t <= -6.5e-190) {
		tmp = t_2;
	} else if (t <= -2e-303) {
		tmp = t_1 + (i * (-4.0 * x));
	} else if (t <= 4.3e-58) {
		tmp = t_2;
	} else {
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * 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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = (b * c) + t_1
    if (t <= (-2.25d+95)) then
        tmp = t * ((18.0d0 * (x * (y * z))) + ((-4.0d0) * a))
    else if (t <= (-1.8d-24)) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else if (t <= (-6.5d-190)) then
        tmp = t_2
    else if (t <= (-2d-303)) then
        tmp = t_1 + (i * ((-4.0d0) * x))
    else if (t <= 4.3d-58) then
        tmp = t_2
    else
        tmp = t * (y * (((-4.0d0) * (a / y)) + (18.0d0 * (x * 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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = (b * c) + t_1;
	double tmp;
	if (t <= -2.25e+95) {
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	} else if (t <= -1.8e-24) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (t <= -6.5e-190) {
		tmp = t_2;
	} else if (t <= -2e-303) {
		tmp = t_1 + (i * (-4.0 * x));
	} else if (t <= 4.3e-58) {
		tmp = t_2;
	} else {
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = (b * c) + t_1
	tmp = 0
	if t <= -2.25e+95:
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a))
	elif t <= -1.8e-24:
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	elif t <= -6.5e-190:
		tmp = t_2
	elif t <= -2e-303:
		tmp = t_1 + (i * (-4.0 * x))
	elif t <= 4.3e-58:
		tmp = t_2
	else:
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(Float64(b * c) + t_1)
	tmp = 0.0
	if (t <= -2.25e+95)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(-4.0 * a)));
	elseif (t <= -1.8e-24)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	elseif (t <= -6.5e-190)
		tmp = t_2;
	elseif (t <= -2e-303)
		tmp = Float64(t_1 + Float64(i * Float64(-4.0 * x)));
	elseif (t <= 4.3e-58)
		tmp = t_2;
	else
		tmp = Float64(t * Float64(y * Float64(Float64(-4.0 * Float64(a / y)) + Float64(18.0 * Float64(x * 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = (b * c) + t_1;
	tmp = 0.0;
	if (t <= -2.25e+95)
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	elseif (t <= -1.8e-24)
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	elseif (t <= -6.5e-190)
		tmp = t_2;
	elseif (t <= -2e-303)
		tmp = t_1 + (i * (-4.0 * x));
	elseif (t <= 4.3e-58)
		tmp = t_2;
	else
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -2.25e+95], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.8e-24], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e-190], t$95$2, If[LessEqual[t, -2e-303], N[(t$95$1 + N[(i * N[(-4.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e-58], t$95$2, N[(t * N[(y * N[(N[(-4.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-24}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

\mathbf{elif}\;t \leq -6.5 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-58}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.25000000000000008e95

    1. Initial program 82.5%

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

      \[\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) \]
    5. Taylor expanded in t around inf 78.5%

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

    if -2.25000000000000008e95 < t < -1.8e-24

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

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

    if -1.8e-24 < t < -6.4999999999999997e-190 or -1.99999999999999986e-303 < t < 4.2999999999999999e-58

    1. Initial program 91.6%

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

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

    if -6.4999999999999997e-190 < t < -1.99999999999999986e-303

    1. Initial program 69.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. Simplified70.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 72.2%

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

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

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

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

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

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

    if 4.2999999999999999e-58 < t

    1. Initial program 93.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. Simplified96.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 71.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+95}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-24}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-190}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-303}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(-4 \cdot x\right)\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-58}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-4 \cdot \frac{a}{y} + 18 \cdot \left(x \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 59.4% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq -2.1 \cdot 10^{-24}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 3.45 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.7999999999999998e95 or 3.44999999999999991e-59 < t

    1. Initial program 89.0%

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

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

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

    if -2.7999999999999998e95 < t < -2.0999999999999999e-24

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

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

    if -2.0999999999999999e-24 < t < -1.25000000000000009e-190 or -3.4999999999999998e-305 < t < 3.44999999999999991e-59

    1. Initial program 91.6%

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

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

    if -1.25000000000000009e-190 < t < -3.4999999999999998e-305

    1. Initial program 69.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. Simplified70.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 72.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+95}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-24}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-190}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-305}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(-4 \cdot x\right)\\ \mathbf{elif}\;t \leq 3.45 \cdot 10^{-59}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 86.9% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < 2.00000000000000013e294

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

    if 2.00000000000000013e294 < (*.f64 b c)

    1. Initial program 66.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. Simplified66.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 0 66.7%

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

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

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)} \]
    7. Step-by-step derivation
      1. *-commutative88.9%

        \[\leadsto c \cdot \left(b + -4 \cdot \frac{\color{blue}{t \cdot a}}{c}\right) \]
    8. Simplified88.9%

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

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

Alternative 7: 60.1% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq -2.15 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 7.2 \cdot 10^{-54}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.9999999999999999e-28 or 7.19999999999999953e-54 < t

    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. 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 t around inf 74.2%

      \[\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) \]
    5. Taylor expanded in t around inf 64.3%

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

    if -6.9999999999999999e-28 < t < -2.15e-190 or -1.59999999999999999e-304 < t < 7.19999999999999953e-54

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

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

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

    if -2.15e-190 < t < -1.59999999999999999e-304

    1. Initial program 69.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. Simplified70.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 72.2%

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

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

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

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

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

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

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

Alternative 8: 81.5% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.35e-33 or 7.8000000000000004e-103 < t

    1. Initial program 90.8%

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

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

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

    if -1.35e-33 < t < 7.8000000000000004e-103

    1. Initial program 85.3%

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

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

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

Alternative 9: 82.2% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 87.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--88.6%

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

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

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

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

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

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

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

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

    if -3.7500000000000001e-65 < t < 4.5000000000000003e-99

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

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

    if 4.5000000000000003e-99 < t

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

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

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

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

Alternative 10: 53.1% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

    if -2.5e-15 < (*.f64 b c) < -2e-267

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

    if -2e-267 < (*.f64 b c) < 5e45

    1. Initial program 92.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--93.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv53.3%

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

        \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      3. +-commutative53.3%

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

        \[\leadsto -4 \cdot \left(i \cdot x\right) + -4 \cdot \color{blue}{\left(t \cdot a\right)} \]
      5. distribute-lft-out53.3%

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

        \[\leadsto -4 \cdot \left(i \cdot x + \color{blue}{a \cdot t}\right) \]
    11. Simplified53.3%

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

    if 5e45 < (*.f64 b c)

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

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

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

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

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)} \]
    7. Step-by-step derivation
      1. *-commutative71.1%

        \[\leadsto c \cdot \left(b + -4 \cdot \frac{\color{blue}{t \cdot a}}{c}\right) \]
    8. Simplified71.1%

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

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

Alternative 11: 80.3% accurate, 1.0× speedup?

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

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

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


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

    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. Simplified89.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 82.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 -7.9999999999999993e23 < t < 1.84999999999999996e86

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

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

    if 1.84999999999999996e86 < t

    1. Initial program 90.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--95.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+23}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+86}:\\ \;\;\;\;\left(\left(b \cdot c - \left(a \cdot t\right) \cdot 4\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + 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: 76.4% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.1000000000000001e-37 or 1.15000000000000005e-41 < t

    1. Initial program 89.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--91.6%

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

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

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

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

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

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

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

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

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

    if -2.1000000000000001e-37 < t < 1.15000000000000005e-41

    1. Initial program 87.4%

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

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

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

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

Alternative 13: 75.9% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 86.9%

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

      \[\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.50000000000000003e-17 < t < 5.2e-42

    1. Initial program 87.1%

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

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

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

    if 5.2e-42 < t

    1. Initial program 93.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--96.4%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 70.8% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+103}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-41}:\\ \;\;\;\;\left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-4 \cdot \frac{a}{y} + 18 \cdot \left(x \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.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= t -1.8e+103)
   (* t (+ (* 18.0 (* x (* y z))) (* -4.0 a)))
   (if (<= t 2.8e-41)
     (- (- (* b c) (* i (* x 4.0))) (* k (* 27.0 j)))
     (* t (* y (+ (* -4.0 (/ a y)) (* 18.0 (* x z))))))))
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.8e+103) {
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	} else if (t <= 2.8e-41) {
		tmp = ((b * c) - (i * (x * 4.0))) - (k * (27.0 * j));
	} else {
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * 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.
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.8d+103)) then
        tmp = t * ((18.0d0 * (x * (y * z))) + ((-4.0d0) * a))
    else if (t <= 2.8d-41) then
        tmp = ((b * c) - (i * (x * 4.0d0))) - (k * (27.0d0 * j))
    else
        tmp = t * (y * (((-4.0d0) * (a / y)) + (18.0d0 * (x * 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;
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.8e+103) {
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	} else if (t <= 2.8e-41) {
		tmp = ((b * c) - (i * (x * 4.0))) - (k * (27.0 * j));
	} else {
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -1.8e+103:
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a))
	elif t <= 2.8e-41:
		tmp = ((b * c) - (i * (x * 4.0))) - (k * (27.0 * j))
	else:
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -1.8e+103)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(-4.0 * a)));
	elseif (t <= 2.8e-41)
		tmp = Float64(Float64(Float64(b * c) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(27.0 * j)));
	else
		tmp = Float64(t * Float64(y * Float64(Float64(-4.0 * Float64(a / y)) + Float64(18.0 * Float64(x * 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -1.8e+103)
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	elseif (t <= 2.8e-41)
		tmp = ((b * c) - (i * (x * 4.0))) - (k * (27.0 * j));
	else
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.8e+103], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-41], N[(N[(N[(b * c), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(N[(-4.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+103}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\

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

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


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

    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. Simplified86.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 t around inf 86.2%

      \[\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) \]
    5. Taylor expanded in t around inf 81.6%

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

    if -1.80000000000000008e103 < t < 2.8000000000000002e-41

    1. Initial program 88.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--88.7%

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

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

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

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

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

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

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

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

    if 2.8000000000000002e-41 < t

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

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

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

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

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

Alternative 15: 70.8% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+102}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-41}:\\ \;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-4 \cdot \frac{a}{y} + 18 \cdot \left(x \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.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= t -9.5e+102)
   (* t (+ (* 18.0 (* x (* y z))) (* -4.0 a)))
   (if (<= t 1.4e-41)
     (- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
     (* t (* y (+ (* -4.0 (/ a y)) (* 18.0 (* x z))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (t <= -9.5e+102) {
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	} else if (t <= 1.4e-41) {
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
	} else {
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * 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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t <= (-9.5d+102)) then
        tmp = t * ((18.0d0 * (x * (y * z))) + ((-4.0d0) * a))
    else if (t <= 1.4d-41) then
        tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
    else
        tmp = t * (y * (((-4.0d0) * (a / y)) + (18.0d0 * (x * 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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (t <= -9.5e+102) {
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	} else if (t <= 1.4e-41) {
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
	} else {
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -9.5e+102:
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a))
	elif t <= 1.4e-41:
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)))
	else:
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * z))))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -9.5e+102)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(-4.0 * a)));
	elseif (t <= 1.4e-41)
		tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i))));
	else
		tmp = Float64(t * Float64(y * Float64(Float64(-4.0 * Float64(a / y)) + Float64(18.0 * Float64(x * 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -9.5e+102)
		tmp = t * ((18.0 * (x * (y * z))) + (-4.0 * a));
	elseif (t <= 1.4e-41)
		tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
	else
		tmp = t * (y * ((-4.0 * (a / y)) + (18.0 * (x * 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -9.5e+102], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-41], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(N[(-4.0 * N[(a / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+102}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\\

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

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


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

    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. Simplified86.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 t around inf 86.2%

      \[\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) \]
    5. Taylor expanded in t around inf 81.6%

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

    if -9.4999999999999992e102 < t < 1.4000000000000001e-41

    1. Initial program 88.7%

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

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

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

    if 1.4000000000000001e-41 < t

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

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

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

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

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

Alternative 16: 54.1% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -4.0000000000000001e133

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

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

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

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

    if -4.0000000000000001e133 < (*.f64 b c) < 2.0000000000000001e26

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

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

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

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

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

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

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

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

    if 2.0000000000000001e26 < (*.f64 b c)

    1. Initial program 86.8%

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

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

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

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

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)} \]
    7. Step-by-step derivation
      1. *-commutative70.4%

        \[\leadsto c \cdot \left(b + -4 \cdot \frac{\color{blue}{t \cdot a}}{c}\right) \]
    8. Simplified70.4%

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

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

Alternative 17: 51.7% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -5e-83

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

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

    if -5e-83 < (*.f64 b c) < 5e45

    1. Initial program 92.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--93.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv50.4%

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

        \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      3. +-commutative50.4%

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)} \]
      4. *-commutative50.4%

        \[\leadsto -4 \cdot \left(i \cdot x\right) + -4 \cdot \color{blue}{\left(t \cdot a\right)} \]
      5. distribute-lft-out50.4%

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x + t \cdot a\right)} \]
      6. *-commutative50.4%

        \[\leadsto -4 \cdot \left(i \cdot x + \color{blue}{a \cdot t}\right) \]
    11. Simplified50.4%

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

    if 5e45 < (*.f64 b c)

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

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

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

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

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)} \]
    7. Step-by-step derivation
      1. *-commutative71.1%

        \[\leadsto c \cdot \left(b + -4 \cdot \frac{\color{blue}{t \cdot a}}{c}\right) \]
    8. Simplified71.1%

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \frac{t \cdot a}{c}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.7%

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

Alternative 18: 52.5% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -9.00000000000000078e130 or 1.54999999999999996e49 < (*.f64 b c)

    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. Simplified86.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 0 78.5%

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

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

    if -9.00000000000000078e130 < (*.f64 b c) < 1.54999999999999996e49

    1. Initial program 90.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. Step-by-step derivation
      1. distribute-rgt-out--92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)} \]
      4. *-commutative45.6%

        \[\leadsto -4 \cdot \left(i \cdot x\right) + -4 \cdot \color{blue}{\left(t \cdot a\right)} \]
      5. distribute-lft-out45.6%

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x + t \cdot a\right)} \]
      6. *-commutative45.6%

        \[\leadsto -4 \cdot \left(i \cdot x + \color{blue}{a \cdot t}\right) \]
    11. Simplified45.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -9 \cdot 10^{+130} \lor \neg \left(b \cdot c \leq 1.55 \cdot 10^{+49}\right):\\ \;\;\;\;b \cdot c + -4 \cdot \left(a \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot t + x \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 50.2% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.90000000000000001e217 or 1.3500000000000001e194 < (*.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.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 77.0%

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

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

    if -1.90000000000000001e217 < (*.f64 b c) < 1.3500000000000001e194

    1. Initial program 90.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--91.6%

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{-4 \cdot \left(a \cdot t\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    7. Step-by-step derivation
      1. *-commutative66.0%

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

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

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

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

        \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      3. +-commutative45.8%

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)} \]
      4. *-commutative45.8%

        \[\leadsto -4 \cdot \left(i \cdot x\right) + -4 \cdot \color{blue}{\left(t \cdot a\right)} \]
      5. distribute-lft-out45.8%

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x + t \cdot a\right)} \]
      6. *-commutative45.8%

        \[\leadsto -4 \cdot \left(i \cdot x + \color{blue}{a \cdot t}\right) \]
    11. Simplified45.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.9 \cdot 10^{+217} \lor \neg \left(b \cdot c \leq 1.35 \cdot 10^{+194}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot t + x \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 51.7% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.54999999999999989e33 or 1.00000000000000002e100 < a

    1. Initial program 83.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--86.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv59.7%

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

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)} \]
      4. *-commutative59.7%

        \[\leadsto -4 \cdot \left(i \cdot x\right) + -4 \cdot \color{blue}{\left(t \cdot a\right)} \]
      5. distribute-lft-out59.7%

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x + t \cdot a\right)} \]
      6. *-commutative59.7%

        \[\leadsto -4 \cdot \left(i \cdot x + \color{blue}{a \cdot t}\right) \]
    11. Simplified59.7%

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

    if -3.54999999999999989e33 < a < 1.00000000000000002e100

    1. Initial program 91.5%

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

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

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

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

Alternative 21: 34.9% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.9999999999999999e163 or 7.79999999999999968e51 < (*.f64 b c)

    1. Initial program 85.7%

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

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

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

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

    if -1.9999999999999999e163 < (*.f64 b c) < 7.79999999999999968e51

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 22: 37.0% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -2.90000000000000019e-15 or 9.0000000000000006e25 < (*.f64 b c)

    1. Initial program 87.2%

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

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

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

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

    if -2.90000000000000019e-15 < (*.f64 b c) < 9.0000000000000006e25

    1. Initial program 89.7%

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

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

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

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

Alternative 23: 23.9% accurate, 10.3× speedup?

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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