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

Percentage Accurate: 85.4% → 90.1%
Time: 20.7s
Alternatives: 20
Speedup: 0.7×

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 20 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 90.1% accurate, 0.5× speedup?

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

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


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

    1. Initial program 96.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6451.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified51.6%

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

      \[\leadsto \color{blue}{x \cdot \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 27 \cdot \frac{j \cdot k}{x}\right)\right)} \]
    7. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto x \cdot \left(\left(\frac{b \cdot c}{x} - 4 \cdot i\right) - \color{blue}{27 \cdot \frac{j \cdot k}{x}}\right) \]
      2. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \left(\left(\frac{b \cdot c}{x} + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right) - \color{blue}{27} \cdot \frac{j \cdot k}{x}\right) \]
      3. metadata-evalN/A

        \[\leadsto x \cdot \left(\left(\frac{b \cdot c}{x} + -4 \cdot i\right) - 27 \cdot \frac{j \cdot k}{x}\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \left(\left(-4 \cdot i + \frac{b \cdot c}{x}\right) - \color{blue}{27} \cdot \frac{j \cdot k}{x}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\left(-4 \cdot i + \frac{b \cdot c}{x}\right) - 27 \cdot \frac{j \cdot k}{x}\right)}\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-4 \cdot i + \color{blue}{\left(\frac{b \cdot c}{x} - 27 \cdot \frac{j \cdot k}{x}\right)}\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-4 \cdot i + \left(\frac{b \cdot c}{x} - \frac{27 \cdot \left(j \cdot k\right)}{\color{blue}{x}}\right)\right)\right) \]
      8. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-4 \cdot i + \frac{b \cdot c - 27 \cdot \left(j \cdot k\right)}{\color{blue}{x}}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{b \cdot c - 27 \cdot \left(j \cdot k\right)}{x} + \color{blue}{-4 \cdot i}\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{b \cdot c - 27 \cdot \left(j \cdot k\right)}{x}\right), \color{blue}{\left(-4 \cdot i\right)}\right)\right) \]
    8. Simplified61.3%

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

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

Alternative 2: 88.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999999e294 or 1.00000000000000005e301 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 67.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6488.6%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified88.6%

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

    if -4.9999999999999999e294 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000005e301

    1. Initial program 87.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(x, 18\right)\right), y\right), \mathsf{*.f64}\left(a, -4\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, k\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(i, -4\right)\right)\right)\right)\right) \]
    6. Applied egg-rr88.9%

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

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

