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

Percentage Accurate: 85.3% → 91.7%
Time: 34.4s
Alternatives: 22
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 22 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.3% 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: 91.7% accurate, 0.1× speedup?

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(t \cdot \left(z \cdot \left(--18\right)\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.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. Simplified95.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*97.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--97.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-97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{t \cdot \left(-4 \cdot a + 18 \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) \]
    10. Step-by-step derivation
      1. fma-def95.3%

        \[\leadsto \mathsf{fma}\left(b, c, t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \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) \]
      2. associate-*r*97.0%

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

      \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(\left(x \cdot y\right) \cdot z\right)\right)}\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\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. Simplified33.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*29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\right)} - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    9. Taylor expanded in x around -inf 74.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)} \]
    10. Step-by-step derivation
      1. associate-*r*74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.8% accurate, 0.5× speedup?

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(t \cdot \left(z \cdot \left(--18\right)\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.0%

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

    if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 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. Simplified33.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*29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\right)} - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    9. Taylor expanded in x around -inf 74.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)} \]
    10. Step-by-step derivation
      1. associate-*r*74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 56.3% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ t_2 := j \cdot \left(k \cdot -27\right)\\ t_3 := t\_2 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;x \leq -6.8 \cdot 10^{+160}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{+50}:\\ \;\;\;\;t\_2 + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{-257}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-299}:\\ \;\;\;\;b \cdot c + t\_2\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-163}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+57}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(t \cdot \left(z \cdot \left(--18\right)\right)\right) - 4 \cdot i\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* b c) (* 18.0 (* t (* x (* y z))))))
        (t_2 (* j (* k -27.0)))
        (t_3 (+ t_2 (* -4.0 (* t a)))))
   (if (<= x -6.8e+160)
     (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
     (if (<= x -1.05e+50)
       (+ t_2 (* -4.0 (* x i)))
       (if (<= x -1.4e+33)
         t_1
         (if (<= x -4.4e-257)
           t_3
           (if (<= x 1.3e-299)
             (+ (* b c) t_2)
             (if (<= x 2.1e-163)
               t_3
               (if (<= x 3.5e+14)
                 t_1
                 (if (<= x 4.5e+57)
                   t_3
                   (* x (- (* y (* t (* z (- -18.0)))) (* 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 = (b * c) + (18.0 * (t * (x * (y * z))));
	double t_2 = j * (k * -27.0);
	double t_3 = t_2 + (-4.0 * (t * a));
	double tmp;
	if (x <= -6.8e+160) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (x <= -1.05e+50) {
		tmp = t_2 + (-4.0 * (x * i));
	} else if (x <= -1.4e+33) {
		tmp = t_1;
	} else if (x <= -4.4e-257) {
		tmp = t_3;
	} else if (x <= 1.3e-299) {
		tmp = (b * c) + t_2;
	} else if (x <= 2.1e-163) {
		tmp = t_3;
	} else if (x <= 3.5e+14) {
		tmp = t_1;
	} else if (x <= 4.5e+57) {
		tmp = t_3;
	} else {
		tmp = x * ((y * (t * (z * -(-18.0)))) - (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) :: t_3
    real(8) :: tmp
    t_1 = (b * c) + (18.0d0 * (t * (x * (y * z))))
    t_2 = j * (k * (-27.0d0))
    t_3 = t_2 + ((-4.0d0) * (t * a))
    if (x <= (-6.8d+160)) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else if (x <= (-1.05d+50)) then
        tmp = t_2 + ((-4.0d0) * (x * i))
    else if (x <= (-1.4d+33)) then
        tmp = t_1
    else if (x <= (-4.4d-257)) then
        tmp = t_3
    else if (x <= 1.3d-299) then
        tmp = (b * c) + t_2
    else if (x <= 2.1d-163) then
        tmp = t_3
    else if (x <= 3.5d+14) then
        tmp = t_1
    else if (x <= 4.5d+57) then
        tmp = t_3
    else
        tmp = x * ((y * (t * (z * -(-18.0d0)))) - (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 = (b * c) + (18.0 * (t * (x * (y * z))));
	double t_2 = j * (k * -27.0);
	double t_3 = t_2 + (-4.0 * (t * a));
	double tmp;
	if (x <= -6.8e+160) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (x <= -1.05e+50) {
		tmp = t_2 + (-4.0 * (x * i));
	} else if (x <= -1.4e+33) {
		tmp = t_1;
	} else if (x <= -4.4e-257) {
		tmp = t_3;
	} else if (x <= 1.3e-299) {
		tmp = (b * c) + t_2;
	} else if (x <= 2.1e-163) {
		tmp = t_3;
	} else if (x <= 3.5e+14) {
		tmp = t_1;
	} else if (x <= 4.5e+57) {
		tmp = t_3;
	} else {
		tmp = x * ((y * (t * (z * -(-18.0)))) - (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 = (b * c) + (18.0 * (t * (x * (y * z))))
	t_2 = j * (k * -27.0)
	t_3 = t_2 + (-4.0 * (t * a))
	tmp = 0
	if x <= -6.8e+160:
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	elif x <= -1.05e+50:
		tmp = t_2 + (-4.0 * (x * i))
	elif x <= -1.4e+33:
		tmp = t_1
	elif x <= -4.4e-257:
		tmp = t_3
	elif x <= 1.3e-299:
		tmp = (b * c) + t_2
	elif x <= 2.1e-163:
		tmp = t_3
	elif x <= 3.5e+14:
		tmp = t_1
	elif x <= 4.5e+57:
		tmp = t_3
	else:
		tmp = x * ((y * (t * (z * -(-18.0)))) - (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(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))))
	t_2 = Float64(j * Float64(k * -27.0))
	t_3 = Float64(t_2 + Float64(-4.0 * Float64(t * a)))
	tmp = 0.0
	if (x <= -6.8e+160)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	elseif (x <= -1.05e+50)
		tmp = Float64(t_2 + Float64(-4.0 * Float64(x * i)));
	elseif (x <= -1.4e+33)
		tmp = t_1;
	elseif (x <= -4.4e-257)
		tmp = t_3;
	elseif (x <= 1.3e-299)
		tmp = Float64(Float64(b * c) + t_2);
	elseif (x <= 2.1e-163)
		tmp = t_3;
	elseif (x <= 3.5e+14)
		tmp = t_1;
	elseif (x <= 4.5e+57)
		tmp = t_3;
	else
		tmp = Float64(x * Float64(Float64(y * Float64(t * Float64(z * Float64(-(-18.0))))) - 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 = (b * c) + (18.0 * (t * (x * (y * z))));
	t_2 = j * (k * -27.0);
	t_3 = t_2 + (-4.0 * (t * a));
	tmp = 0.0;
	if (x <= -6.8e+160)
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	elseif (x <= -1.05e+50)
		tmp = t_2 + (-4.0 * (x * i));
	elseif (x <= -1.4e+33)
		tmp = t_1;
	elseif (x <= -4.4e-257)
		tmp = t_3;
	elseif (x <= 1.3e-299)
		tmp = (b * c) + t_2;
	elseif (x <= 2.1e-163)
		tmp = t_3;
	elseif (x <= 3.5e+14)
		tmp = t_1;
	elseif (x <= 4.5e+57)
		tmp = t_3;
	else
		tmp = x * ((y * (t * (z * -(-18.0)))) - (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[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $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[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e+160], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.05e+50], N[(t$95$2 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.4e+33], t$95$1, If[LessEqual[x, -4.4e-257], t$95$3, If[LessEqual[x, 1.3e-299], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 2.1e-163], t$95$3, If[LessEqual[x, 3.5e+14], t$95$1, If[LessEqual[x, 4.5e+57], t$95$3, N[(x * N[(N[(y * N[(t * N[(z * (--18.0)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{+160}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

\mathbf{elif}\;x \leq -1.05 \cdot 10^{+50}:\\
\;\;\;\;t\_2 + -4 \cdot \left(x \cdot i\right)\\

\mathbf{elif}\;x \leq -1.4 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -4.4 \cdot 10^{-257}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{-299}:\\
\;\;\;\;b \cdot c + t\_2\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{-163}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 4.5 \cdot 10^{+57}:\\
\;\;\;\;t\_3\\

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


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

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

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

    if -6.80000000000000061e160 < x < -1.05e50

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

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

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

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

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

    if -1.05e50 < x < -1.4e33 or 2.09999999999999998e-163 < x < 3.5e14

    1. Initial program 92.9%

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

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

      \[\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)} \]
    6. Taylor expanded in i around 0 65.1%

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

    if -1.4e33 < x < -4.39999999999999975e-257 or 1.2999999999999999e-299 < x < 2.09999999999999998e-163 or 3.5e14 < x < 4.49999999999999996e57

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

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

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

    if -4.39999999999999975e-257 < x < 1.2999999999999999e-299

    1. Initial program 92.1%

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

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

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

    if 4.49999999999999996e57 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    10. Step-by-step derivation
      1. associate-*r*80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{+160}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{+50}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+33}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{-257}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-299}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-163}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+14}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+57}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(t \cdot \left(z \cdot \left(--18\right)\right)\right) - 4 \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 57.8% accurate, 0.6× speedup?

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

\mathbf{elif}\;x \leq -1 \cdot 10^{+50}:\\
\;\;\;\;t\_3 + -4 \cdot \left(x \cdot i\right)\\

\mathbf{elif}\;x \leq -9.2 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -6 \cdot 10^{-259}:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;x \leq 1.7 \cdot 10^{-300}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;x \leq 4.6 \cdot 10^{-164}:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;x \leq 235000:\\
\;\;\;\;b \cdot c + t\_1\\

\mathbf{elif}\;x \leq 4.3 \cdot 10^{+57}:\\
\;\;\;\;t\_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -9.5000000000000006e160 or -1.0000000000000001e50 < x < -9.20000000000000049e45 or 4.30000000000000033e57 < x

    1. Initial program 78.9%

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

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

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

    if -9.5000000000000006e160 < x < -1.0000000000000001e50

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

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

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

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

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

    if -9.20000000000000049e45 < x < -6.0000000000000004e-259 or 1.70000000000000009e-300 < x < 4.59999999999999971e-164

    1. Initial program 95.5%

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

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

    if -6.0000000000000004e-259 < x < 1.70000000000000009e-300 or 235000 < x < 4.30000000000000033e57

    1. Initial program 89.8%

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

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

    if 4.59999999999999971e-164 < x < 235000

    1. Initial program 95.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+160}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -1 \cdot 10^{+50}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-259}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-300}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-164}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 235000:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{+57}:\\ \;\;\;\;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 5: 56.3% accurate, 0.6× speedup?

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

\mathbf{elif}\;x \leq -1.2 \cdot 10^{+50}:\\
\;\;\;\;t\_3 + -4 \cdot \left(x \cdot i\right)\\

\mathbf{elif}\;x \leq -7.2 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -2 \cdot 10^{-252}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{-300}:\\
\;\;\;\;b \cdot c + t\_3\\

\mathbf{elif}\;x \leq 4.3 \cdot 10^{-163}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;x \leq 1.85 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.1 \cdot 10^{+57}:\\
\;\;\;\;t\_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -5.4e160 or 1.1e57 < x

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

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

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

    if -5.4e160 < x < -1.2000000000000001e50

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

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

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

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

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

    if -1.2000000000000001e50 < x < -7.20000000000000051e41 or 4.30000000000000009e-163 < x < 1.85e16

    1. Initial program 92.9%

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

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

      \[\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)} \]
    6. Taylor expanded in i around 0 65.1%

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

    if -7.20000000000000051e41 < x < -1.99999999999999989e-252 or 5.79999999999999985e-300 < x < 4.30000000000000009e-163 or 1.85e16 < x < 1.1e57

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

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

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

    if -1.99999999999999989e-252 < x < 5.79999999999999985e-300

    1. Initial program 92.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.4 \cdot 10^{+160}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{+50}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{+41}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-252}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-300}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-163}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+16}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+57}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\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: 67.2% 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 := 4 \cdot \left(x \cdot i\right)\\ t_2 := j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\ t_3 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+171}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{+60}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+72}:\\ \;\;\;\;b \cdot c - \left(t\_1 + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+217}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+246}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+275}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* 4.0 (* x i)))
        (t_2 (+ (* j (* k -27.0)) (* 18.0 (* t (* z (* x y))))))
        (t_3 (- (+ (* b c) (* -4.0 (* t a))) t_1)))
   (if (<= t -1.6e+171)
     t_2
     (if (<= t -4.8e+60)
       t_3
       (if (<= t 2.25e+72)
         (- (* b c) (+ t_1 (* 27.0 (* j k))))
         (if (<= t 1.22e+217)
           t_3
           (if (<= t 3.6e+246)
             (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
             (if (<= t 5e+275) t_3 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 = 4.0 * (x * i);
	double t_2 = (j * (k * -27.0)) + (18.0 * (t * (z * (x * y))));
	double t_3 = ((b * c) + (-4.0 * (t * a))) - t_1;
	double tmp;
	if (t <= -1.6e+171) {
		tmp = t_2;
	} else if (t <= -4.8e+60) {
		tmp = t_3;
	} else if (t <= 2.25e+72) {
		tmp = (b * c) - (t_1 + (27.0 * (j * k)));
	} else if (t <= 1.22e+217) {
		tmp = t_3;
	} else if (t <= 3.6e+246) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (t <= 5e+275) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = 4.0d0 * (x * i)
    t_2 = (j * (k * (-27.0d0))) + (18.0d0 * (t * (z * (x * y))))
    t_3 = ((b * c) + ((-4.0d0) * (t * a))) - t_1
    if (t <= (-1.6d+171)) then
        tmp = t_2
    else if (t <= (-4.8d+60)) then
        tmp = t_3
    else if (t <= 2.25d+72) then
        tmp = (b * c) - (t_1 + (27.0d0 * (j * k)))
    else if (t <= 1.22d+217) then
        tmp = t_3
    else if (t <= 3.6d+246) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else if (t <= 5d+275) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = 4.0 * (x * i);
	double t_2 = (j * (k * -27.0)) + (18.0 * (t * (z * (x * y))));
	double t_3 = ((b * c) + (-4.0 * (t * a))) - t_1;
	double tmp;
	if (t <= -1.6e+171) {
		tmp = t_2;
	} else if (t <= -4.8e+60) {
		tmp = t_3;
	} else if (t <= 2.25e+72) {
		tmp = (b * c) - (t_1 + (27.0 * (j * k)));
	} else if (t <= 1.22e+217) {
		tmp = t_3;
	} else if (t <= 3.6e+246) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (t <= 5e+275) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = 4.0 * (x * i)
	t_2 = (j * (k * -27.0)) + (18.0 * (t * (z * (x * y))))
	t_3 = ((b * c) + (-4.0 * (t * a))) - t_1
	tmp = 0
	if t <= -1.6e+171:
		tmp = t_2
	elif t <= -4.8e+60:
		tmp = t_3
	elif t <= 2.25e+72:
		tmp = (b * c) - (t_1 + (27.0 * (j * k)))
	elif t <= 1.22e+217:
		tmp = t_3
	elif t <= 3.6e+246:
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	elif t <= 5e+275:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(4.0 * Float64(x * i))
	t_2 = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))))
	t_3 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1)
	tmp = 0.0
	if (t <= -1.6e+171)
		tmp = t_2;
	elseif (t <= -4.8e+60)
		tmp = t_3;
	elseif (t <= 2.25e+72)
		tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(j * k))));
	elseif (t <= 1.22e+217)
		tmp = t_3;
	elseif (t <= 3.6e+246)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	elseif (t <= 5e+275)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = 4.0 * (x * i);
	t_2 = (j * (k * -27.0)) + (18.0 * (t * (z * (x * y))));
	t_3 = ((b * c) + (-4.0 * (t * a))) - t_1;
	tmp = 0.0;
	if (t <= -1.6e+171)
		tmp = t_2;
	elseif (t <= -4.8e+60)
		tmp = t_3;
	elseif (t <= 2.25e+72)
		tmp = (b * c) - (t_1 + (27.0 * (j * k)));
	elseif (t <= 1.22e+217)
		tmp = t_3;
	elseif (t <= 3.6e+246)
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	elseif (t <= 5e+275)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t, -1.6e+171], t$95$2, If[LessEqual[t, -4.8e+60], t$95$3, If[LessEqual[t, 2.25e+72], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e+217], t$95$3, If[LessEqual[t, 3.6e+246], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+275], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
t_3 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+171}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -4.8 \cdot 10^{+60}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t \leq 1.22 \cdot 10^{+217}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t \leq 5 \cdot 10^{+275}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.60000000000000006e171 or 5.0000000000000003e275 < t

    1. Initial program 71.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. Simplified82.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 69.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. *-commutative69.3%

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

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

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

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

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

    if -1.60000000000000006e171 < t < -4.8e60 or 2.2499999999999999e72 < t < 1.2200000000000001e217 or 3.6e246 < t < 5.0000000000000003e275

    1. Initial program 81.4%

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

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

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

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

    if -4.8e60 < t < 2.2499999999999999e72

    1. Initial program 91.6%

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

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

    if 1.2200000000000001e217 < t < 3.6e246

    1. Initial program 92.9%

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

      \[\leadsto \color{blue}{\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 92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+171}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{+60}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+72}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+217}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+246}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+275}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

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

\mathbf{elif}\;t \leq -2 \cdot 10^{-41}:\\
\;\;\;\;t\_2\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.7999999999999998e125 or 1.85e53 < t

    1. Initial program 78.5%

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

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

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

    if -6.7999999999999998e125 < t < -2.00000000000000001e-41 or -1.70000000000000014e-48 < t < -1.15e-104

    1. Initial program 97.2%

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

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

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

    if -2.00000000000000001e-41 < t < -1.70000000000000014e-48

    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. Simplified61.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 61.9%

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

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

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

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

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

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

    if -1.15e-104 < t < 1.85e53

    1. Initial program 89.8%

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

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

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

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

\mathbf{elif}\;t \leq -3.45 \cdot 10^{-7}:\\
\;\;\;\;t\_5\\

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-19}:\\
\;\;\;\;t\_4\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+53}:\\
\;\;\;\;t\_5\\

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


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

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

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

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

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

    if -8.1999999999999998e68 < t < -3.4499999999999998e-7 or -2.3499999999999999e-48 < t < 1.3500000000000001e53

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

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

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

    if -3.4499999999999998e-7 < t < -5.4999999999999996e-19 or 1.3500000000000001e53 < t

    1. Initial program 81.8%

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

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

    if -5.4999999999999996e-19 < t < -2.3499999999999999e-48

    1. Initial program 99.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. Simplified59.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 inf 45.4%

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

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

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

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

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

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

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

Alternative 9: 64.4% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t\_1 + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\ t_3 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;t \leq -9.5 \cdot 10^{+127}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+54}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+161}:\\ \;\;\;\;t\_1 + t\_3\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+179}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+218}:\\ \;\;\;\;b \cdot c + t\_3\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (+ t_1 (* 18.0 (* t (* z (* x y))))))
        (t_3 (* -4.0 (* t a))))
   (if (<= t -9.5e+127)
     t_2
     (if (<= t 1.4e+54)
       (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
       (if (<= t 2.9e+161)
         (+ t_1 t_3)
         (if (<= t 4.7e+179)
           t_2
           (if (<= t 1.05e+218)
             (+ (* b c) t_3)
             (+ (* b c) (* 18.0 (* t (* x (* y z))))))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 + (18.0 * (t * (z * (x * y))));
	double t_3 = -4.0 * (t * a);
	double tmp;
	if (t <= -9.5e+127) {
		tmp = t_2;
	} else if (t <= 1.4e+54) {
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
	} else if (t <= 2.9e+161) {
		tmp = t_1 + t_3;
	} else if (t <= 4.7e+179) {
		tmp = t_2;
	} else if (t <= 1.05e+218) {
		tmp = (b * c) + t_3;
	} else {
		tmp = (b * c) + (18.0 * (t * (x * (y * z))));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = t_1 + (18.0d0 * (t * (z * (x * y))))
    t_3 = (-4.0d0) * (t * a)
    if (t <= (-9.5d+127)) then
        tmp = t_2
    else if (t <= 1.4d+54) then
        tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
    else if (t <= 2.9d+161) then
        tmp = t_1 + t_3
    else if (t <= 4.7d+179) then
        tmp = t_2
    else if (t <= 1.05d+218) then
        tmp = (b * c) + t_3
    else
        tmp = (b * c) + (18.0d0 * (t * (x * (y * z))))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 + (18.0 * (t * (z * (x * y))));
	double t_3 = -4.0 * (t * a);
	double tmp;
	if (t <= -9.5e+127) {
		tmp = t_2;
	} else if (t <= 1.4e+54) {
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
	} else if (t <= 2.9e+161) {
		tmp = t_1 + t_3;
	} else if (t <= 4.7e+179) {
		tmp = t_2;
	} else if (t <= 1.05e+218) {
		tmp = (b * c) + t_3;
	} else {
		tmp = (b * c) + (18.0 * (t * (x * (y * z))));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t_1 + (18.0 * (t * (z * (x * y))))
	t_3 = -4.0 * (t * a)
	tmp = 0
	if t <= -9.5e+127:
		tmp = t_2
	elif t <= 1.4e+54:
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)))
	elif t <= 2.9e+161:
		tmp = t_1 + t_3
	elif t <= 4.7e+179:
		tmp = t_2
	elif t <= 1.05e+218:
		tmp = (b * c) + t_3
	else:
		tmp = (b * c) + (18.0 * (t * (x * (y * z))))
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
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(18.0 * Float64(t * Float64(z * Float64(x * y)))))
	t_3 = Float64(-4.0 * Float64(t * a))
	tmp = 0.0
	if (t <= -9.5e+127)
		tmp = t_2;
	elseif (t <= 1.4e+54)
		tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k))));
	elseif (t <= 2.9e+161)
		tmp = Float64(t_1 + t_3);
	elseif (t <= 4.7e+179)
		tmp = t_2;
	elseif (t <= 1.05e+218)
		tmp = Float64(Float64(b * c) + t_3);
	else
		tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))));
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = t_1 + (18.0 * (t * (z * (x * y))));
	t_3 = -4.0 * (t * a);
	tmp = 0.0;
	if (t <= -9.5e+127)
		tmp = t_2;
	elseif (t <= 1.4e+54)
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
	elseif (t <= 2.9e+161)
		tmp = t_1 + t_3;
	elseif (t <= 4.7e+179)
		tmp = t_2;
	elseif (t <= 1.05e+218)
		tmp = (b * c) + t_3;
	else
		tmp = (b * c) + (18.0 * (t * (x * (y * z))));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e+127], t$95$2, If[LessEqual[t, 1.4e+54], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+161], N[(t$95$1 + t$95$3), $MachinePrecision], If[LessEqual[t, 4.7e+179], t$95$2, If[LessEqual[t, 1.05e+218], N[(N[(b * c), $MachinePrecision] + t$95$3), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + 18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
t_3 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+161}:\\
\;\;\;\;t\_1 + t\_3\\

\mathbf{elif}\;t \leq 4.7 \cdot 10^{+179}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -9.49999999999999975e127 or 2.90000000000000016e161 < t < 4.70000000000000007e179

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 64.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. *-commutative64.8%

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

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

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

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

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

    if -9.49999999999999975e127 < t < 1.40000000000000008e54

    1. Initial program 91.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}{\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 84.0%

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

    if 1.40000000000000008e54 < t < 2.90000000000000016e161

    1. Initial program 88.2%

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

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

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

    if 4.70000000000000007e179 < t < 1.0499999999999999e218

    1. Initial program 84.6%

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

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

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

    if 1.0499999999999999e218 < t

    1. Initial program 78.5%

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

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

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

      \[\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)} \]
    6. Taylor expanded in i around 0 68.3%

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

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

