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

Percentage Accurate: 85.9% → 89.3%
Time: 40.3s
Alternatives: 26
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 26 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.9% 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.3% accurate, 0.1× speedup?

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\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 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, \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)\right)} \]
      4. associate-*r*38.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, x \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot \left(z \cdot 18\right)\right)}\right) \]
    8. Simplified68.0%

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

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

Alternative 2: 90.2% accurate, 0.1× speedup?

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\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 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0

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

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

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

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + \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) \]
      3. fma-def96.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, \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)\right)} \]
      4. associate-*r*96.9%

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

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

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

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, \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)\right)} \]
      4. associate-*r*38.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, x \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot \left(z \cdot 18\right)\right)}\right) \]
    8. Simplified68.0%

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

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

Alternative 3: 90.2% accurate, 0.1× speedup?

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

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

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

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, \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)\right)} \]
      4. associate-*r*38.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, x \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot \left(z \cdot 18\right)\right)}\right) \]
    8. Simplified68.0%

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

    \[\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) - k \cdot \left(j \cdot 27\right) \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}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 90.2% accurate, 0.2× speedup?

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

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

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

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, \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)\right)} \]
      4. associate-*r*38.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, x \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot \left(z \cdot 18\right)\right)}\right) \]
    8. Simplified68.0%

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

    \[\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) - k \cdot \left(j \cdot 27\right) \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}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 91.2% accurate, 0.5× speedup?

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


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

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

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

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

    1. Initial program 0.0%

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

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

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

    \[\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) - k \cdot \left(j \cdot 27\right) \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}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 53.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \cdot c \leq -1.62 \cdot 10^{-59}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 6.5 \cdot 10^{+56}:\\
\;\;\;\;t_1\\

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


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

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

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

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

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

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

    if -4e51 < (*.f64 b c) < -15000

    1. Initial program 84.0%

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def17.1%

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

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

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

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

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

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

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

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

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

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

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

    if -15000 < (*.f64 b c) < -1.61999999999999989e-59 or 2.75e-288 < (*.f64 b c) < 6.5000000000000001e56

    1. Initial program 80.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. Simplified83.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 a around inf 66.6%

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

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

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

    if -1.61999999999999989e-59 < (*.f64 b c) < 2.75e-288

    1. Initial program 96.0%

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

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

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

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

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

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

    if 6.5000000000000001e56 < (*.f64 b c)

    1. Initial program 82.5%

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

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

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

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

        \[\leadsto b \cdot c - \color{blue}{\left(i \cdot x\right) \cdot 4} \]
      2. *-commutative63.7%

        \[\leadsto b \cdot c - \color{blue}{\left(x \cdot i\right)} \cdot 4 \]
      3. associate-*r*63.7%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(i \cdot 4\right)} \]
      4. *-commutative63.7%

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

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

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

Alternative 7: 53.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \cdot c \leq -1.8 \cdot 10^{-60}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{+62}:\\
\;\;\;\;t_2\\

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


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

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

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

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

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

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

    if -3.2999999999999999e47 < (*.f64 b c) < -5e8

    1. Initial program 84.0%

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def17.1%

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

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

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

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

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

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

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

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

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

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

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

    if -5e8 < (*.f64 b c) < -1.8e-60 or 1.14e-278 < (*.f64 b c) < 1.95e62

    1. Initial program 80.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. Simplified83.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 a around inf 66.6%

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

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

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

    if -1.8e-60 < (*.f64 b c) < 1.14e-278

    1. Initial program 96.0%

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

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

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

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

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

    if 1.95e62 < (*.f64 b c)

    1. Initial program 82.5%

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

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

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

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

        \[\leadsto b \cdot c - \color{blue}{\left(i \cdot x\right) \cdot 4} \]
      2. *-commutative63.7%

        \[\leadsto b \cdot c - \color{blue}{\left(x \cdot i\right)} \cdot 4 \]
      3. associate-*r*63.7%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(i \cdot 4\right)} \]
      4. *-commutative63.7%

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

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

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