Alternative 3: 79.3% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 82.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right)\right), \color{blue}{\left(b \cdot c\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6483.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right)\right), \mathsf{*.f64}\left(b, \color{blue}{c}\right)\right) \]
    7. Simplified83.0%

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

    if -5.69999999999999983e194 < (*.f64 b c) < 1.90000000000000012e36

    1. Initial program 86.1%

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - \left(4 \cdot \left(a \cdot t\right) + \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)\right)} \]
    4. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{4 \cdot \left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right) \]
      3. metadata-evalN/A

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

        \[\leadsto \left(-4 \cdot \left(a \cdot t\right) + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - \left(\color{blue}{4 \cdot \left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right) \]
      5. associate--l+N/A

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

        \[\leadsto -4 \cdot \left(a \cdot t\right) + \left(18 \cdot \left(\left(x \cdot \left(y \cdot z\right)\right) \cdot t\right) - \left(4 \cdot \color{blue}{\left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto -4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \cdot t - \left(\color{blue}{4 \cdot \left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right)\right) \]
      8. associate--l+N/A

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

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

    if 1.90000000000000012e36 < (*.f64 b c)

    1. Initial program 80.0%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c - 4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(b \cdot c + -4 \cdot \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(b \cdot c\right), \left(-4 \cdot \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(-4 \cdot \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \left(t \cdot a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f6478.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified78.7%

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

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

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

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

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

\mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -3.8999999999999998e192 or 1.80000000000000014e128 < (*.f64 b c)

    1. Initial program 83.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{b \cdot c} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6466.3%

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
    7. Simplified66.3%

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

    if -3.8999999999999998e192 < (*.f64 b c) < -4.2e-195 or 4.8000000000000002e-269 < (*.f64 b c) < 1.80000000000000014e128

    1. Initial program 82.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

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

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

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

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. associate-*r*N/A

        \[\leadsto t \cdot \left(\left(18 \cdot x\right) \cdot \color{blue}{\left(y \cdot z\right)}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(t \cdot \left(18 \cdot x\right)\right) \cdot \color{blue}{\left(y \cdot z\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(t \cdot \left(18 \cdot x\right)\right), \color{blue}{\left(y \cdot z\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(18 \cdot x\right)\right), \left(\color{blue}{y} \cdot z\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(18, x\right)\right), \left(y \cdot z\right)\right) \]
      9. *-lowering-*.f6437.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(18, x\right)\right), \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right) \]
    7. Simplified37.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(18 \cdot x\right)\right) \cdot \left(y \cdot z\right)} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(x \cdot 18\right) \cdot t\right) \cdot \left(y \cdot z\right) \]
      3. associate-*l*N/A

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

        \[\leadsto \left(x \cdot 18\right) \cdot \left(\left(t \cdot y\right) \cdot \color{blue}{z}\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \left(\left(\left(t \cdot y\right) \cdot z\right) \cdot \color{blue}{18}\right) \]
      7. associate-*r*N/A

        \[\leadsto \left(x \cdot \left(\left(t \cdot y\right) \cdot z\right)\right) \cdot \color{blue}{18} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(\left(t \cdot y\right) \cdot z\right)\right), \color{blue}{18}\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(\left(t \cdot y\right) \cdot z\right)\right), 18\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(t \cdot \left(y \cdot z\right)\right)\right), 18\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(t, \left(y \cdot z\right)\right)\right), 18\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(t, \left(z \cdot y\right)\right)\right), 18\right) \]
      13. *-lowering-*.f6439.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(z, y\right)\right)\right), 18\right) \]
    9. Applied egg-rr39.3%

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

    if -4.2e-195 < (*.f64 b c) < 4.8000000000000002e-269

    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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6437.1%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified37.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.9 \cdot 10^{+192}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -4.2 \cdot 10^{-195}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-269}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{+128}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -2.05000000000000015e197 or 5.59999999999999973e110 < (*.f64 b c)

    1. Initial program 83.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{b \cdot c} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6466.3%

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
    7. Simplified66.3%

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

    if -2.05000000000000015e197 < (*.f64 b c) < -2.20000000000000005e-88

    1. Initial program 87.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(-4, \left(t \cdot \color{blue}{a}\right)\right) \]
      3. *-lowering-*.f6432.0%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, \color{blue}{a}\right)\right) \]
    7. Simplified32.0%

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

    if -2.20000000000000005e-88 < (*.f64 b c) < -5.5999999999999999e-291

    1. Initial program 80.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(i \cdot x\right)}\right) \]
      2. *-lowering-*.f6440.0%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(i, \color{blue}{x}\right)\right) \]
    7. Simplified40.0%

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

    if -5.5999999999999999e-291 < (*.f64 b c) < 5.59999999999999973e110

    1. Initial program 85.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6435.1%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified35.1%

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

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