Alternative 10: 78.5% accurate, 0.9× speedup?

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

\mathbf{else}:\\
\;\;\;\;\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)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -1.49999999999999996e-19

    1. Initial program 81.2%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 52.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. *-commutative52.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*53.6%

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

        \[\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. *-commutative53.6%

        \[\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. *-commutative53.6%

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

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

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

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

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

    if -1.49999999999999996e-19 < k

    1. Initial program 89.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified91.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
  3. Recombined 2 regimes into one program.
  4. Final simplification80.1%

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

Alternative 11: 81.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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\ t_2 := 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;t \leq -9.8 \cdot 10^{+125}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4 + t\_1\right)\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+111}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t\_2 + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\right) - 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 (* 18.0 (* x (* y z)))) (t_2 (* 4.0 (* x i))))
   (if (<= t -9.8e+125)
     (+ (* j (* k -27.0)) (* t (+ (* a -4.0) t_1)))
     (if (<= t 1.9e+111)
       (- (+ (* b c) (* -4.0 (* t a))) (+ t_2 (* 27.0 (* j k))))
       (- (+ (* b c) (* t (- t_1 (* 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 = 18.0 * (x * (y * z));
	double t_2 = 4.0 * (x * i);
	double tmp;
	if (t <= -9.8e+125) {
		tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
	} else if (t <= 1.9e+111) {
		tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
	} else {
		tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - 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 = 18.0d0 * (x * (y * z))
    t_2 = 4.0d0 * (x * i)
    if (t <= (-9.8d+125)) then
        tmp = (j * (k * (-27.0d0))) + (t * ((a * (-4.0d0)) + t_1))
    else if (t <= 1.9d+111) then
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_2 + (27.0d0 * (j * k)))
    else
        tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - 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 = 18.0 * (x * (y * z));
	double t_2 = 4.0 * (x * i);
	double tmp;
	if (t <= -9.8e+125) {
		tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
	} else if (t <= 1.9e+111) {
		tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
	} else {
		tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - 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 = 18.0 * (x * (y * z))
	t_2 = 4.0 * (x * i)
	tmp = 0
	if t <= -9.8e+125:
		tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1))
	elif t <= 1.9e+111:
		tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)))
	else:
		tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - 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(18.0 * Float64(x * Float64(y * z)))
	t_2 = Float64(4.0 * Float64(x * i))
	tmp = 0.0
	if (t <= -9.8e+125)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(a * -4.0) + t_1)));
	elseif (t <= 1.9e+111)
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_2 + Float64(27.0 * Float64(j * k))));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - 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 = 18.0 * (x * (y * z));
	t_2 = 4.0 * (x * i);
	tmp = 0.0;
	if (t <= -9.8e+125)
		tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
	elseif (t <= 1.9e+111)
		tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
	else
		tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - 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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.8e+125], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+111], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -9.8 \cdot 10^{+125}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4 + t\_1\right)\\

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

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


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

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

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

    if -9.80000000000000032e125 < t < 1.89999999999999988e111

    1. Initial program 92.5%

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

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

    if 1.89999999999999988e111 < t

    1. Initial program 75.4%

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.4e52 or -2.4499999999999998e-7 < t < -1.20000000000000007e-76 or 6.8000000000000003e73 < t

    1. Initial program 82.4%

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

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

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

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

    if -2.4e52 < t < -2.4499999999999998e-7 or -1.20000000000000007e-76 < t < 6.8000000000000003e73

    1. Initial program 90.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+52} \lor \neg \left(t \leq -2.45 \cdot 10^{-7} \lor \neg \left(t \leq -1.2 \cdot 10^{-76}\right) \land t \leq 6.8 \cdot 10^{+73}\right):\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

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

