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

Percentage Accurate: 85.6% → 89.4%
Time: 20.3s
Alternatives: 16
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 85.6% accurate, 1.0× speedup?

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

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

Alternative 1: 89.4% accurate, 0.1× speedup?

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

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


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

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

    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.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 y around inf 58.6%

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(-27 \cdot \frac{j \cdot k}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \]
    8. Taylor expanded in j around 0 56.0%

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

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

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

        \[\leadsto z \cdot \left(\left(\color{blue}{\left(t \cdot 18\right)} \cdot x\right) \cdot y\right) \]
    10. Simplified65.2%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot 18\right) \cdot x\right)}\right) \]
    14. Simplified68.2%

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

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

Alternative 2: 89.4% accurate, 0.5× speedup?

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

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


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

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

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

    if +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.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 y around inf 58.6%

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(-27 \cdot \frac{j \cdot k}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \]
    8. Taylor expanded in j around 0 56.0%

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

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

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

        \[\leadsto z \cdot \left(\left(\color{blue}{\left(t \cdot 18\right)} \cdot x\right) \cdot y\right) \]
    10. Simplified65.2%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(z \cdot \color{blue}{\left(\left(t \cdot 18\right) \cdot x\right)}\right) \]
    14. Simplified68.2%

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

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

Alternative 3: 63.4% accurate, 0.5× speedup?

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

\mathbf{elif}\;b \cdot c \leq -3.9 \cdot 10^{-107}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-231}:\\
\;\;\;\;t\_1 + 18 \cdot \left(t \cdot t\_4\right)\\

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-312}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-94}:\\
\;\;\;\;t \cdot \left(18 \cdot t\_4 - a \cdot 4\right)\\

\mathbf{elif}\;b \cdot c \leq 8.8 \cdot 10^{+117}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;b \cdot c - t\_2\\


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

    1. Initial program 69.6%

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

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

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

    if -3.5999999999999997e291 < (*.f64 b c) < -3.9000000000000001e-107 or -7.5000000000000001e-231 < (*.f64 b c) < 5.0000000000022e-312 or 3.6e-94 < (*.f64 b c) < 8.80000000000000056e117

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9000000000000001e-107 < (*.f64 b c) < -7.5000000000000001e-231

    1. Initial program 83.8%

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

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

    if 5.0000000000022e-312 < (*.f64 b c) < 3.6e-94

    1. Initial program 83.3%

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

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

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

    if 8.80000000000000056e117 < (*.f64 b c)

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.6 \cdot 10^{+291}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -3.9 \cdot 10^{-107}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-231}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-312}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-94}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;b \cdot c \leq 8.8 \cdot 10^{+117}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 58.3% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\ t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+151}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+121}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{+67}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-65}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) (* j (* k -27.0))))
        (t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
   (if (<= t -2.8e+151)
     t_2
     (if (<= t -3.7e+121)
       t_1
       (if (<= t -1.15e+67)
         t_2
         (if (<= t -1.35e-33)
           (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
           (if (<= t 3.8e-65) t_1 t_2)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + (j * (k * -27.0));
	double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -2.8e+151) {
		tmp = t_2;
	} else if (t <= -3.7e+121) {
		tmp = t_1;
	} else if (t <= -1.15e+67) {
		tmp = t_2;
	} else if (t <= -1.35e-33) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (t <= 3.8e-65) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (b * c) + (j * (k * (-27.0d0)))
    t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    if (t <= (-2.8d+151)) then
        tmp = t_2
    else if (t <= (-3.7d+121)) then
        tmp = t_1
    else if (t <= (-1.15d+67)) then
        tmp = t_2
    else if (t <= (-1.35d-33)) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else if (t <= 3.8d-65) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) + (j * (k * -27.0));
	double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -2.8e+151) {
		tmp = t_2;
	} else if (t <= -3.7e+121) {
		tmp = t_1;
	} else if (t <= -1.15e+67) {
		tmp = t_2;
	} else if (t <= -1.35e-33) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (t <= 3.8e-65) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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) + (j * (k * -27.0))
	t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	tmp = 0
	if t <= -2.8e+151:
		tmp = t_2
	elif t <= -3.7e+121:
		tmp = t_1
	elif t <= -1.15e+67:
		tmp = t_2
	elif t <= -1.35e-33:
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	elif t <= 3.8e-65:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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(j * Float64(k * -27.0)))
	t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -2.8e+151)
		tmp = t_2;
	elseif (t <= -3.7e+121)
		tmp = t_1;
	elseif (t <= -1.15e+67)
		tmp = t_2;
	elseif (t <= -1.35e-33)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	elseif (t <= 3.8e-65)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) + (j * (k * -27.0));
	t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -2.8e+151)
		tmp = t_2;
	elseif (t <= -3.7e+121)
		tmp = t_1;
	elseif (t <= -1.15e+67)
		tmp = t_2;
	elseif (t <= -1.35e-33)
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	elseif (t <= 3.8e-65)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+151], t$95$2, If[LessEqual[t, -3.7e+121], t$95$1, If[LessEqual[t, -1.15e+67], t$95$2, If[LessEqual[t, -1.35e-33], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-65], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 + j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+151}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.7 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.15 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 3.8 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.79999999999999987e151 or -3.70000000000000013e121 < t < -1.1499999999999999e67 or 3.8000000000000002e-65 < t

    1. Initial program 80.1%

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

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

    if -2.79999999999999987e151 < t < -3.70000000000000013e121 or -1.35e-33 < t < 3.8000000000000002e-65

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

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

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

    if -1.1499999999999999e67 < t < -1.35e-33

    1. Initial program 81.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+151}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+121}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{+67}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-65}:\\ \;\;\;\;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) - a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.1% accurate, 0.9× speedup?

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