Alternative 6: 71.3% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.4000000000000002e87 or 1.6e16 < x

    1. Initial program 77.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-4 \cdot i\right), \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \left(\color{blue}{18} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \left(\left(t \cdot y\right) \cdot \color{blue}{z}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\left(t \cdot y\right), \color{blue}{z}\right)\right)\right)\right) \]
      7. *-lowering-*.f6469.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, y\right), z\right)\right)\right)\right) \]
    7. Simplified69.5%

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

    if -3.4000000000000002e87 < x < -1.6e-81

    1. Initial program 85.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6477.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified77.0%

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

      \[\leadsto \color{blue}{x \cdot \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 27 \cdot \frac{j \cdot k}{x}\right)\right)} \]
    7. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto x \cdot \left(\left(\frac{b \cdot c}{x} - 4 \cdot i\right) - \color{blue}{27 \cdot \frac{j \cdot k}{x}}\right) \]
      2. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \left(\left(\frac{b \cdot c}{x} + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right) - \color{blue}{27} \cdot \frac{j \cdot k}{x}\right) \]
      3. metadata-evalN/A

        \[\leadsto x \cdot \left(\left(\frac{b \cdot c}{x} + -4 \cdot i\right) - 27 \cdot \frac{j \cdot k}{x}\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \left(\left(-4 \cdot i + \frac{b \cdot c}{x}\right) - \color{blue}{27} \cdot \frac{j \cdot k}{x}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\left(-4 \cdot i + \frac{b \cdot c}{x}\right) - 27 \cdot \frac{j \cdot k}{x}\right)}\right) \]
      6. associate--l+N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-4 \cdot i + \color{blue}{\left(\frac{b \cdot c}{x} - 27 \cdot \frac{j \cdot k}{x}\right)}\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-4 \cdot i + \left(\frac{b \cdot c}{x} - \frac{27 \cdot \left(j \cdot k\right)}{\color{blue}{x}}\right)\right)\right) \]
      8. div-subN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-4 \cdot i + \frac{b \cdot c - 27 \cdot \left(j \cdot k\right)}{\color{blue}{x}}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{b \cdot c - 27 \cdot \left(j \cdot k\right)}{x} + \color{blue}{-4 \cdot i}\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{b \cdot c - 27 \cdot \left(j \cdot k\right)}{x}\right), \color{blue}{\left(-4 \cdot i\right)}\right)\right) \]
    8. Simplified79.8%

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

    if -1.6e-81 < x < 1.6e16

    1. Initial program 92.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c - 4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(b \cdot c + -4 \cdot \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(b \cdot c\right), \left(-4 \cdot \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(-4 \cdot \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \left(t \cdot a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f6480.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified80.6%

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.44999999999999982e87 or 4.5e16 < x

    1. Initial program 77.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-4 \cdot i\right), \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \left(\color{blue}{18} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \left(\left(t \cdot y\right) \cdot \color{blue}{z}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\left(t \cdot y\right), \color{blue}{z}\right)\right)\right)\right) \]
      7. *-lowering-*.f6469.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, y\right), z\right)\right)\right)\right) \]
    7. Simplified69.5%

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

    if -3.44999999999999982e87 < x < -1.8e-80

    1. Initial program 84.7%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6479.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified79.2%

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

    if -1.8e-80 < x < 4.5e16

    1. Initial program 92.4%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c - 4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(b \cdot c + -4 \cdot \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(b \cdot c\right), \left(-4 \cdot \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(-4 \cdot \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \left(t \cdot a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f6479.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified79.9%

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

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

Alternative 8: 76.0% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 88.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right)\right), \color{blue}{\left(b \cdot c\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6472.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right)\right), \mathsf{*.f64}\left(b, \color{blue}{c}\right)\right) \]
    7. Simplified72.3%

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

    if -1.7500000000000001e-30 < t < 4.19999999999999982e-60

    1. Initial program 85.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6480.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified80.5%

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

    if 4.19999999999999982e-60 < t

    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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right)\right), \color{blue}{\left(-27 \cdot \left(j \cdot k\right)\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999987e118 or 5.0000000000000004e90 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 79.4%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(t \cdot a\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      3. *-lowering-*.f6466.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, a\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
    5. Simplified66.5%

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

    if -3.99999999999999987e118 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.0000000000000004e90

    1. Initial program 87.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6456.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified56.7%

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

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto b \cdot c + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      2. metadata-evalN/A

        \[\leadsto b \cdot c + -4 \cdot \left(\color{blue}{i} \cdot x\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(b \cdot c\right), \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\color{blue}{-4} \cdot \left(i \cdot x\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\left(i \cdot x\right) \cdot \color{blue}{-4}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \color{blue}{\left(x \cdot -4\right)}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \left(-4 \cdot \color{blue}{x}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \color{blue}{\left(-4 \cdot x\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \left(x \cdot \color{blue}{-4}\right)\right)\right) \]
      10. *-lowering-*.f6453.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \mathsf{*.f64}\left(x, \color{blue}{-4}\right)\right)\right) \]
    8. Simplified53.6%

      \[\leadsto \color{blue}{b \cdot c + i \cdot \left(x \cdot -4\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 57.9% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.6e-81 or 1.1e16 < x

    1. Initial program 79.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-4 \cdot i\right), \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \left(\color{blue}{18} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \left(\left(t \cdot y\right) \cdot \color{blue}{z}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\left(t \cdot y\right), \color{blue}{z}\right)\right)\right)\right) \]
      7. *-lowering-*.f6465.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, y\right), z\right)\right)\right)\right) \]
    7. Simplified65.3%

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

    if -1.6e-81 < x < 1.09999999999999999e-237

    1. Initial program 90.2%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(t \cdot a\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      3. *-lowering-*.f6468.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, a\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
    5. Simplified68.9%

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

    if 1.09999999999999999e-237 < x < 1.1e16

    1. Initial program 95.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6470.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
    5. Simplified70.8%

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

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

Alternative 11: 57.1% accurate, 1.1× speedup?

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

\mathbf{elif}\;t \leq -9.8 \cdot 10^{-110}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\

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

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


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

    1. Initial program 88.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(-4 \cdot a\right), \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(\color{blue}{18} \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(\left(x \cdot \left(y \cdot z\right)\right) \cdot \color{blue}{18}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(x \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot 18\right)}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(x \cdot \left(18 \cdot \color{blue}{\left(y \cdot z\right)}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \color{blue}{\left(18 \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, \color{blue}{\left(y \cdot z\right)}\right)\right)\right)\right) \]
      9. *-lowering-*.f6461.1%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Simplified61.1%

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

    if -1.3500000000000001e59 < t < -9.7999999999999995e-110

    1. Initial program 93.4%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(t \cdot a\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      3. *-lowering-*.f6461.4%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, a\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
    5. Simplified61.4%

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

    if -9.7999999999999995e-110 < t < 1.72e-68

    1. Initial program 83.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6482.1%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified82.1%

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

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto b \cdot c + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      2. metadata-evalN/A

        \[\leadsto b \cdot c + -4 \cdot \left(\color{blue}{i} \cdot x\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(b \cdot c\right), \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\color{blue}{-4} \cdot \left(i \cdot x\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\left(i \cdot x\right) \cdot \color{blue}{-4}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \color{blue}{\left(x \cdot -4\right)}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \left(-4 \cdot \color{blue}{x}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \color{blue}{\left(-4 \cdot x\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \left(x \cdot \color{blue}{-4}\right)\right)\right) \]
      10. *-lowering-*.f6460.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \mathsf{*.f64}\left(x, \color{blue}{-4}\right)\right)\right) \]
    8. Simplified60.9%

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

    if 1.72e-68 < t

    1. Initial program 79.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(-4 \cdot a\right), \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(\color{blue}{18} \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(\left(x \cdot \left(y \cdot z\right)\right) \cdot \color{blue}{18}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(x \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot 18\right)}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(x \cdot \left(18 \cdot \color{blue}{\left(y \cdot z\right)}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \color{blue}{\left(18 \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, \color{blue}{\left(y \cdot z\right)}\right)\right)\right)\right) \]
      9. *-lowering-*.f6463.5%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Simplified63.5%

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a + x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(\left(x \cdot 18\right) \cdot \color{blue}{\left(y \cdot z\right)}\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot \color{blue}{z}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), \color{blue}{z}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right)\right)\right) \]
      5. *-lowering-*.f6465.6%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right)\right)\right) \]
    9. Applied egg-rr65.6%

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

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