\mathbf{elif}\;x \leq -3.65 \cdot 10^{-258}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{-299}:\\
\;\;\;\;b \cdot c + t\_1\\

\mathbf{elif}\;x \leq 3.3 \cdot 10^{-24}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.79999999999999995e61 or 3.29999999999999984e-24 < x

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

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

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

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

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

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

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

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

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

    if -3.79999999999999995e61 < x < -3.6500000000000001e-258 or 1.60000000000000004e-299 < x < 3.29999999999999984e-24

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

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

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

    if -3.6500000000000001e-258 < x < 1.60000000000000004e-299

    1. Initial program 92.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{+61}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;x \leq -3.65 \cdot 10^{-258}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-299}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{-24}:\\ \;\;\;\;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 14: 80.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} t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\ t_2 := 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+126}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4 + t\_1\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+185}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t\_2 + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right) - 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 (* 18.0 (* x (* y z)))) (t_2 (* 4.0 (* x i))))
   (if (<= t -1.15e+126)
     (+ (* j (* k -27.0)) (* t (+ (* a -4.0) t_1)))
     (if (<= t 5.6e+185)
       (- (+ (* b c) (* -4.0 (* t a))) (+ t_2 (* 27.0 (* j k))))
       (- (* t (- t_1 (* 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 = 18.0 * (x * (y * z));
	double t_2 = 4.0 * (x * i);
	double tmp;
	if (t <= -1.15e+126) {
		tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
	} else if (t <= 5.6e+185) {
		tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
	} else {
		tmp = (t * (t_1 - (a * 4.0))) - 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 = 18.0d0 * (x * (y * z))
    t_2 = 4.0d0 * (x * i)
    if (t <= (-1.15d+126)) then
        tmp = (j * (k * (-27.0d0))) + (t * ((a * (-4.0d0)) + t_1))
    else if (t <= 5.6d+185) then
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_2 + (27.0d0 * (j * k)))
    else
        tmp = (t * (t_1 - (a * 4.0d0))) - 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 = 18.0 * (x * (y * z));
	double t_2 = 4.0 * (x * i);
	double tmp;
	if (t <= -1.15e+126) {
		tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
	} else if (t <= 5.6e+185) {
		tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
	} else {
		tmp = (t * (t_1 - (a * 4.0))) - 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 = 18.0 * (x * (y * z))
	t_2 = 4.0 * (x * i)
	tmp = 0
	if t <= -1.15e+126:
		tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1))
	elif t <= 5.6e+185:
		tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)))
	else:
		tmp = (t * (t_1 - (a * 4.0))) - 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(18.0 * Float64(x * Float64(y * z)))
	t_2 = Float64(4.0 * Float64(x * i))
	tmp = 0.0
	if (t <= -1.15e+126)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(a * -4.0) + t_1)));
	elseif (t <= 5.6e+185)
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_2 + Float64(27.0 * Float64(j * k))));
	else
		tmp = Float64(Float64(t * Float64(t_1 - Float64(a * 4.0))) - 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 = 18.0 * (x * (y * z));
	t_2 = 4.0 * (x * i);
	tmp = 0.0;
	if (t <= -1.15e+126)
		tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + t_1));
	elseif (t <= 5.6e+185)
		tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
	else
		tmp = (t * (t_1 - (a * 4.0))) - 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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+126], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+185], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+126}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4 + t\_1\right)\\

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

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


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

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

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

    if -1.15e126 < t < 5.59999999999999964e185

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

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

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

    if 5.59999999999999964e185 < t

    1. Initial program 78.9%

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

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

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

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