\mathbf{elif}\;i \leq -9.4 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;i \leq 1.5 \cdot 10^{-309}:\\
\;\;\;\;b \cdot c + t\_1\\

\mathbf{elif}\;i \leq 16000000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;i \leq 5.1 \cdot 10^{+185}:\\
\;\;\;\;z \cdot \left(y \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -3.79999999999999999e139 or 5.09999999999999996e185 < i

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

    if -3.79999999999999999e139 < i < -9.39999999999999928e47 or 1.5e-309 < i < 1.6e7

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

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

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

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

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

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

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

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

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

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

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

    if -9.39999999999999928e47 < i < 1.5e-309

    1. Initial program 82.4%

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

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

    if 1.6e7 < i < 5.09999999999999996e185

    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. Simplified82.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 y around inf 67.5%

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(-27 \cdot \frac{j \cdot k}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \]
    8. Taylor expanded in j around 0 58.5%

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

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

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

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

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

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

Alternative 6: 46.0% accurate, 0.9× speedup?

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

\mathbf{elif}\;i \leq 8.2 \cdot 10^{-195}:\\
\;\;\;\;b \cdot c + t\_1\\

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

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

\mathbf{elif}\;i \leq 5.1 \cdot 10^{+185}:\\
\;\;\;\;z \cdot \left(y \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if i < -3.1999999999999998e164 or 5.09999999999999996e185 < i

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

    if -3.1999999999999998e164 < i < 8.20000000000000024e-195

    1. Initial program 83.3%

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

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

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

    if 8.20000000000000024e-195 < i < 1.3e-156

    1. Initial program 81.0%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} \]
    8. Taylor expanded in j around 0 100.0%

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

    if 1.3e-156 < i < 4.5000000000000001e-100

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

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

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

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

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

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

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

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

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

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

    if 4.5000000000000001e-100 < i < 5.09999999999999996e185

    1. Initial program 88.1%

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(-27 \cdot \frac{j \cdot k}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \]
    8. Taylor expanded in j around 0 48.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -3.2 \cdot 10^{+164}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;i \leq 8.2 \cdot 10^{-195}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;i \leq 1.3 \cdot 10^{-156}:\\ \;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;i \leq 4.5 \cdot 10^{-100}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;i \leq 5.1 \cdot 10^{+185}:\\ \;\;\;\;z \cdot \left(y \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 63.7% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if i < -3.8999999999999999e98

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999999e98 < i < 1.59999999999999989e-101

    1. Initial program 85.8%

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

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

    if 1.59999999999999989e-101 < i < 1.45e21

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

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

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

    if 1.45e21 < i < 9.99999999999999983e76

    1. Initial program 100.0%

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

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

    if 9.99999999999999983e76 < i

    1. Initial program 77.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. Simplified77.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 x around inf 74.0%

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

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

Alternative 8: 77.1% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;y \leq -2 \cdot 10^{+216}:\\ \;\;\;\;t\_1 + 18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{+149} \lor \neg \left(y \leq -2.65 \cdot 10^{+132}\right):\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t\_1 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= y -2e+216)
     (+ t_1 (* 18.0 (* y (* x (* z t)))))
     (if (or (<= y -1.1e+149) (not (<= y -2.65e+132)))
       (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))
       (+ t_1 (* 18.0 (* (* y z) (* x t))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double tmp;
	if (y <= -2e+216) {
		tmp = t_1 + (18.0 * (y * (x * (z * t))));
	} else if ((y <= -1.1e+149) || !(y <= -2.65e+132)) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	} else {
		tmp = t_1 + (18.0 * ((y * z) * (x * t)));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (y <= (-2d+216)) then
        tmp = t_1 + (18.0d0 * (y * (x * (z * t))))
    else if ((y <= (-1.1d+149)) .or. (.not. (y <= (-2.65d+132)))) then
        tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
    else
        tmp = t_1 + (18.0d0 * ((y * z) * (x * t)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 (y <= -2e+216) {
		tmp = t_1 + (18.0 * (y * (x * (z * t))));
	} else if ((y <= -1.1e+149) || !(y <= -2.65e+132)) {
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	} else {
		tmp = t_1 + (18.0 * ((y * z) * (x * t)));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[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 y <= -2e+216:
		tmp = t_1 + (18.0 * (y * (x * (z * t))))
	elif (y <= -1.1e+149) or not (y <= -2.65e+132):
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k)
	else:
		tmp = t_1 + (18.0 * ((y * z) * (x * t)))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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 <= -2e+216)
		tmp = Float64(t_1 + Float64(18.0 * Float64(y * Float64(x * Float64(z * t)))));
	elseif ((y <= -1.1e+149) || !(y <= -2.65e+132))
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k));
	else
		tmp = Float64(t_1 + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 (y <= -2e+216)
		tmp = t_1 + (18.0 * (y * (x * (z * t))));
	elseif ((y <= -1.1e+149) || ~((y <= -2.65e+132)))
		tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	else
		tmp = t_1 + (18.0 * ((y * z) * (x * t)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, -2e+216], N[(t$95$1 + N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.1e+149], N[Not[LessEqual[y, -2.65e+132]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+216}:\\
\;\;\;\;t\_1 + 18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\

\mathbf{elif}\;y \leq -1.1 \cdot 10^{+149} \lor \neg \left(y \leq -2.65 \cdot 10^{+132}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\

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


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

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e216 < y < -1.1e149 or -2.65e132 < y

    1. Initial program 84.4%

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

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

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

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

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

    if -1.1e149 < y < -2.65e132

    1. Initial program 59.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. Simplified72.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 y around inf 86.9%

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

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

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

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

Alternative 9: 62.7% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if i < -5.4e98

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4e98 < i < 2.10000000000000016e-101

    1. Initial program 85.8%

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

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

    if 2.10000000000000016e-101 < i < 2.95e21

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

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

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

    if 2.95e21 < i < 8.9999999999999995e76

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if 8.9999999999999995e76 < i

    1. Initial program 77.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. Simplified77.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 x around inf 74.0%

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

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

Alternative 10: 49.8% accurate, 0.9× speedup?

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

\mathbf{elif}\;i \leq -2.1 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq 1.4 \cdot 10^{-194}:\\
\;\;\;\;b \cdot c + t\_2\\

\mathbf{elif}\;i \leq 5.8 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -4.60000000000000004e142 or 5.79999999999999976e185 < i

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

    if -4.60000000000000004e142 < i < -2.1e21 or 1.40000000000000006e-194 < i < 5.79999999999999976e185

    1. Initial program 86.7%

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

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

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

    if -2.1e21 < i < 1.40000000000000006e-194

    1. Initial program 83.6%

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

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

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

Alternative 11: 33.1% accurate, 1.3× speedup?

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

\mathbf{elif}\;x \leq -6.3 \cdot 10^{-260}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -48

    1. Initial program 74.9%

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(-27 \cdot \frac{j \cdot k}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \]
    8. Taylor expanded in j around 0 43.2%

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(z \cdot \color{blue}{\left(t \cdot \left(18 \cdot x\right)\right)}\right) \cdot y\right)}^{1} \]
    12. Applied egg-rr51.3%

      \[\leadsto \color{blue}{{\left(\left(z \cdot \left(t \cdot \left(18 \cdot x\right)\right)\right) \cdot y\right)}^{1}} \]
    13. Step-by-step derivation
      1. unpow151.3%

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

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

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

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

    if -48 < x < -6.29999999999999978e-260

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
    7. Taylor expanded in j around 0 43.5%

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

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

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

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

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

    if -6.29999999999999978e-260 < x < 1.94999999999999999e-22

    1. Initial program 98.3%

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

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

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

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

    if 1.94999999999999999e-22 < x

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} \]
    8. Taylor expanded in j around 0 48.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -48:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\ \mathbf{elif}\;x \leq -6.3 \cdot 10^{-260}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-22}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 32.7% accurate, 1.3× speedup?

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

\mathbf{elif}\;x \leq -7.4 \cdot 10^{-258}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -0.0134999999999999998 or 2.95000000000000004e-22 < x

    1. Initial program 71.0%

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} \]
    8. Taylor expanded in j around 0 45.9%

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

    if -0.0134999999999999998 < x < -7.4000000000000001e-258

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
    7. Taylor expanded in j around 0 43.5%

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

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

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

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

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

    if -7.4000000000000001e-258 < x < 2.95000000000000004e-22

    1. Initial program 98.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.0135:\\ \;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq -7.4 \cdot 10^{-258}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{-22}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 48.2% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 74.9%

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(-27 \cdot \frac{j \cdot k}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \]
    8. Taylor expanded in j around 0 43.2%

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(z \cdot \color{blue}{\left(t \cdot \left(18 \cdot x\right)\right)}\right) \cdot y\right)}^{1} \]
    12. Applied egg-rr51.3%

      \[\leadsto \color{blue}{{\left(\left(z \cdot \left(t \cdot \left(18 \cdot x\right)\right)\right) \cdot y\right)}^{1}} \]
    13. Step-by-step derivation
      1. unpow151.3%

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

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

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

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

    if -55 < x < 7.60000000000000022e65

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

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

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

    if 7.60000000000000022e65 < x

    1. Initial program 59.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. Simplified78.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 y around inf 53.8%

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} \]
    8. Taylor expanded in j around 0 53.1%

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

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

Alternative 14: 31.8% accurate, 2.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -9.4999999999999991e-47 or 3.9999999999999998e162 < k

    1. Initial program 89.3%

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

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

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

      \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
    7. Taylor expanded in j around 0 41.2%

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

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

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

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

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

    if -9.4999999999999991e-47 < k < 3.9999999999999998e162

    1. Initial program 80.6%

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

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

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

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

Alternative 15: 23.7% accurate, 6.2× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
  7. Taylor expanded in j around 0 23.8%

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

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

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

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

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

    \[\leadsto j \cdot \left(k \cdot -27\right) \]
  11. Add Preprocessing

Alternative 16: 23.6% accurate, 6.2× speedup?

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

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

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

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

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

  :alt
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

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