Alternative 12: 57.0% accurate, 1.1× speedup?

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

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-110}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.74999999999999995e59 or 1.72e-68 < t

    1. Initial program 82.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(-4 \cdot a\right), \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(\color{blue}{18} \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(\left(x \cdot \left(y \cdot z\right)\right) \cdot \color{blue}{18}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(x \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot 18\right)}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \left(x \cdot \left(18 \cdot \color{blue}{\left(y \cdot z\right)}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \color{blue}{\left(18 \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, \color{blue}{\left(y \cdot z\right)}\right)\right)\right)\right) \]
      9. *-lowering-*.f6462.7%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, a\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Simplified62.7%

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

    if -2.74999999999999995e59 < t < -1.29999999999999995e-110

    1. Initial program 93.4%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(t \cdot a\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      3. *-lowering-*.f6461.4%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, a\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
    5. Simplified61.4%

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

    if -1.29999999999999995e-110 < t < 1.72e-68

    1. Initial program 83.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6482.1%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified82.1%

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

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto b \cdot c + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      2. metadata-evalN/A

        \[\leadsto b \cdot c + -4 \cdot \left(\color{blue}{i} \cdot x\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(b \cdot c\right), \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\color{blue}{-4} \cdot \left(i \cdot x\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\left(i \cdot x\right) \cdot \color{blue}{-4}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \color{blue}{\left(x \cdot -4\right)}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \left(-4 \cdot \color{blue}{x}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \color{blue}{\left(-4 \cdot x\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \left(x \cdot \color{blue}{-4}\right)\right)\right) \]
      10. *-lowering-*.f6460.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \mathsf{*.f64}\left(x, \color{blue}{-4}\right)\right)\right) \]
    8. Simplified60.9%

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

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

Alternative 13: 75.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.19999999999999973e-30 or 1.6499999999999999e-68 < t

    1. Initial program 83.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right)\right), \color{blue}{\left(b \cdot c\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6472.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right)\right), \mathsf{*.f64}\left(b, \color{blue}{c}\right)\right) \]
    7. Simplified72.3%

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

    if -5.19999999999999973e-30 < t < 1.6499999999999999e-68

    1. Initial program 86.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6481.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified81.2%

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e75

    1. Initial program 83.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6461.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
    5. Simplified61.9%

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

    if -5.0000000000000002e75 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.00000000000000028e231

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6456.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified56.9%

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

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto b \cdot c + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      2. metadata-evalN/A

        \[\leadsto b \cdot c + -4 \cdot \left(\color{blue}{i} \cdot x\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(b \cdot c\right), \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\color{blue}{-4} \cdot \left(i \cdot x\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\left(i \cdot x\right) \cdot \color{blue}{-4}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \color{blue}{\left(x \cdot -4\right)}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \left(-4 \cdot \color{blue}{x}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \color{blue}{\left(-4 \cdot x\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \left(x \cdot \color{blue}{-4}\right)\right)\right) \]
      10. *-lowering-*.f6451.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \mathsf{*.f64}\left(x, \color{blue}{-4}\right)\right)\right) \]
    8. Simplified51.8%

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

    if 5.00000000000000028e231 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 68.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6479.5%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified79.5%

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

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

        \[\leadsto \left(-27 \cdot k\right) \cdot \color{blue}{j} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-27 \cdot k\right), \color{blue}{j}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(k \cdot -27\right), j\right) \]
      5. *-lowering-*.f6479.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, -27\right), j\right) \]
    9. Applied egg-rr79.5%

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

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