Alternative 15: 72.8% 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 := 27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;x \leq -3.6 \cdot 10^{+161}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{+27}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t\_1\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+57}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(t \cdot \left(z \cdot \left(--18\right)\right)\right) - 4 \cdot i\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* 27.0 (* j k))))
   (if (<= x -3.6e+161)
     (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
     (if (<= x -3.1e+27)
       (- (* b c) (+ (* 4.0 (* x i)) t_1))
       (if (<= x 3.8e+57)
         (- (+ (* b c) (* -4.0 (* t a))) t_1)
         (* x (- (* y (* t (* z (- -18.0)))) (* 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 = 27.0 * (j * k);
	double tmp;
	if (x <= -3.6e+161) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (x <= -3.1e+27) {
		tmp = (b * c) - ((4.0 * (x * i)) + t_1);
	} else if (x <= 3.8e+57) {
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	} else {
		tmp = x * ((y * (t * (z * -(-18.0)))) - (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 = 27.0d0 * (j * k)
    if (x <= (-3.6d+161)) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else if (x <= (-3.1d+27)) then
        tmp = (b * c) - ((4.0d0 * (x * i)) + t_1)
    else if (x <= 3.8d+57) then
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
    else
        tmp = x * ((y * (t * (z * -(-18.0d0)))) - (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 = 27.0 * (j * k);
	double tmp;
	if (x <= -3.6e+161) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else if (x <= -3.1e+27) {
		tmp = (b * c) - ((4.0 * (x * i)) + t_1);
	} else if (x <= 3.8e+57) {
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	} else {
		tmp = x * ((y * (t * (z * -(-18.0)))) - (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 = 27.0 * (j * k)
	tmp = 0
	if x <= -3.6e+161:
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	elif x <= -3.1e+27:
		tmp = (b * c) - ((4.0 * (x * i)) + t_1)
	elif x <= 3.8e+57:
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1
	else:
		tmp = x * ((y * (t * (z * -(-18.0)))) - (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(27.0 * Float64(j * k))
	tmp = 0.0
	if (x <= -3.6e+161)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	elseif (x <= -3.1e+27)
		tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + t_1));
	elseif (x <= 3.8e+57)
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1);
	else
		tmp = Float64(x * Float64(Float64(y * Float64(t * Float64(z * Float64(-(-18.0))))) - 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 = 27.0 * (j * k);
	tmp = 0.0;
	if (x <= -3.6e+161)
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	elseif (x <= -3.1e+27)
		tmp = (b * c) - ((4.0 * (x * i)) + t_1);
	elseif (x <= 3.8e+57)
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	else
		tmp = x * ((y * (t * (z * -(-18.0)))) - (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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e+161], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.1e+27], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+57], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(x * N[(N[(y * N[(t * N[(z * (--18.0)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{+161}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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

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

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


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

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

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

    if -3.59999999999999984e161 < x < -3.09999999999999996e27

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

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

    if -3.09999999999999996e27 < x < 3.7999999999999999e57

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

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

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

    if 3.7999999999999999e57 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    10. Step-by-step derivation
      1. associate-*r*80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 44.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 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := x \cdot \left(i \cdot -4\right)\\ \mathbf{if}\;x \leq -1.24 \cdot 10^{+95}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.3 \cdot 10^{-103}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{-147}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+60}:\\ \;\;\;\;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 (* t a)))) (t_2 (* x (* i -4.0))))
   (if (<= x -1.24e+95)
     t_2
     (if (<= x -1.3e-103)
       t_1
       (if (<= x -1.35e-147) (* -27.0 (* j k)) (if (<= x 2.8e+60) 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 * (t * a));
	double t_2 = x * (i * -4.0);
	double tmp;
	if (x <= -1.24e+95) {
		tmp = t_2;
	} else if (x <= -1.3e-103) {
		tmp = t_1;
	} else if (x <= -1.35e-147) {
		tmp = -27.0 * (j * k);
	} else if (x <= 2.8e+60) {
		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) * (t * a))
    t_2 = x * (i * (-4.0d0))
    if (x <= (-1.24d+95)) then
        tmp = t_2
    else if (x <= (-1.3d-103)) then
        tmp = t_1
    else if (x <= (-1.35d-147)) then
        tmp = (-27.0d0) * (j * k)
    else if (x <= 2.8d+60) 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 * (t * a));
	double t_2 = x * (i * -4.0);
	double tmp;
	if (x <= -1.24e+95) {
		tmp = t_2;
	} else if (x <= -1.3e-103) {
		tmp = t_1;
	} else if (x <= -1.35e-147) {
		tmp = -27.0 * (j * k);
	} else if (x <= 2.8e+60) {
		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 * (t * a))
	t_2 = x * (i * -4.0)
	tmp = 0
	if x <= -1.24e+95:
		tmp = t_2
	elif x <= -1.3e-103:
		tmp = t_1
	elif x <= -1.35e-147:
		tmp = -27.0 * (j * k)
	elif x <= 2.8e+60:
		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(-4.0 * Float64(t * a)))
	t_2 = Float64(x * Float64(i * -4.0))
	tmp = 0.0
	if (x <= -1.24e+95)
		tmp = t_2;
	elseif (x <= -1.3e-103)
		tmp = t_1;
	elseif (x <= -1.35e-147)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (x <= 2.8e+60)
		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 * (t * a));
	t_2 = x * (i * -4.0);
	tmp = 0.0;
	if (x <= -1.24e+95)
		tmp = t_2;
	elseif (x <= -1.3e-103)
		tmp = t_1;
	elseif (x <= -1.35e-147)
		tmp = -27.0 * (j * k);
	elseif (x <= 2.8e+60)
		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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.24e+95], t$95$2, If[LessEqual[x, -1.3e-103], t$95$1, If[LessEqual[x, -1.35e-147], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+60], 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 + -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;x \leq -1.24 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -1.3 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 2.8 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.23999999999999997e95 or 2.8e60 < x

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*79.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--77.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-77.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot x\right) \cdot i \]
      4. distribute-lft-neg-in50.7%

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

        \[\leadsto \left(-\color{blue}{x \cdot 4}\right) \cdot i \]
      6. distribute-lft-neg-in50.7%

        \[\leadsto \color{blue}{-\left(x \cdot 4\right) \cdot i} \]
      7. associate-*l*50.7%

        \[\leadsto -\color{blue}{x \cdot \left(4 \cdot i\right)} \]
      8. distribute-rgt-neg-in50.7%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
      9. distribute-lft-neg-in50.7%

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

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

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

    if -1.23999999999999997e95 < x < -1.29999999999999998e-103 or -1.35e-147 < x < 2.8e60

    1. Initial program 92.9%

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

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

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

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

    if -1.29999999999999998e-103 < x < -1.35e-147

    1. Initial program 99.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. Simplified100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.24 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq -1.3 \cdot 10^{-103}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{-147}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+60}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 47.2% 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 := b \cdot c + j \cdot \left(k \cdot -27\right)\\ t_2 := x \cdot \left(i \cdot -4\right)\\ \mathbf{if}\;x \leq -3.8 \cdot 10^{+146}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 2.75 \cdot 10^{-235}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-41}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+60}:\\ \;\;\;\;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 (* i -4.0))))
   (if (<= x -3.8e+146)
     t_2
     (if (<= x 2.75e-235)
       t_1
       (if (<= x 2.8e-41)
         (+ (* b c) (* -4.0 (* t a)))
         (if (<= x 3.1e+60) 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 * (i * -4.0);
	double tmp;
	if (x <= -3.8e+146) {
		tmp = t_2;
	} else if (x <= 2.75e-235) {
		tmp = t_1;
	} else if (x <= 2.8e-41) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else if (x <= 3.1e+60) {
		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 * (i * (-4.0d0))
    if (x <= (-3.8d+146)) then
        tmp = t_2
    else if (x <= 2.75d-235) then
        tmp = t_1
    else if (x <= 2.8d-41) then
        tmp = (b * c) + ((-4.0d0) * (t * a))
    else if (x <= 3.1d+60) 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 * (i * -4.0);
	double tmp;
	if (x <= -3.8e+146) {
		tmp = t_2;
	} else if (x <= 2.75e-235) {
		tmp = t_1;
	} else if (x <= 2.8e-41) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else if (x <= 3.1e+60) {
		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 * (i * -4.0)
	tmp = 0
	if x <= -3.8e+146:
		tmp = t_2
	elif x <= 2.75e-235:
		tmp = t_1
	elif x <= 2.8e-41:
		tmp = (b * c) + (-4.0 * (t * a))
	elif x <= 3.1e+60:
		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(i * -4.0))
	tmp = 0.0
	if (x <= -3.8e+146)
		tmp = t_2;
	elseif (x <= 2.75e-235)
		tmp = t_1;
	elseif (x <= 2.8e-41)
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	elseif (x <= 3.1e+60)
		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 * (i * -4.0);
	tmp = 0.0;
	if (x <= -3.8e+146)
		tmp = t_2;
	elseif (x <= 2.75e-235)
		tmp = t_1;
	elseif (x <= 2.8e-41)
		tmp = (b * c) + (-4.0 * (t * a));
	elseif (x <= 3.1e+60)
		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[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.8e+146], t$95$2, If[LessEqual[x, 2.75e-235], t$95$1, If[LessEqual[x, 2.8e-41], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e+60], 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(i \cdot -4\right)\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{+146}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 2.75 \cdot 10^{-235}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 3.1 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.79999999999999979e146 or 3.1000000000000001e60 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{x \cdot 4}\right) \cdot i \]
      6. distribute-lft-neg-in51.8%

        \[\leadsto \color{blue}{-\left(x \cdot 4\right) \cdot i} \]
      7. associate-*l*51.8%

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

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

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

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

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

    if -3.79999999999999979e146 < x < 2.7499999999999999e-235 or 2.8000000000000002e-41 < x < 3.1000000000000001e60

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

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

    if 2.7499999999999999e-235 < x < 2.8000000000000002e-41

    1. Initial program 96.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.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 j around 0 67.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{+146}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq 2.75 \cdot 10^{-235}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-41}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+60}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 50.8% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\ t_2 := b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{if}\;x \leq -5.8 \cdot 10^{+55}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-237}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-39}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+59}:\\ \;\;\;\;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 (- (* b c) (* x (* 4.0 i)))))
   (if (<= x -5.8e+55)
     t_2
     (if (<= x 3.7e-237)
       t_1
       (if (<= x 5.5e-39)
         (+ (* b c) (* -4.0 (* t a)))
         (if (<= x 2.2e+59) 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 = (b * c) - (x * (4.0 * i));
	double tmp;
	if (x <= -5.8e+55) {
		tmp = t_2;
	} else if (x <= 3.7e-237) {
		tmp = t_1;
	} else if (x <= 5.5e-39) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else if (x <= 2.2e+59) {
		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 = (b * c) - (x * (4.0d0 * i))
    if (x <= (-5.8d+55)) then
        tmp = t_2
    else if (x <= 3.7d-237) then
        tmp = t_1
    else if (x <= 5.5d-39) then
        tmp = (b * c) + ((-4.0d0) * (t * a))
    else if (x <= 2.2d+59) 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 = (b * c) - (x * (4.0 * i));
	double tmp;
	if (x <= -5.8e+55) {
		tmp = t_2;
	} else if (x <= 3.7e-237) {
		tmp = t_1;
	} else if (x <= 5.5e-39) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else if (x <= 2.2e+59) {
		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 = (b * c) - (x * (4.0 * i))
	tmp = 0
	if x <= -5.8e+55:
		tmp = t_2
	elif x <= 3.7e-237:
		tmp = t_1
	elif x <= 5.5e-39:
		tmp = (b * c) + (-4.0 * (t * a))
	elif x <= 2.2e+59:
		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(Float64(b * c) - Float64(x * Float64(4.0 * i)))
	tmp = 0.0
	if (x <= -5.8e+55)
		tmp = t_2;
	elseif (x <= 3.7e-237)
		tmp = t_1;
	elseif (x <= 5.5e-39)
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	elseif (x <= 2.2e+59)
		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 = (b * c) - (x * (4.0 * i));
	tmp = 0.0;
	if (x <= -5.8e+55)
		tmp = t_2;
	elseif (x <= 3.7e-237)
		tmp = t_1;
	elseif (x <= 5.5e-39)
		tmp = (b * c) + (-4.0 * (t * a));
	elseif (x <= 2.2e+59)
		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[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.8e+55], t$95$2, If[LessEqual[x, 3.7e-237], t$95$1, If[LessEqual[x, 5.5e-39], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+59], 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 := b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+55}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 3.7 \cdot 10^{-237}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 2.2 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.7999999999999997e55 or 2.2e59 < x

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

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

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

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

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

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

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

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

    if -5.7999999999999997e55 < x < 3.7000000000000001e-237 or 5.50000000000000018e-39 < x < 2.2e59

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

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

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

    if 3.7000000000000001e-237 < x < 5.50000000000000018e-39

    1. Initial program 96.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.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 j around 0 67.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.8 \cdot 10^{+55}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-237}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-39}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+59}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 31.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq 1.12 \cdot 10^{+21}:\\
\;\;\;\;b \cdot c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.34999999999999999e147 or 8.4999999999999997e62 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{x \cdot 4}\right) \cdot i \]
      6. distribute-lft-neg-in51.8%

        \[\leadsto \color{blue}{-\left(x \cdot 4\right) \cdot i} \]
      7. associate-*l*51.8%

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

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

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

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

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

    if -1.34999999999999999e147 < x < 4.00000000000000016e-166

    1. Initial program 91.5%

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

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

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

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

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

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

    if 4.00000000000000016e-166 < x < 1.12e21

    1. Initial program 91.7%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*100.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--91.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-91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.12e21 < x < 8.4999999999999997e62

    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}{\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 48.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-166}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+21}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{+62}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 31.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq 3.3 \cdot 10^{+18}:\\
\;\;\;\;b \cdot c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.70000000000000004e146 or 2.6000000000000001e63 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{x \cdot 4}\right) \cdot i \]
      6. distribute-lft-neg-in51.8%

        \[\leadsto \color{blue}{-\left(x \cdot 4\right) \cdot i} \]
      7. associate-*l*51.8%

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

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

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

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

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

    if -3.70000000000000004e146 < x < 4.59999999999999971e-164

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.59999999999999971e-164 < x < 3.3e18

    1. Initial program 91.7%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*100.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--91.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-91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3e18 < x < 2.6000000000000001e63

    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}{\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 48.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+146}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-164}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+18}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+63}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 36.5% accurate, 1.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -7.2 \cdot 10^{+232} \lor \neg \left(b \cdot c \leq 1.4 \cdot 10^{+64}\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) -7.2e+232) (not (<= (* b c) 1.4e+64)))
   (* 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) <= -7.2e+232) || !((b * c) <= 1.4e+64)) {
		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) <= (-7.2d+232)) .or. (.not. ((b * c) <= 1.4d+64))) 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) <= -7.2e+232) || !((b * c) <= 1.4e+64)) {
		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) <= -7.2e+232) or not ((b * c) <= 1.4e+64):
		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) <= -7.2e+232) || !(Float64(b * c) <= 1.4e+64))
		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) <= -7.2e+232) || ~(((b * c) <= 1.4e+64)))
		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], -7.2e+232], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.4e+64]], $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 -7.2 \cdot 10^{+232} \lor \neg \left(b \cdot c \leq 1.4 \cdot 10^{+64}\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) < -7.19999999999999986e232 or 1.40000000000000012e64 < (*.f64 b c)

    1. Initial program 84.9%

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      2. distribute-rgt-out--85.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-85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.19999999999999986e232 < (*.f64 b c) < 1.40000000000000012e64

    1. Initial program 87.3%

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

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

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

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

Alternative 22: 23.1% 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 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. Simplified88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{b \cdot c} \]
  10. Final simplification17.5%

    \[\leadsto b \cdot c \]
  11. Add Preprocessing

Developer target: 89.3% 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 2024041 
(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)))