Alternative 8: 46.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-155}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+136} \lor \neg \left(z \leq 1.2 \cdot 10^{+169}\right) \land z \leq 1.15 \cdot 10^{+199}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.45000000000000009e-52

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.45000000000000009e-52 < z < -4e-276

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

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

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

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

        \[\leadsto b \cdot c - \color{blue}{\left(i \cdot x\right) \cdot 4} \]
      2. *-commutative52.3%

        \[\leadsto b \cdot c - \color{blue}{\left(x \cdot i\right)} \cdot 4 \]
      3. associate-*r*52.3%

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

        \[\leadsto b \cdot c - x \cdot \color{blue}{\left(4 \cdot i\right)} \]
    7. Simplified52.3%

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

    if -4e-276 < z < 6.5e-155 or 4.19999999999999977e-5 < z < 7.20000000000000011e136 or 1.1999999999999999e169 < z < 1.14999999999999997e199

    1. Initial program 82.6%

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

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

    if 6.5e-155 < z < 4.19999999999999977e-5

    1. Initial program 93.7%

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

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

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

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

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

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

    if 7.20000000000000011e136 < z < 1.1999999999999999e169 or 1.14999999999999997e199 < z

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{-52}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-276}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-155}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-5}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+136} \lor \neg \left(z \leq 1.2 \cdot 10^{+169}\right) \land z \leq 1.15 \cdot 10^{+199}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 36.0% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -1.8e194 or 5.09999999999999979e237 < (*.f64 b c)

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

    if -1.8e194 < (*.f64 b c) < -8.8000000000000001e-51

    1. Initial program 84.3%

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

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

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

    if -8.8000000000000001e-51 < (*.f64 b c) < 9.7999999999999999e-169

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.7999999999999999e-169 < (*.f64 b c) < 1.56e209

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.56e209 < (*.f64 b c) < 5.09999999999999979e237

    1. Initial program 66.7%

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def33.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.8 \cdot 10^{+194}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -8.8 \cdot 10^{-51}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{-169}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 1.56 \cdot 10^{+209}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5.1 \cdot 10^{+237}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 60.6% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} 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 + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{if}\;t \leq -8.6 \cdot 10^{+202}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-89}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -6.4 \cdot 10^{-164}:\\ \;\;\;\;t_2 + x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-75}:\\ \;\;\;\;b \cdot c + t_2\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+98}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(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 (* -4.0 (+ (* t a) (* x i))))))
   (if (<= t -8.6e+202)
     t_1
     (if (<= t -1.05e-89)
       t_3
       (if (<= t -6.4e-164)
         (+ t_2 (* x (* t (* y (* 18.0 z)))))
         (if (<= t 1.3e-75) (+ (* b c) t_2) (if (<= t 5.4e+98) t_3 t_1)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_2 = j * (k * -27.0);
	double t_3 = t_2 + (-4.0 * ((t * a) + (x * i)));
	double tmp;
	if (t <= -8.6e+202) {
		tmp = t_1;
	} else if (t <= -1.05e-89) {
		tmp = t_3;
	} else if (t <= -6.4e-164) {
		tmp = t_2 + (x * (t * (y * (18.0 * z))));
	} else if (t <= 1.3e-75) {
		tmp = (b * c) + t_2;
	} else if (t <= 5.4e+98) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 + ((-4.0d0) * ((t * a) + (x * i)))
    if (t <= (-8.6d+202)) then
        tmp = t_1
    else if (t <= (-1.05d-89)) then
        tmp = t_3
    else if (t <= (-6.4d-164)) then
        tmp = t_2 + (x * (t * (y * (18.0d0 * z))))
    else if (t <= 1.3d-75) then
        tmp = (b * c) + t_2
    else if (t <= 5.4d+98) then
        tmp = t_3
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 + (-4.0 * ((t * a) + (x * i)));
	double tmp;
	if (t <= -8.6e+202) {
		tmp = t_1;
	} else if (t <= -1.05e-89) {
		tmp = t_3;
	} else if (t <= -6.4e-164) {
		tmp = t_2 + (x * (t * (y * (18.0 * z))));
	} else if (t <= 1.3e-75) {
		tmp = (b * c) + t_2;
	} else if (t <= 5.4e+98) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
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 + (-4.0 * ((t * a) + (x * i)))
	tmp = 0
	if t <= -8.6e+202:
		tmp = t_1
	elif t <= -1.05e-89:
		tmp = t_3
	elif t <= -6.4e-164:
		tmp = t_2 + (x * (t * (y * (18.0 * z))))
	elif t <= 1.3e-75:
		tmp = (b * c) + t_2
	elif t <= 5.4e+98:
		tmp = t_3
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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(-4.0 * Float64(Float64(t * a) + Float64(x * i))))
	tmp = 0.0
	if (t <= -8.6e+202)
		tmp = t_1;
	elseif (t <= -1.05e-89)
		tmp = t_3;
	elseif (t <= -6.4e-164)
		tmp = Float64(t_2 + Float64(x * Float64(t * Float64(y * Float64(18.0 * z)))));
	elseif (t <= 1.3e-75)
		tmp = Float64(Float64(b * c) + t_2);
	elseif (t <= 5.4e+98)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 + (-4.0 * ((t * a) + (x * i)));
	tmp = 0.0;
	if (t <= -8.6e+202)
		tmp = t_1;
	elseif (t <= -1.05e-89)
		tmp = t_3;
	elseif (t <= -6.4e-164)
		tmp = t_2 + (x * (t * (y * (18.0 * z))));
	elseif (t <= 1.3e-75)
		tmp = (b * c) + t_2;
	elseif (t <= 5.4e+98)
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+202], t$95$1, If[LessEqual[t, -1.05e-89], t$95$3, If[LessEqual[t, -6.4e-164], N[(t$95$2 + N[(x * N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-75], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 5.4e+98], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\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 + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+202}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-89}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-75}:\\
\;\;\;\;b \cdot c + t_2\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{+98}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.6000000000000005e202 or 5.4e98 < t

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

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

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

    if -8.6000000000000005e202 < t < -1.05e-89 or 1.3e-75 < t < 5.4e98

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

    if -1.05e-89 < t < -6.4000000000000001e-164

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4000000000000001e-164 < t < 1.3e-75

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

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

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

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

Alternative 11: 71.1% accurate, 0.8× speedup?

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

\mathbf{elif}\;x \leq -9 \cdot 10^{-66}:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a + x \cdot i\right)\\

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

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+70}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{+167}:\\
\;\;\;\;t_1 + x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.04999999999999993e131 or 2.60000000000000017e-27 < x < 5.7999999999999997e70

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

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

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

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

    if -1.04999999999999993e131 < x < -8.9999999999999995e-66

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

    if -8.9999999999999995e-66 < x < 2.60000000000000017e-27

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

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

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

    if 5.7999999999999997e70 < x < 1.50000000000000006e167

    1. Initial program 69.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. Simplified75.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 67.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. *-commutative67.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.50000000000000006e167 < x

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv83.4%

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

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

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

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

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

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

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

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

        \[\leadsto -x \cdot \left(\color{blue}{\left(t \cdot \left(-18 \cdot y\right)\right)} \cdot z + 4 \cdot i\right) \]
      5. associate-*l*83.4%

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

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

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

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

Alternative 12: 46.5% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-259}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.75 \cdot 10^{+67}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.32000000000000005e231 or 2.9999999999999998e168 < t

    1. Initial program 72.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. Simplified80.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 a around 0 68.4%

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def44.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.32000000000000005e231 < t < 1.7999999999999999e-259 or 9.6e-195 < t < 1.75e67

    1. Initial program 87.7%

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

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

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

    if 1.7999999999999999e-259 < t < 9.6e-195

    1. Initial program 90.8%

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

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

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

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

        \[\leadsto b \cdot c - \color{blue}{\left(i \cdot x\right) \cdot 4} \]
      2. *-commutative92.0%

        \[\leadsto b \cdot c - \color{blue}{\left(x \cdot i\right)} \cdot 4 \]
      3. associate-*r*92.0%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(i \cdot 4\right)} \]
      4. *-commutative92.0%

        \[\leadsto b \cdot c - x \cdot \color{blue}{\left(4 \cdot i\right)} \]
    7. Simplified92.0%

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

    if 1.75e67 < t < 4.8000000000000004e127

    1. Initial program 99.7%

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000004e127 < t < 2.9999999999999998e168

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.32 \cdot 10^{+231}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-259}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{-195}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+67}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+127}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+168}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 68.6% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-110}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.18 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.36e203 or 1.18000000000000004e61 < t

    1. Initial program 78.6%

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

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

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

    if -1.36e203 < t < -5.4999999999999998e-110 or -6.4000000000000001e-164 < t < 1.18000000000000004e61

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

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

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

    if -5.4999999999999998e-110 < t < -6.4000000000000001e-164

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv80.3%

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

        \[\leadsto -x \cdot \left(\color{blue}{\left(-18 \cdot t\right) \cdot \left(y \cdot z\right)} + \left(--4\right) \cdot i\right) \]
      4. metadata-eval80.3%

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

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

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

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

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

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

        \[\leadsto -x \cdot \left(\color{blue}{\left(t \cdot \left(-18 \cdot y\right)\right)} \cdot z + 4 \cdot i\right) \]
      5. associate-*l*80.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.36 \cdot 10^{+203}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-110}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t \leq -6.4 \cdot 10^{-164}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - t \cdot \left(z \cdot \left(y \cdot -18\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.18 \cdot 10^{+61}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\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 14: 81.3% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.05e-147 or 8.8e21 < a

    1. Initial program 83.0%

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

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

    if -2.05e-147 < a < 8.8e21

    1. Initial program 90.7%

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

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

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

Alternative 15: 59.6% accurate, 0.9× speedup?

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

\mathbf{elif}\;x \leq 4.9 \cdot 10^{-137}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 6.4 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{elif}\;x \leq 9 \cdot 10^{-9}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.8e11 or 8.99999999999999953e-9 < x

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv65.1%

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

        \[\leadsto -x \cdot \left(\color{blue}{\left(-18 \cdot t\right) \cdot \left(y \cdot z\right)} + \left(--4\right) \cdot i\right) \]
      4. metadata-eval65.1%

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

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

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

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

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

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

        \[\leadsto -x \cdot \left(\color{blue}{\left(t \cdot \left(-18 \cdot y\right)\right)} \cdot z + 4 \cdot i\right) \]
      5. associate-*l*65.2%

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

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

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

    if -3.8e11 < x < 4.8999999999999996e-137 or 6.3999999999999997e-93 < x < 8.99999999999999953e-9

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

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

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

    if 4.8999999999999996e-137 < x < 6.3999999999999997e-93

    1. Initial program 100.0%

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

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

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

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

Alternative 16: 59.4% accurate, 0.9× speedup?

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

\mathbf{elif}\;x \leq 4.8 \cdot 10^{-137}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 4.4 \cdot 10^{-88}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-9}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 84.3%

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

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

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

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

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

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

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

    if -1.00000000000000006e-158 < x < 4.8000000000000001e-137 or 4.4000000000000001e-88 < x < 4.20000000000000039e-9

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

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

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

    if 4.8000000000000001e-137 < x < 4.4000000000000001e-88

    1. Initial program 100.0%

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

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

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

    if 4.20000000000000039e-9 < x

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv71.3%

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

        \[\leadsto -x \cdot \left(\color{blue}{\left(-18 \cdot t\right) \cdot \left(y \cdot z\right)} + \left(--4\right) \cdot i\right) \]
      4. metadata-eval71.3%

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

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

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

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

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

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

        \[\leadsto -x \cdot \left(\color{blue}{\left(t \cdot \left(-18 \cdot y\right)\right)} \cdot z + 4 \cdot i\right) \]
      5. associate-*l*71.3%

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

        \[\leadsto -x \cdot \left(t \cdot \left(\color{blue}{\left(y \cdot -18\right)} \cdot z\right) + 4 \cdot i\right) \]
    11. Simplified71.3%

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

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

Alternative 17: 36.4% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{+155}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -3.39999999999999986e193 or 3.60000000000000007e155 < (*.f64 b c)

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

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

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

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

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

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

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

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

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

    if -3.39999999999999986e193 < (*.f64 b c) < 3.9000000000000002e-149 or 2.09999999999999986e92 < (*.f64 b c) < 3.60000000000000007e155

    1. Initial program 87.7%

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

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

    if 3.9000000000000002e-149 < (*.f64 b c) < 2.09999999999999986e92

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.4 \cdot 10^{+193}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 3.9 \cdot 10^{-149}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{+92}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{+155}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 36.3% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -3.09999999999999986e193 or 3.3499999999999999e137 < (*.f64 b c)

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

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

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

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

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

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

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

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

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

    if -3.09999999999999986e193 < (*.f64 b c) < 1.29999999999999999e-149

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

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

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

    if 1.29999999999999999e-149 < (*.f64 b c) < 3.10000000000000019e66

    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. Step-by-step derivation
      1. associate-*r*86.7%

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

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

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

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

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

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

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

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

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

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

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

    if 3.10000000000000019e66 < (*.f64 b c) < 3.3499999999999999e137

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 59.6% accurate, 0.9× speedup?

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

\mathbf{elif}\;x \leq 9.5 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 7.5 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{elif}\;x \leq 1.15 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.5e11 or 1.15e-8 < x

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

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

    if -3.5e11 < x < 9.49999999999999997e-138 or 7.50000000000000034e-93 < x < 1.15e-8

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

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

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

    if 9.49999999999999997e-138 < x < 7.50000000000000034e-93

    1. Initial program 100.0%

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

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

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

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

Alternative 20: 77.3% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5e-53 or 1.44999999999999998e252 < z

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

      \[\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. *-commutative59.3%

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

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

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

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

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

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

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

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

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

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

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

    if -5e-53 < z < 1.44999999999999998e252

    1. Initial program 88.6%

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

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

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

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

Alternative 21: 78.5% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def55.9%

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

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

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

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

    if -8.5999999999999998e-76 < y < 1.29999999999999996e23

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

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

    if 1.29999999999999996e23 < y

    1. Initial program 80.7%

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 22: 80.0% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def55.9%

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

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

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

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

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

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

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

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

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

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

    if -4.14999999999999987e-75 < y < 1.29999999999999996e23

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

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

    if 1.29999999999999996e23 < y

    1. Initial program 80.7%

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 23: 46.5% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;t \leq -4.4 \cdot 10^{+231}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+64}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+128}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+174}:\\ \;\;\;\;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.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* 18.0 (* t (* x (* y z))))))
   (if (<= t -4.4e+231)
     t_1
     (if (<= t 1.5e+64)
       (+ (* b c) (* j (* k -27.0)))
       (if (<= t 3.3e+128)
         (* t (* 18.0 (* y (* x z))))
         (if (<= t 1.55e+174) (* 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);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = 18.0 * (t * (x * (y * z)));
	double tmp;
	if (t <= -4.4e+231) {
		tmp = t_1;
	} else if (t <= 1.5e+64) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (t <= 3.3e+128) {
		tmp = t * (18.0 * (y * (x * z)));
	} else if (t <= 1.55e+174) {
		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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 18.0d0 * (t * (x * (y * z)))
    if (t <= (-4.4d+231)) then
        tmp = t_1
    else if (t <= 1.5d+64) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else if (t <= 3.3d+128) then
        tmp = t * (18.0d0 * (y * (x * z)))
    else if (t <= 1.55d+174) 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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = 18.0 * (t * (x * (y * z)));
	double tmp;
	if (t <= -4.4e+231) {
		tmp = t_1;
	} else if (t <= 1.5e+64) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (t <= 3.3e+128) {
		tmp = t * (18.0 * (y * (x * z)));
	} else if (t <= 1.55e+174) {
		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])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = 18.0 * (t * (x * (y * z)))
	tmp = 0
	if t <= -4.4e+231:
		tmp = t_1
	elif t <= 1.5e+64:
		tmp = (b * c) + (j * (k * -27.0))
	elif t <= 3.3e+128:
		tmp = t * (18.0 * (y * (x * z)))
	elif t <= 1.55e+174:
		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])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))
	tmp = 0.0
	if (t <= -4.4e+231)
		tmp = t_1;
	elseif (t <= 1.5e+64)
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	elseif (t <= 3.3e+128)
		tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z))));
	elseif (t <= 1.55e+174)
		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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = 18.0 * (t * (x * (y * z)));
	tmp = 0.0;
	if (t <= -4.4e+231)
		tmp = t_1;
	elseif (t <= 1.5e+64)
		tmp = (b * c) + (j * (k * -27.0));
	elseif (t <= 3.3e+128)
		tmp = t * (18.0 * (y * (x * z)));
	elseif (t <= 1.55e+174)
		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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+231], t$95$1, If[LessEqual[t, 1.5e+64], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+128], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+174], 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])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{+231}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.39999999999999983e231 or 1.55e174 < t

    1. Initial program 72.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. Simplified80.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 a around 0 68.4%

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def44.3%

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

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

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

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

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

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

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

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

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

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

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

    if -4.39999999999999983e231 < t < 1.5000000000000001e64

    1. Initial program 87.9%

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

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

    if 1.5000000000000001e64 < t < 3.3000000000000001e128

    1. Initial program 99.7%

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

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

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

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

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

      \[\leadsto \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Step-by-step derivation
      1. expm1-def46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3000000000000001e128 < t < 1.55e174

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+231}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+64}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+128}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+174}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 57.4% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.30000000000000034e146 or 9.1999999999999998e61 < t

    1. Initial program 80.3%

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

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

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

    if -7.30000000000000034e146 < t < -3.14999999999999983e-80

    1. Initial program 89.4%

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

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

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

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

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

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

    if -3.14999999999999983e-80 < t < 9.1999999999999998e61

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.3 \cdot 10^{+146}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -3.15 \cdot 10^{-80}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+61}:\\ \;\;\;\;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 25: 36.7% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -2.90000000000000013e193 or 3.89999999999999976e151 < (*.f64 b c)

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

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

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

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

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

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

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

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

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

    if -2.90000000000000013e193 < (*.f64 b c) < 3.89999999999999976e151

    1. Initial program 87.9%

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

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

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

Alternative 26: 23.8% accurate, 10.3× speedup?

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

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

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

      \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    3. associate-*l*83.9%

      \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)} - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    4. *-commutative83.9%

      \[\leadsto \left(\left(\color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)} \cdot \left(z \cdot t\right) - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. *-commutative83.9%

      \[\leadsto \left(\left(\left(y \cdot \left(x \cdot 18\right)\right) \cdot \left(z \cdot t\right) - \color{blue}{t \cdot \left(a \cdot 4\right)}\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
  5. Applied egg-rr83.9%

    \[\leadsto \left(\color{blue}{\left(\left(y \cdot \left(x \cdot 18\right)\right) \cdot \left(z \cdot t\right) - t \cdot \left(a \cdot 4\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
  6. Taylor expanded in b around inf 23.3%

    \[\leadsto \color{blue}{b \cdot c} \]
  7. Final simplification23.3%

    \[\leadsto b \cdot c \]
  8. Add Preprocessing

Developer target: 89.8% 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 2024024 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :herbie-target
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))