Alternative 15: 37.5% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -5.20000000000000006e192 or 1.15000000000000002e115 < (*.f64 b c)

    1. Initial program 83.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{b \cdot c} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6465.4%

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
    7. Simplified65.4%

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

    if -5.20000000000000006e192 < (*.f64 b c) < -1.05e-193

    1. Initial program 83.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

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

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

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

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. associate-*r*N/A

        \[\leadsto t \cdot \left(\left(18 \cdot x\right) \cdot \color{blue}{\left(y \cdot z\right)}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(t \cdot \left(18 \cdot x\right)\right) \cdot \color{blue}{\left(y \cdot z\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(t \cdot \left(18 \cdot x\right)\right), \color{blue}{\left(y \cdot z\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(18 \cdot x\right)\right), \left(\color{blue}{y} \cdot z\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(18, x\right)\right), \left(y \cdot z\right)\right) \]
      9. *-lowering-*.f6438.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(18, x\right)\right), \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right) \]
    7. Simplified38.8%

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

    if -1.05e-193 < (*.f64 b c) < 1.15000000000000002e115

    1. Initial program 85.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6434.0%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified34.0%

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

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

Alternative 16: 36.0% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 83.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{b \cdot c} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6465.4%

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
    7. Simplified65.4%

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

    if -8.99999999999999999e193 < (*.f64 b c) < -9.79999999999999988e-291

    1. Initial program 84.5%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(i \cdot x\right)}\right) \]
      2. *-lowering-*.f6430.7%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(i, \color{blue}{x}\right)\right) \]
    7. Simplified30.7%

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

    if -9.79999999999999988e-291 < (*.f64 b c) < 1.9e115

    1. Initial program 85.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6435.1%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified35.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -9 \cdot 10^{+193}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -9.8 \cdot 10^{-291}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.9 \cdot 10^{+115}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 69.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 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{if}\;x \leq -6.8 \cdot 10^{-68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+16}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \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) (* 18.0 (* z (* y t)))))))
   (if (<= x -6.8e-68)
     t_1
     (if (<= x 2.7e+16)
       (- (+ (* b c) (* -4.0 (* t a))) (* (* j 27.0) 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) + (18.0 * (z * (y * t))));
	double tmp;
	if (x <= -6.8e-68) {
		tmp = t_1;
	} else if (x <= 2.7e+16) {
		tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * 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)) + (18.0d0 * (z * (y * t))))
    if (x <= (-6.8d-68)) then
        tmp = t_1
    else if (x <= 2.7d+16) then
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((j * 27.0d0) * 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) + (18.0 * (z * (y * t))));
	double tmp;
	if (x <= -6.8e-68) {
		tmp = t_1;
	} else if (x <= 2.7e+16) {
		tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * 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) + (18.0 * (z * (y * t))))
	tmp = 0
	if x <= -6.8e-68:
		tmp = t_1
	elif x <= 2.7e+16:
		tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * 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(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t)))))
	tmp = 0.0
	if (x <= -6.8e-68)
		tmp = t_1;
	elseif (x <= 2.7e+16)
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * 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) + (18.0 * (z * (y * t))));
	tmp = 0.0;
	if (x <= -6.8e-68)
		tmp = t_1;
	elseif (x <= 2.7e+16)
		tmp = ((b * c) + (-4.0 * (t * a))) - ((j * 27.0) * 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[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e-68], t$95$1, If[LessEqual[x, 2.7e+16], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * 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 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.80000000000000037e-68 or 2.7e16 < x

    1. Initial program 78.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-4 \cdot i\right), \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \left(\color{blue}{18} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \left(\left(t \cdot y\right) \cdot \color{blue}{z}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\left(t \cdot y\right), \color{blue}{z}\right)\right)\right)\right) \]
      7. *-lowering-*.f6465.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, i\right), \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, y\right), z\right)\right)\right)\right) \]
    7. Simplified65.7%

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

    if -6.80000000000000037e-68 < x < 2.7e16

    1. Initial program 92.6%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c - 4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(b \cdot c + -4 \cdot \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(b \cdot c\right), \left(-4 \cdot \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(-4 \cdot \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \left(t \cdot a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f6479.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(t, a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified79.6%

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

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

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

\mathbf{elif}\;j \leq 3300000000000:\\
\;\;\;\;b \cdot c + i \cdot \left(x \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -2.1000000000000001e169

    1. Initial program 85.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6463.7%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified63.7%

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

    if -2.1000000000000001e169 < j < 3.3e12

    1. Initial program 88.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6460.4%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
    5. Simplified60.4%

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

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto b \cdot c + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      2. metadata-evalN/A

        \[\leadsto b \cdot c + -4 \cdot \left(\color{blue}{i} \cdot x\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(b \cdot c\right), \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\color{blue}{-4} \cdot \left(i \cdot x\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(\left(i \cdot x\right) \cdot \color{blue}{-4}\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \color{blue}{\left(x \cdot -4\right)}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \left(i \cdot \left(-4 \cdot \color{blue}{x}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \color{blue}{\left(-4 \cdot x\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \left(x \cdot \color{blue}{-4}\right)\right)\right) \]
      10. *-lowering-*.f6451.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(i, \mathsf{*.f64}\left(x, \color{blue}{-4}\right)\right)\right) \]
    8. Simplified51.4%

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

    if 3.3e12 < j

    1. Initial program 73.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. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6440.3%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified40.3%

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

        \[\leadsto \left(-27 \cdot j\right) \cdot \color{blue}{k} \]
      2. metadata-evalN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(27\right)\right) \cdot j\right) \cdot k \]
      3. distribute-lft-neg-inN/A

        \[\leadsto \left(\mathsf{neg}\left(27 \cdot j\right)\right) \cdot k \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(j \cdot 27\right)\right) \cdot k \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(j \cdot 27\right)\right), \color{blue}{k}\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\left(j \cdot \left(\mathsf{neg}\left(27\right)\right)\right), k\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(j \cdot -27\right), k\right) \]
      8. *-lowering-*.f6440.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, -27\right), k\right) \]
    9. Applied egg-rr40.3%

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

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

Alternative 19: 37.3% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -2.40000000000000006e124 or 1.25000000000000002e115 < (*.f64 b c)

    1. Initial program 83.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{b \cdot c} \]
    6. Step-by-step derivation
      1. *-lowering-*.f6460.1%

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
    7. Simplified60.1%

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

    if -2.40000000000000006e124 < (*.f64 b c) < 1.25000000000000002e115

    1. Initial program 84.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. distribute-rgt-out--N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
      13. metadata-evalN/A

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-27, \color{blue}{\left(j \cdot k\right)}\right) \]
      2. *-lowering-*.f6430.2%

        \[\leadsto \mathsf{*.f64}\left(-27, \mathsf{*.f64}\left(j, \color{blue}{k}\right)\right) \]
    7. Simplified30.2%

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

Alternative 20: 23.3% 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 84.5%

    \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
  2. Step-by-step derivation
    1. associate--l+N/A

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

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

      \[\leadsto \mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right), \color{blue}{\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)}\right) \]
    4. distribute-rgt-out--N/A

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \left(\color{blue}{\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \color{blue}{\left(x \cdot 4\right)} \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(\color{blue}{x} \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
    11. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 18\right), y\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right)\right), \left(\left(b \cdot c - \left(x \cdot 4\right) \cdot \color{blue}{i}\right) - \left(j \cdot 27\right) \cdot k\right)\right) \]
    13. metadata-evalN/A

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

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

    \[\leadsto \color{blue}{b \cdot c} \]
  6. Step-by-step derivation
    1. *-lowering-*.f6420.8%

      \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
  7. Simplified20.8%

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

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

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

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