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

Percentage Accurate: 85.4% → 93.3%
Time: 27.4s
Alternatives: 25
Speedup: 1.0×

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 25 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: 93.3% accurate, 0.3× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ t_2 := \left(b \cdot c + t_1\right) - 4 \cdot \left(t \cdot a\right)\\ t_3 := \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\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{+286}:\\ \;\;\;\;t_3 - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: 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 (* t (* y z))) (* 4.0 i))))
        (t_2 (- (+ (* b c) t_1) (* 4.0 (* t a))))
        (t_3
         (-
          (+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
          (* (* x 4.0) i))))
   (if (<= t_3 (- INFINITY))
     t_2
     (if (<= t_3 2e+286)
       (- t_3 (* (* j 27.0) k))
       (if (<= t_3 INFINITY) t_2 t_1)))))
assert(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 * (t * (y * z))) - (4.0 * i));
	double t_2 = ((b * c) + t_1) - (4.0 * (t * a));
	double t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_3 <= 2e+286) {
		tmp = t_3 - ((j * 27.0) * k);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
assert 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 * (t * (y * z))) - (4.0 * i));
	double t_2 = ((b * c) + t_1) - (4.0 * (t * a));
	double t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else if (t_3 <= 2e+286) {
		tmp = t_3 - ((j * 27.0) * k);
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	t_2 = ((b * c) + t_1) - (4.0 * (t * a))
	t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)
	tmp = 0
	if t_3 <= -math.inf:
		tmp = t_2
	elif t_3 <= 2e+286:
		tmp = t_3 - ((j * 27.0) * k)
	elif t_3 <= math.inf:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))
	t_2 = Float64(Float64(Float64(b * c) + t_1) - Float64(4.0 * Float64(t * a)))
	t_3 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_3 <= 2e+286)
		tmp = Float64(t_3 - Float64(Float64(j * 27.0) * k));
	elseif (t_3 <= Inf)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	t_2 = ((b * c) + t_1) - (4.0 * (t * a));
	t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = t_2;
	elseif (t_3 <= 2e+286)
		tmp = t_3 - ((j * 27.0) * k);
	elseif (t_3 <= Inf)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: 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[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$2, If[LessEqual[t$95$3, 2e+286], N[(t$95$3 - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$2, t$95$1]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
t_2 := \left(b \cdot c + t_1\right) - 4 \cdot \left(t \cdot a\right)\\
t_3 := \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\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+286}:\\
\;\;\;\;t_3 - \left(j \cdot 27\right) \cdot k\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 84.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. Taylor expanded in x around 0 89.9%

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

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

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

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--21.1%

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

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

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

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

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

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

Alternative 2: 84.4% accurate, 1.0× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{+112}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\ \end{array} \end{array} \]
NOTE: 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.52e+112)
   (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
   (-
    (+ (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) (- (* b c) (* x (* 4.0 i))))
    (* j (* 27.0 k)))))
assert(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.52e+112) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else {
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
	}
	return tmp;
}
NOTE: 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.52d+112)) then
        tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    else
        tmp = ((t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) + ((b * c) - (x * (4.0d0 * i)))) - (j * (27.0d0 * k))
    end if
    code = tmp
end function
assert 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.52e+112) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else {
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -1.52e+112:
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	else:
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -1.52e+112)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)));
	else
		tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - Float64(j * Float64(27.0 * k)));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -1.52e+112)
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	else
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
	end
	tmp_2 = tmp;
end
NOTE: 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.52e+112], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{+112}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.5199999999999999e112

    1. Initial program 68.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*68.5%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--71.4%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u48.9%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef49.0%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*51.3%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr51.3%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def51.2%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p86.2%

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

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

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

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

    if -1.5199999999999999e112 < t

    1. Initial program 89.2%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--90.6%

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

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

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

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

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

Alternative 3: 85.8% accurate, 1.0× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+110}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \end{array} \]
NOTE: 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 -4.2e+110)
   (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
   (-
    (- (+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))) (* 4.0 (* t a)))
    (* (* j 27.0) k))))
assert(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 <= -4.2e+110) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else {
		tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	}
	return tmp;
}
NOTE: 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 <= (-4.2d+110)) then
        tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    else
        tmp = (((b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
    end if
    code = tmp
end function
assert 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 <= -4.2e+110) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else {
		tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -4.2e+110:
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	else:
		tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k)
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -4.2e+110)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)));
	else
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -4.2e+110)
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	else
		tmp = (((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	end
	tmp_2 = tmp;
end
NOTE: 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, -4.2e+110], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+110}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2000000000000003e110

    1. Initial program 66.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*66.6%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--72.2%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u47.6%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef47.6%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*49.9%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr49.9%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def49.8%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p86.6%

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

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

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

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

    if -4.2000000000000003e110 < t

    1. Initial program 89.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. Taylor expanded in x around 0 90.5%

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

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

Alternative 4: 69.2% accurate, 1.1× speedup?

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

\mathbf{elif}\;t \leq 9 \cdot 10^{-37}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - j \cdot \left(27 \cdot k\right)\\

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+93}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+105}:\\
\;\;\;\;b \cdot c + t_2\\

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+232} \lor \neg \left(t \leq 1.65 \cdot 10^{+261}\right):\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -3.49999999999999984e62

    1. Initial program 75.4%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--79.5%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u48.0%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef48.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*49.8%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr49.8%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def49.7%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p80.9%

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

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

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

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

    if -3.49999999999999984e62 < t < 9.00000000000000081e-37

    1. Initial program 91.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*91.2%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--91.2%

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

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

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

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

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

    if 9.00000000000000081e-37 < t < 1.35e93 or 1.02000000000000002e183 < t < 1.1e232 or 1.65e261 < t

    1. Initial program 91.7%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--93.8%

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

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

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

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

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

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

    if 1.35e93 < t < 4.7999999999999995e105

    1. Initial program 100.0%

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

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

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

    if 4.7999999999999995e105 < t < 1.02000000000000002e183

    1. Initial program 73.2%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--80.0%

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

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

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

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

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

    if 1.1e232 < t < 1.65e261

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-37}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+93}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+105}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+183}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+232} \lor \neg \left(t \leq 1.65 \cdot 10^{+261}\right):\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \end{array} \]

Alternative 5: 54.6% accurate, 1.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c + t_1\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-112}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-214}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 10^{+26}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+232}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+264}:\\ \;\;\;\;t_1 + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \end{array} \]
NOTE: 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 (* k (* j -27.0))) (t_2 (+ (* b c) t_1)))
   (if (<= t -4.8e+60)
     (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
     (if (<= t -2.8e-72)
       t_2
       (if (<= t -6e-112)
         (* -4.0 (+ (* t a) (* x i)))
         (if (<= t -4.2e-214)
           t_2
           (if (<= t 1e+26)
             (- (* b c) (* 4.0 (* x i)))
             (if (<= t 8e+232)
               (- (* b c) (* 4.0 (* t a)))
               (if (<= t 3.1e+264)
                 (+ t_1 (* (* 18.0 t) (* z (* x y))))
                 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))))))))
assert(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 = k * (j * -27.0);
	double t_2 = (b * c) + t_1;
	double tmp;
	if (t <= -4.8e+60) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= -2.8e-72) {
		tmp = t_2;
	} else if (t <= -6e-112) {
		tmp = -4.0 * ((t * a) + (x * i));
	} else if (t <= -4.2e-214) {
		tmp = t_2;
	} else if (t <= 1e+26) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 8e+232) {
		tmp = (b * c) - (4.0 * (t * a));
	} else if (t <= 3.1e+264) {
		tmp = t_1 + ((18.0 * t) * (z * (x * y)));
	} else {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	}
	return tmp;
}
NOTE: 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 = k * (j * (-27.0d0))
    t_2 = (b * c) + t_1
    if (t <= (-4.8d+60)) then
        tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    else if (t <= (-2.8d-72)) then
        tmp = t_2
    else if (t <= (-6d-112)) then
        tmp = (-4.0d0) * ((t * a) + (x * i))
    else if (t <= (-4.2d-214)) then
        tmp = t_2
    else if (t <= 1d+26) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if (t <= 8d+232) then
        tmp = (b * c) - (4.0d0 * (t * a))
    else if (t <= 3.1d+264) then
        tmp = t_1 + ((18.0d0 * t) * (z * (x * y)))
    else
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    end if
    code = tmp
end function
assert 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 = k * (j * -27.0);
	double t_2 = (b * c) + t_1;
	double tmp;
	if (t <= -4.8e+60) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= -2.8e-72) {
		tmp = t_2;
	} else if (t <= -6e-112) {
		tmp = -4.0 * ((t * a) + (x * i));
	} else if (t <= -4.2e-214) {
		tmp = t_2;
	} else if (t <= 1e+26) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 8e+232) {
		tmp = (b * c) - (4.0 * (t * a));
	} else if (t <= 3.1e+264) {
		tmp = t_1 + ((18.0 * t) * (z * (x * y)));
	} else {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = k * (j * -27.0)
	t_2 = (b * c) + t_1
	tmp = 0
	if t <= -4.8e+60:
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	elif t <= -2.8e-72:
		tmp = t_2
	elif t <= -6e-112:
		tmp = -4.0 * ((t * a) + (x * i))
	elif t <= -4.2e-214:
		tmp = t_2
	elif t <= 1e+26:
		tmp = (b * c) - (4.0 * (x * i))
	elif t <= 8e+232:
		tmp = (b * c) - (4.0 * (t * a))
	elif t <= 3.1e+264:
		tmp = t_1 + ((18.0 * t) * (z * (x * y)))
	else:
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(j * -27.0))
	t_2 = Float64(Float64(b * c) + t_1)
	tmp = 0.0
	if (t <= -4.8e+60)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)));
	elseif (t <= -2.8e-72)
		tmp = t_2;
	elseif (t <= -6e-112)
		tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)));
	elseif (t <= -4.2e-214)
		tmp = t_2;
	elseif (t <= 1e+26)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (t <= 8e+232)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a)));
	elseif (t <= 3.1e+264)
		tmp = Float64(t_1 + Float64(Float64(18.0 * t) * Float64(z * Float64(x * y))));
	else
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = k * (j * -27.0);
	t_2 = (b * c) + t_1;
	tmp = 0.0;
	if (t <= -4.8e+60)
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	elseif (t <= -2.8e-72)
		tmp = t_2;
	elseif (t <= -6e-112)
		tmp = -4.0 * ((t * a) + (x * i));
	elseif (t <= -4.2e-214)
		tmp = t_2;
	elseif (t <= 1e+26)
		tmp = (b * c) - (4.0 * (x * i));
	elseif (t <= 8e+232)
		tmp = (b * c) - (4.0 * (t * a));
	elseif (t <= 3.1e+264)
		tmp = t_1 + ((18.0 * t) * (z * (x * y)));
	else
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	end
	tmp_2 = tmp;
end
NOTE: 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -4.8e+60], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.8e-72], t$95$2, If[LessEqual[t, -6e-112], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.2e-214], t$95$2, If[LessEqual[t, 1e+26], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+232], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+264], N[(t$95$1 + N[(N[(18.0 * t), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{+60}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{elif}\;t \leq -2.8 \cdot 10^{-72}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq -4.2 \cdot 10^{-214}:\\
\;\;\;\;t_2\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -4.8e60

    1. Initial program 75.4%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--79.5%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u48.0%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef48.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*49.8%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr49.8%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def49.7%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p80.9%

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

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

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

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

    if -4.8e60 < t < -2.7999999999999998e-72 or -6.0000000000000002e-112 < t < -4.19999999999999984e-214

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

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

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

    if -2.7999999999999998e-72 < t < -6.0000000000000002e-112

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4 \cdot a, t, \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)}\right) \]
    8. Taylor expanded in b around 0 87.9%

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

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

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

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

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

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

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

    if -4.19999999999999984e-214 < t < 1.00000000000000005e26

    1. Initial program 89.2%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--89.2%

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

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

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

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

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

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

    if 1.00000000000000005e26 < t < 8.00000000000000045e232

    1. Initial program 87.1%

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

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

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

    if 8.00000000000000045e232 < t < 3.09999999999999981e264

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

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

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

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

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

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

    if 3.09999999999999981e264 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-72}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-112}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-214}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 10^{+26}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+232}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+264}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 6: 80.4% accurate, 1.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -4.75 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+45}:\\ \;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \end{array} \end{array} \]
NOTE: 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 -4.75e+89)
   (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
   (if (<= t 1.8e+45)
     (- (- (+ (* b c) (* -4.0 (* x i))) (* 4.0 (* t a))) (* (* j 27.0) k))
     (-
      (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
      (* 4.0 (* x i))))))
assert(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 <= -4.75e+89) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= 1.8e+45) {
		tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	} else {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
	}
	return tmp;
}
NOTE: 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 <= (-4.75d+89)) then
        tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    else if (t <= 1.8d+45) then
        tmp = (((b * c) + ((-4.0d0) * (x * i))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
    else
        tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
    end if
    code = tmp
end function
assert 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 <= -4.75e+89) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= 1.8e+45) {
		tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	} else {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -4.75e+89:
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	elif t <= 1.8e+45:
		tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k)
	else:
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -4.75e+89)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)));
	elseif (t <= 1.8e+45)
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i)));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -4.75e+89)
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	elseif (t <= 1.8e+45)
		tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	else
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
	end
	tmp_2 = tmp;
end
NOTE: 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, -4.75e+89], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+45], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.75 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

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

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


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

    1. Initial program 69.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*69.2%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--74.3%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u49.0%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef49.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*51.2%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr51.2%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def51.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p87.6%

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

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

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

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

    if -4.7500000000000002e89 < t < 1.8e45

    1. Initial program 91.4%

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

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

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

    if 1.8e45 < t

    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*83.8%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.75 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+45}:\\ \;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 7: 80.6% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 75.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. Taylor expanded in x around 0 86.8%

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

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

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

    if -1.3499999999999999e-12 < x < 1.1600000000000001e103

    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. Taylor expanded in x around 0 87.3%

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

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

    if 1.1600000000000001e103 < x

    1. Initial program 75.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. Taylor expanded in x around 0 87.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{-12}:\\ \;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq 1.16 \cdot 10^{+103}:\\ \;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\\ \end{array} \]

Alternative 8: 48.7% accurate, 1.2× speedup?

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

\mathbf{elif}\;b \cdot c \leq -2.8 \cdot 10^{-55}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{+119}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -9.99999999999999967e117 or 3.40000000000000013e119 < (*.f64 b c)

    1. Initial program 86.8%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999967e117 < (*.f64 b c) < -2.79999999999999984e-55 or -7.50000000000000053e-110 < (*.f64 b c) < 3.40000000000000013e119

    1. Initial program 86.9%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--88.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4 \cdot a, t, \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)}\right) \]
    8. Taylor expanded in b around 0 49.7%

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

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

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

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

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

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

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

    if -2.79999999999999984e-55 < (*.f64 b c) < -7.50000000000000053e-110

    1. Initial program 75.4%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+118}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -2.8 \cdot 10^{-55}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-110}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{+119}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 9: 79.6% accurate, 1.2× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+45}:\\ \;\;\;\;\left(\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \end{array} \]
NOTE: 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 -5.6e+89)
   (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
   (if (<= t 5.8e+45)
     (- (- (+ (* b c) (* (* t a) -4.0)) (* 4.0 (* x i))) (* j (* 27.0 k)))
     (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))))
assert(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 <= -5.6e+89) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= 5.8e+45) {
		tmp = (((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i))) - (j * (27.0 * k));
	} else {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	}
	return tmp;
}
NOTE: 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 <= (-5.6d+89)) then
        tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    else if (t <= 5.8d+45) then
        tmp = (((b * c) + ((t * a) * (-4.0d0))) - (4.0d0 * (x * i))) - (j * (27.0d0 * k))
    else
        tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
    end if
    code = tmp
end function
assert 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 <= -5.6e+89) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= 5.8e+45) {
		tmp = (((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i))) - (j * (27.0 * k));
	} else {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -5.6e+89:
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	elif t <= 5.8e+45:
		tmp = (((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i))) - (j * (27.0 * k))
	else:
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -5.6e+89)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)));
	elseif (t <= 5.8e+45)
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(4.0 * Float64(x * i))) - Float64(j * Float64(27.0 * k)));
	else
		tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -5.6e+89)
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	elseif (t <= 5.8e+45)
		tmp = (((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i))) - (j * (27.0 * k));
	else
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	end
	tmp_2 = tmp;
end
NOTE: 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, -5.6e+89], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+45], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

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

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


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

    1. Initial program 69.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*69.2%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--74.3%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u49.0%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef49.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*51.2%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr51.2%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def51.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p87.6%

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

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

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

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

    if -5.5999999999999996e89 < t < 5.7999999999999994e45

    1. Initial program 91.4%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--91.5%

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

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

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

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

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

    if 5.7999999999999994e45 < t

    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*83.8%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+45}:\\ \;\;\;\;\left(\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 10: 79.7% accurate, 1.2× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+46}:\\ \;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \end{array} \]
NOTE: 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 -5.5e+89)
   (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
   (if (<= t 2.7e+46)
     (- (- (+ (* b c) (* -4.0 (* x i))) (* 4.0 (* t a))) (* (* j 27.0) k))
     (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))))
assert(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 <= -5.5e+89) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= 2.7e+46) {
		tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	} else {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	}
	return tmp;
}
NOTE: 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 <= (-5.5d+89)) then
        tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    else if (t <= 2.7d+46) then
        tmp = (((b * c) + ((-4.0d0) * (x * i))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
    else
        tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
    end if
    code = tmp
end function
assert 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 <= -5.5e+89) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= 2.7e+46) {
		tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	} else {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -5.5e+89:
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	elif t <= 2.7e+46:
		tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k)
	else:
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -5.5e+89)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)));
	elseif (t <= 2.7e+46)
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k));
	else
		tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -5.5e+89)
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	elseif (t <= 2.7e+46)
		tmp = (((b * c) + (-4.0 * (x * i))) - (4.0 * (t * a))) - ((j * 27.0) * k);
	else
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	end
	tmp_2 = tmp;
end
NOTE: 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, -5.5e+89], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+46], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+89}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

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

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


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

    1. Initial program 69.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*69.2%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--74.3%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u49.0%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef49.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*51.2%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr51.2%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def51.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p87.6%

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

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

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

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

    if -5.49999999999999976e89 < t < 2.7000000000000002e46

    1. Initial program 91.4%

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

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

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

    if 2.7000000000000002e46 < t

    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*83.8%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+46}:\\ \;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 11: 48.0% accurate, 1.3× speedup?

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

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

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

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-72}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -3.7 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -7.6 \cdot 10^{-214}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -6.50000000000000035e245

    1. Initial program 70.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*70.0%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot t\right) \cdot \color{blue}{\left(-4\right)} \]
      3. distribute-rgt-neg-in70.6%

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

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

        \[\leadsto -\color{blue}{t \cdot \left(a \cdot 4\right)} \]
      6. distribute-rgt-neg-in70.6%

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

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

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

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

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

    if -6.50000000000000035e245 < t < -4.7500000000000002e89

    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*68.9%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7500000000000002e89 < t < -3.9999999999999998e61 or -1.75e-72 < t < -3.6999999999999998e-112

    1. Initial program 94.4%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4 \cdot a, t, \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)}\right) \]
    8. Taylor expanded in b around 0 75.8%

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

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

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

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

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

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

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

    if -3.9999999999999998e61 < t < -1.75e-72 or -3.6999999999999998e-112 < t < -7.6000000000000006e-214

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

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

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

    if -7.6000000000000006e-214 < t < 3.1e26

    1. Initial program 89.2%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--89.2%

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

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

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

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

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

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

    if 3.1e26 < t

    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. Taylor expanded in x around 0 66.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+245}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;t \leq -4.75 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+61}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-72}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{-112}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-214}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+26}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \end{array} \]

Alternative 12: 56.9% accurate, 1.3× speedup?

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

\mathbf{elif}\;t \leq -3 \cdot 10^{-72}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -2.1 \cdot 10^{-214}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.89999999999999998e61 or 8.1999999999999994e78 < t

    1. Initial program 78.6%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--82.9%

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

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

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

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

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

    if -1.89999999999999998e61 < t < -3e-72 or -4.59999999999999981e-112 < t < -2.09999999999999992e-214

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

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

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

    if -3e-72 < t < -4.59999999999999981e-112

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4 \cdot a, t, \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)}\right) \]
    8. Taylor expanded in b around 0 87.9%

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

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

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

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

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

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

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

    if -2.09999999999999992e-214 < t < 8.1999999999999994e78

    1. Initial program 90.0%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--90.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-72}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-112}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-214}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+78}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 13: 56.8% accurate, 1.3× speedup?

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

\mathbf{elif}\;t \leq -6.2 \cdot 10^{-72}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -7.2 \cdot 10^{-214}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.20000000000000016e60 or 3.8999999999999998e77 < t

    1. Initial program 78.6%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--82.9%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u50.5%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef48.2%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*50.1%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr50.1%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def52.4%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p73.1%

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

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

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

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

    if -5.20000000000000016e60 < t < -6.1999999999999996e-72 or -1.89999999999999997e-112 < t < -7.2e-214

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

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

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

    if -6.1999999999999996e-72 < t < -1.89999999999999997e-112

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4 \cdot a, t, \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)}\right) \]
    8. Taylor expanded in b around 0 87.9%

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

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

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

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

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

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

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

    if -7.2e-214 < t < 3.8999999999999998e77

    1. Initial program 90.0%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--90.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{-72}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-112}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-214}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+77}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 14: 48.4% accurate, 1.5× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ \mathbf{if}\;t \leq -6 \cdot 10^{+244}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+62}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-47}:\\ \;\;\;\;b \cdot c + t_1\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{-214}:\\ \;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;t \leq 3.45 \cdot 10^{+25}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \end{array} \end{array} \]
NOTE: 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 (* k (* j -27.0))))
   (if (<= t -6e+244)
     (* t (* a -4.0))
     (if (<= t -5.8e+89)
       (* t (* 18.0 (* y (* x z))))
       (if (<= t -2e+62)
         (* -4.0 (+ (* t a) (* x i)))
         (if (<= t -1.9e-47)
           (+ (* b c) t_1)
           (if (<= t -6.3e-214)
             (+ t_1 (* x (* i -4.0)))
             (if (<= t 3.45e+25)
               (- (* b c) (* 4.0 (* x i)))
               (- (* b c) (* 4.0 (* t a)))))))))))
assert(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 = k * (j * -27.0);
	double tmp;
	if (t <= -6e+244) {
		tmp = t * (a * -4.0);
	} else if (t <= -5.8e+89) {
		tmp = t * (18.0 * (y * (x * z)));
	} else if (t <= -2e+62) {
		tmp = -4.0 * ((t * a) + (x * i));
	} else if (t <= -1.9e-47) {
		tmp = (b * c) + t_1;
	} else if (t <= -6.3e-214) {
		tmp = t_1 + (x * (i * -4.0));
	} else if (t <= 3.45e+25) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (b * c) - (4.0 * (t * a));
	}
	return tmp;
}
NOTE: 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 = k * (j * (-27.0d0))
    if (t <= (-6d+244)) then
        tmp = t * (a * (-4.0d0))
    else if (t <= (-5.8d+89)) then
        tmp = t * (18.0d0 * (y * (x * z)))
    else if (t <= (-2d+62)) then
        tmp = (-4.0d0) * ((t * a) + (x * i))
    else if (t <= (-1.9d-47)) then
        tmp = (b * c) + t_1
    else if (t <= (-6.3d-214)) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if (t <= 3.45d+25) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else
        tmp = (b * c) - (4.0d0 * (t * a))
    end if
    code = tmp
end function
assert 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 = k * (j * -27.0);
	double tmp;
	if (t <= -6e+244) {
		tmp = t * (a * -4.0);
	} else if (t <= -5.8e+89) {
		tmp = t * (18.0 * (y * (x * z)));
	} else if (t <= -2e+62) {
		tmp = -4.0 * ((t * a) + (x * i));
	} else if (t <= -1.9e-47) {
		tmp = (b * c) + t_1;
	} else if (t <= -6.3e-214) {
		tmp = t_1 + (x * (i * -4.0));
	} else if (t <= 3.45e+25) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (b * c) - (4.0 * (t * a));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = k * (j * -27.0)
	tmp = 0
	if t <= -6e+244:
		tmp = t * (a * -4.0)
	elif t <= -5.8e+89:
		tmp = t * (18.0 * (y * (x * z)))
	elif t <= -2e+62:
		tmp = -4.0 * ((t * a) + (x * i))
	elif t <= -1.9e-47:
		tmp = (b * c) + t_1
	elif t <= -6.3e-214:
		tmp = t_1 + (x * (i * -4.0))
	elif t <= 3.45e+25:
		tmp = (b * c) - (4.0 * (x * i))
	else:
		tmp = (b * c) - (4.0 * (t * a))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(j * -27.0))
	tmp = 0.0
	if (t <= -6e+244)
		tmp = Float64(t * Float64(a * -4.0));
	elseif (t <= -5.8e+89)
		tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z))));
	elseif (t <= -2e+62)
		tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)));
	elseif (t <= -1.9e-47)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (t <= -6.3e-214)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (t <= 3.45e+25)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	else
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a)));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = k * (j * -27.0);
	tmp = 0.0;
	if (t <= -6e+244)
		tmp = t * (a * -4.0);
	elseif (t <= -5.8e+89)
		tmp = t * (18.0 * (y * (x * z)));
	elseif (t <= -2e+62)
		tmp = -4.0 * ((t * a) + (x * i));
	elseif (t <= -1.9e-47)
		tmp = (b * c) + t_1;
	elseif (t <= -6.3e-214)
		tmp = t_1 + (x * (i * -4.0));
	elseif (t <= 3.45e+25)
		tmp = (b * c) - (4.0 * (x * i));
	else
		tmp = (b * c) - (4.0 * (t * a));
	end
	tmp_2 = tmp;
end
NOTE: 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+244], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.8e+89], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2e+62], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.9e-47], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -6.3e-214], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.45e+25], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+244}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

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

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

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-47}:\\
\;\;\;\;b \cdot c + t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -5.9999999999999995e244

    1. Initial program 70.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*70.0%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot t\right) \cdot \color{blue}{\left(-4\right)} \]
      3. distribute-rgt-neg-in70.6%

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

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

        \[\leadsto -\color{blue}{t \cdot \left(a \cdot 4\right)} \]
      6. distribute-rgt-neg-in70.6%

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

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

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

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

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

    if -5.9999999999999995e244 < t < -5.80000000000000051e89

    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*68.9%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.80000000000000051e89 < t < -2.00000000000000007e62

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4 \cdot a, t, \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)}\right) \]
    8. Taylor expanded in b around 0 66.1%

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

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

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

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

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

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

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

    if -2.00000000000000007e62 < t < -1.90000000000000007e-47

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

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

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

    if -1.90000000000000007e-47 < t < -6.3000000000000002e-214

    1. Initial program 96.8%

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

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

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

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

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

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

    if -6.3000000000000002e-214 < t < 3.4499999999999999e25

    1. Initial program 89.2%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--89.2%

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

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

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

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

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

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

    if 3.4499999999999999e25 < t

    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. Taylor expanded in x around 0 66.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+244}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+62}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-47}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{-214}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;t \leq 3.45 \cdot 10^{+25}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \end{array} \]

Alternative 15: 35.5% accurate, 1.5× speedup?

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

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

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

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+186}:\\
\;\;\;\;-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) < -3.8000000000000002e66 or 4.99999999999999954e186 < (*.f64 b c)

    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*88.3%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8000000000000002e66 < (*.f64 b c) < 7.19999999999999993e-278

    1. Initial program 87.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*87.6%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot t\right) \cdot \color{blue}{\left(-4\right)} \]
      3. distribute-rgt-neg-in31.7%

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

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

        \[\leadsto -\color{blue}{t \cdot \left(a \cdot 4\right)} \]
      6. distribute-rgt-neg-in31.7%

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

        \[\leadsto t \cdot \left(-\color{blue}{4 \cdot a}\right) \]
      8. distribute-lft-neg-in31.7%

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

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

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

    if 7.19999999999999993e-278 < (*.f64 b c) < 3.7999999999999999e58

    1. Initial program 81.0%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.7999999999999999e58 < (*.f64 b c) < 4.99999999999999954e186

    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. Simplified99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.8 \cdot 10^{+66}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 7.2 \cdot 10^{-278}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{+58}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+186}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 16: 59.2% accurate, 1.5× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := \left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;k \leq 1.36 \cdot 10^{-27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 4.6 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;k \leq 6.1 \cdot 10^{+217}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \end{array} \end{array} \]
NOTE: 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 (* a -4.0))) (* 4.0 (* x i)))))
   (if (<= k 1.36e-27)
     t_1
     (if (<= k 4.6e+58)
       (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
       (if (<= k 6.1e+217) t_1 (+ (* b c) (* k (* j -27.0))))))))
assert(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 * (a * -4.0))) - (4.0 * (x * i));
	double tmp;
	if (k <= 1.36e-27) {
		tmp = t_1;
	} else if (k <= 4.6e+58) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else if (k <= 6.1e+217) {
		tmp = t_1;
	} else {
		tmp = (b * c) + (k * (j * -27.0));
	}
	return tmp;
}
NOTE: 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 * (a * (-4.0d0)))) - (4.0d0 * (x * i))
    if (k <= 1.36d-27) then
        tmp = t_1
    else if (k <= 4.6d+58) then
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    else if (k <= 6.1d+217) then
        tmp = t_1
    else
        tmp = (b * c) + (k * (j * (-27.0d0)))
    end if
    code = tmp
end function
assert 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 * (a * -4.0))) - (4.0 * (x * i));
	double tmp;
	if (k <= 1.36e-27) {
		tmp = t_1;
	} else if (k <= 4.6e+58) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else if (k <= 6.1e+217) {
		tmp = t_1;
	} else {
		tmp = (b * c) + (k * (j * -27.0));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i))
	tmp = 0
	if k <= 1.36e-27:
		tmp = t_1
	elif k <= 4.6e+58:
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	elif k <= 6.1e+217:
		tmp = t_1
	else:
		tmp = (b * c) + (k * (j * -27.0))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(b * c) + Float64(t * Float64(a * -4.0))) - Float64(4.0 * Float64(x * i)))
	tmp = 0.0
	if (k <= 1.36e-27)
		tmp = t_1;
	elseif (k <= 4.6e+58)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	elseif (k <= 6.1e+217)
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0)));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
	tmp = 0.0;
	if (k <= 1.36e-27)
		tmp = t_1;
	elseif (k <= 4.6e+58)
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	elseif (k <= 6.1e+217)
		tmp = t_1;
	else
		tmp = (b * c) + (k * (j * -27.0));
	end
	tmp_2 = tmp;
end
NOTE: 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[(b * c), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.36e-27], t$95$1, If[LessEqual[k, 4.6e+58], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.1e+217], t$95$1, N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;k \leq 1.36 \cdot 10^{-27}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;k \leq 6.1 \cdot 10^{+217}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 1.36e-27 or 4.60000000000000005e58 < k < 6.10000000000000041e217

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--89.8%

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

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

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

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

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

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

    if 1.36e-27 < k < 4.60000000000000005e58

    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*84.4%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--84.4%

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

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

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

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

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

    if 6.10000000000000041e217 < k

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.36 \cdot 10^{-27}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 4.6 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;k \leq 6.1 \cdot 10^{+217}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 17: 69.1% accurate, 1.5× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{if}\;x \leq -20000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{-203}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 1.42 \cdot 10^{+200}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: 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 (* t (* y z))) (* 4.0 i)))))
   (if (<= x -20000.0)
     t_1
     (if (<= x 2.35e-203)
       (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
       (if (<= x 1.42e+200)
         (- (+ (* b c) (* t (* a -4.0))) (* 4.0 (* x i)))
         t_1)))))
assert(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 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -20000.0) {
		tmp = t_1;
	} else if (x <= 2.35e-203) {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	} else if (x <= 1.42e+200) {
		tmp = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: 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 * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    if (x <= (-20000.0d0)) then
        tmp = t_1
    else if (x <= 2.35d-203) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
    else if (x <= 1.42d+200) then
        tmp = ((b * c) + (t * (a * (-4.0d0)))) - (4.0d0 * (x * i))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert 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 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if (x <= -20000.0) {
		tmp = t_1;
	} else if (x <= 2.35e-203) {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	} else if (x <= 1.42e+200) {
		tmp = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	tmp = 0
	if x <= -20000.0:
		tmp = t_1
	elif x <= 2.35e-203:
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k)
	elif x <= 1.42e+200:
		tmp = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i))
	else:
		tmp = t_1
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))
	tmp = 0.0
	if (x <= -20000.0)
		tmp = t_1;
	elseif (x <= 2.35e-203)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k));
	elseif (x <= 1.42e+200)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(a * -4.0))) - Float64(4.0 * Float64(x * i)));
	else
		tmp = t_1;
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	tmp = 0.0;
	if (x <= -20000.0)
		tmp = t_1;
	elseif (x <= 2.35e-203)
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	elseif (x <= 1.42e+200)
		tmp = ((b * c) + (t * (a * -4.0))) - (4.0 * (x * i));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: 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[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -20000.0], t$95$1, If[LessEqual[x, 2.35e-203], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.42e+200], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -20000:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2e4 or 1.42e200 < x

    1. Initial program 74.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*74.3%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--76.9%

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

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

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

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

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

    if -2e4 < x < 2.35000000000000003e-203

    1. Initial program 94.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. Taylor expanded in x around 0 80.0%

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

    if 2.35000000000000003e-203 < x < 1.42e200

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--89.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -20000:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{-203}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 1.42 \cdot 10^{+200}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \]

Alternative 18: 73.6% accurate, 1.5× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+45}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \end{array} \]
NOTE: 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 -3.4e+62)
   (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
   (if (<= t 1.8e+45)
     (- (- (* b c) (* 4.0 (* x i))) (* j (* 27.0 k)))
     (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))))
assert(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 <= -3.4e+62) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= 1.8e+45) {
		tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
	} else {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	}
	return tmp;
}
NOTE: 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 <= (-3.4d+62)) then
        tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    else if (t <= 1.8d+45) then
        tmp = ((b * c) - (4.0d0 * (x * i))) - (j * (27.0d0 * k))
    else
        tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
    end if
    code = tmp
end function
assert 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 <= -3.4e+62) {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	} else if (t <= 1.8e+45) {
		tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
	} else {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -3.4e+62:
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	elif t <= 1.8e+45:
		tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k))
	else:
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -3.4e+62)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)));
	elseif (t <= 1.8e+45)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(j * Float64(27.0 * k)));
	else
		tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -3.4e+62)
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	elseif (t <= 1.8e+45)
		tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
	else
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	end
	tmp_2 = tmp;
end
NOTE: 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, -3.4e+62], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+45], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+62}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

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

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


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

    1. Initial program 75.4%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--79.5%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u48.0%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot a\right) \]
      2. expm1-udef48.1%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot a\right) \]
      3. associate-*r*49.8%

        \[\leadsto t \cdot \left(18 \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right)} - 1\right) - 4 \cdot a\right) \]
    6. Applied egg-rr49.8%

      \[\leadsto t \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)} - 1\right)} - 4 \cdot a\right) \]
    7. Step-by-step derivation
      1. expm1-def49.7%

        \[\leadsto t \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(x \cdot y\right) \cdot z\right)\right)} - 4 \cdot a\right) \]
      2. expm1-log1p80.9%

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

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

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

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

    if -3.40000000000000014e62 < t < 1.8e45

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--90.9%

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

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

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

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

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

    if 1.8e45 < t

    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*83.8%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+45}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 19: 74.4% accurate, 1.5× speedup?

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+46}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - j \cdot \left(27 \cdot k\right)\\

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


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

    1. Initial program 75.4%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--79.5%

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

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

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

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

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

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

    if -3.10000000000000014e62 < t < 1.7999999999999999e46

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--90.9%

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

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

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

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

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

    if 1.7999999999999999e46 < t

    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*83.8%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 20: 49.5% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -8.4000000000000005e117 or 5.99999999999999972e122 < (*.f64 b c)

    1. Initial program 86.8%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4000000000000005e117 < (*.f64 b c) < 5.99999999999999972e122

    1. Initial program 86.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*86.2%

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4 \cdot a, t, \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)}\right) \]
    8. Taylor expanded in b around 0 47.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.4 \cdot 10^{+117} \lor \neg \left(b \cdot c \leq 6 \cdot 10^{+122}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]

Alternative 21: 31.5% accurate, 2.3× speedup?

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

\mathbf{elif}\;i \leq 8.8 \cdot 10^{-194}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;i \leq 6.8 \cdot 10^{-162}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;i \leq 4.6 \cdot 10^{+49}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -1.0500000000000001e60 or 4.60000000000000004e49 < i

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0500000000000001e60 < i < 8.8000000000000005e-194 or 6.8e-162 < i < 4.60000000000000004e49

    1. Initial program 92.9%

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

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

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--93.7%

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*90.7%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)}\right)\right) - j \cdot \left(27 \cdot k\right) \]
    3. Simplified90.7%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+90.7%

        \[\leadsto \color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      2. *-commutative90.7%

        \[\leadsto \color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) \cdot t} + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      3. fma-def91.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      4. associate-*l*91.6%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(18 \cdot \left(y \cdot z\right)\right)} - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      5. fma-neg91.6%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -a \cdot 4\right)}, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      6. *-commutative91.6%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \color{blue}{\left(z \cdot y\right)}, -a \cdot 4\right), t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      7. associate-*r*91.6%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      8. *-commutative91.6%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{i \cdot \left(x \cdot 4\right)}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      9. associate-*r*91.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{\left(j \cdot 27\right) \cdot k}\right) \]
      10. *-commutative91.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    5. Applied egg-rr91.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\right)} \]
    6. Taylor expanded in b around inf 44.2%

      \[\leadsto \color{blue}{b \cdot c} \]

    if 8.8000000000000005e-194 < i < 6.8e-162

    1. Initial program 66.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified88.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + k \cdot \left(j \cdot -27\right)} \]
    3. Taylor expanded in k around inf 56.7%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.05 \cdot 10^{+60}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;i \leq 8.8 \cdot 10^{-194}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;i \leq 6.8 \cdot 10^{-162}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;i \leq 4.6 \cdot 10^{+49}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \end{array} \]

Alternative 22: 31.6% accurate, 2.3× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := i \cdot \left(x \cdot -4\right)\\ \mathbf{if}\;i \leq -3 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 8.5 \cdot 10^{-194}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;i \leq 2.4 \cdot 10^{-162}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;i \leq 1.35 \cdot 10^{+50}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* i (* x -4.0))))
   (if (<= i -3e+57)
     t_1
     (if (<= i 8.5e-194)
       (* b c)
       (if (<= i 2.4e-162)
         (* j (* k -27.0))
         (if (<= i 1.35e+50) (* b c) t_1))))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = i * (x * -4.0);
	double tmp;
	if (i <= -3e+57) {
		tmp = t_1;
	} else if (i <= 8.5e-194) {
		tmp = b * c;
	} else if (i <= 2.4e-162) {
		tmp = j * (k * -27.0);
	} else if (i <= 1.35e+50) {
		tmp = b * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: 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 = i * (x * (-4.0d0))
    if (i <= (-3d+57)) then
        tmp = t_1
    else if (i <= 8.5d-194) then
        tmp = b * c
    else if (i <= 2.4d-162) then
        tmp = j * (k * (-27.0d0))
    else if (i <= 1.35d+50) then
        tmp = b * c
    else
        tmp = t_1
    end if
    code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = i * (x * -4.0);
	double tmp;
	if (i <= -3e+57) {
		tmp = t_1;
	} else if (i <= 8.5e-194) {
		tmp = b * c;
	} else if (i <= 2.4e-162) {
		tmp = j * (k * -27.0);
	} else if (i <= 1.35e+50) {
		tmp = b * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = i * (x * -4.0)
	tmp = 0
	if i <= -3e+57:
		tmp = t_1
	elif i <= 8.5e-194:
		tmp = b * c
	elif i <= 2.4e-162:
		tmp = j * (k * -27.0)
	elif i <= 1.35e+50:
		tmp = b * c
	else:
		tmp = t_1
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(i * Float64(x * -4.0))
	tmp = 0.0
	if (i <= -3e+57)
		tmp = t_1;
	elseif (i <= 8.5e-194)
		tmp = Float64(b * c);
	elseif (i <= 2.4e-162)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (i <= 1.35e+50)
		tmp = Float64(b * c);
	else
		tmp = t_1;
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = i * (x * -4.0);
	tmp = 0.0;
	if (i <= -3e+57)
		tmp = t_1;
	elseif (i <= 8.5e-194)
		tmp = b * c;
	elseif (i <= 2.4e-162)
		tmp = j * (k * -27.0);
	elseif (i <= 1.35e+50)
		tmp = b * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3e+57], t$95$1, If[LessEqual[i, 8.5e-194], N[(b * c), $MachinePrecision], If[LessEqual[i, 2.4e-162], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.35e+50], N[(b * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;i \leq -3 \cdot 10^{+57}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 8.5 \cdot 10^{-194}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;i \leq 2.4 \cdot 10^{-162}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;i \leq 1.35 \cdot 10^{+50}:\\
\;\;\;\;b \cdot c\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -3e57 or 1.35e50 < i

    1. Initial program 80.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*80.9%

        \[\leadsto \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+80.9%

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--83.4%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*82.6%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*82.6%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)}\right)\right) - j \cdot \left(27 \cdot k\right) \]
    3. Simplified82.6%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+82.6%

        \[\leadsto \color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      2. *-commutative82.6%

        \[\leadsto \color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) \cdot t} + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      3. fma-def85.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      4. associate-*l*85.1%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(18 \cdot \left(y \cdot z\right)\right)} - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      5. fma-neg85.1%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -a \cdot 4\right)}, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      6. *-commutative85.1%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \color{blue}{\left(z \cdot y\right)}, -a \cdot 4\right), t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      7. associate-*r*85.1%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      8. *-commutative85.1%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{i \cdot \left(x \cdot 4\right)}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      9. associate-*r*85.1%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{\left(j \cdot 27\right) \cdot k}\right) \]
      10. *-commutative85.1%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    5. Applied egg-rr85.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\right)} \]
    6. Taylor expanded in i around inf 41.8%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. associate-*r*41.8%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} \]
      2. *-commutative41.8%

        \[\leadsto \color{blue}{\left(i \cdot -4\right)} \cdot x \]
      3. associate-*r*41.8%

        \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} \]
    8. Simplified41.8%

      \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} \]

    if -3e57 < i < 8.5000000000000005e-194 or 2.4000000000000002e-162 < i < 1.35e50

    1. Initial program 92.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*92.9%

        \[\leadsto \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+92.9%

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--93.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*90.7%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*90.7%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)}\right)\right) - j \cdot \left(27 \cdot k\right) \]
    3. Simplified90.7%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+90.7%

        \[\leadsto \color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      2. *-commutative90.7%

        \[\leadsto \color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) \cdot t} + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      3. fma-def91.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      4. associate-*l*91.6%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(18 \cdot \left(y \cdot z\right)\right)} - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      5. fma-neg91.6%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -a \cdot 4\right)}, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      6. *-commutative91.6%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \color{blue}{\left(z \cdot y\right)}, -a \cdot 4\right), t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      7. associate-*r*91.6%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      8. *-commutative91.6%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{i \cdot \left(x \cdot 4\right)}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      9. associate-*r*91.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{\left(j \cdot 27\right) \cdot k}\right) \]
      10. *-commutative91.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    5. Applied egg-rr91.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\right)} \]
    6. Taylor expanded in b around inf 44.2%

      \[\leadsto \color{blue}{b \cdot c} \]

    if 8.5000000000000005e-194 < i < 2.4000000000000002e-162

    1. Initial program 66.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*67.1%

        \[\leadsto \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+67.1%

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--67.1%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.5%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)}\right)\right) - j \cdot \left(27 \cdot k\right) \]
    3. Simplified88.5%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+88.5%

        \[\leadsto \color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      2. *-commutative88.5%

        \[\leadsto \color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) \cdot t} + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      3. fma-def99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      4. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(18 \cdot \left(y \cdot z\right)\right)} - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      5. fma-neg99.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -a \cdot 4\right)}, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      6. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \color{blue}{\left(z \cdot y\right)}, -a \cdot 4\right), t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      7. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      8. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{i \cdot \left(x \cdot 4\right)}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      9. associate-*r*99.3%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{\left(j \cdot 27\right) \cdot k}\right) \]
      10. *-commutative99.3%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    5. Applied egg-rr99.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\right)} \]
    6. Taylor expanded in k around inf 56.7%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    7. Step-by-step derivation
      1. *-commutative56.7%

        \[\leadsto -27 \cdot \color{blue}{\left(k \cdot j\right)} \]
      2. metadata-eval56.7%

        \[\leadsto \color{blue}{\left(-27\right)} \cdot \left(k \cdot j\right) \]
      3. distribute-lft-neg-in56.7%

        \[\leadsto \color{blue}{-27 \cdot \left(k \cdot j\right)} \]
      4. associate-*r*57.0%

        \[\leadsto -\color{blue}{\left(27 \cdot k\right) \cdot j} \]
      5. *-commutative57.0%

        \[\leadsto -\color{blue}{j \cdot \left(27 \cdot k\right)} \]
      6. distribute-rgt-neg-in57.0%

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} \]
      7. *-commutative57.0%

        \[\leadsto j \cdot \left(-\color{blue}{k \cdot 27}\right) \]
      8. distribute-rgt-neg-in57.0%

        \[\leadsto j \cdot \color{blue}{\left(k \cdot \left(-27\right)\right)} \]
      9. metadata-eval57.0%

        \[\leadsto j \cdot \left(k \cdot \color{blue}{-27}\right) \]
    8. Simplified57.0%

      \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -3 \cdot 10^{+57}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;i \leq 8.5 \cdot 10^{-194}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;i \leq 2.4 \cdot 10^{-162}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;i \leq 1.35 \cdot 10^{+50}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \end{array} \]

Alternative 23: 51.0% accurate, 2.4× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;i \leq -1.4 \cdot 10^{+58} \lor \neg \left(i \leq 1.1 \cdot 10^{+23}\right):\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \end{array} \end{array} \]
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= i -1.4e+58) (not (<= i 1.1e+23)))
   (* -4.0 (+ (* t a) (* x i)))
   (+ (* b c) (* k (* j -27.0)))))
assert(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 ((i <= -1.4e+58) || !(i <= 1.1e+23)) {
		tmp = -4.0 * ((t * a) + (x * i));
	} else {
		tmp = (b * c) + (k * (j * -27.0));
	}
	return tmp;
}
NOTE: 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 ((i <= (-1.4d+58)) .or. (.not. (i <= 1.1d+23))) then
        tmp = (-4.0d0) * ((t * a) + (x * i))
    else
        tmp = (b * c) + (k * (j * (-27.0d0)))
    end if
    code = tmp
end function
assert 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 ((i <= -1.4e+58) || !(i <= 1.1e+23)) {
		tmp = -4.0 * ((t * a) + (x * i));
	} else {
		tmp = (b * c) + (k * (j * -27.0));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (i <= -1.4e+58) or not (i <= 1.1e+23):
		tmp = -4.0 * ((t * a) + (x * i))
	else:
		tmp = (b * c) + (k * (j * -27.0))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((i <= -1.4e+58) || !(i <= 1.1e+23))
		tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)));
	else
		tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0)));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((i <= -1.4e+58) || ~((i <= 1.1e+23)))
		tmp = -4.0 * ((t * a) + (x * i));
	else
		tmp = (b * c) + (k * (j * -27.0));
	end
	tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[i, -1.4e+58], N[Not[LessEqual[i, 1.1e+23]], $MachinePrecision]], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.4 \cdot 10^{+58} \lor \neg \left(i \leq 1.1 \cdot 10^{+23}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -1.3999999999999999e58 or 1.10000000000000004e23 < i

    1. Initial program 81.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*81.5%

        \[\leadsto \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+81.5%

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--83.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*83.1%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*83.1%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)}\right)\right) - j \cdot \left(27 \cdot k\right) \]
    3. Simplified83.1%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+83.1%

        \[\leadsto \color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      2. *-commutative83.1%

        \[\leadsto \color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) \cdot t} + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      3. fma-def85.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      4. associate-*l*85.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(18 \cdot \left(y \cdot z\right)\right)} - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      5. fma-neg85.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -a \cdot 4\right)}, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      6. *-commutative85.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \color{blue}{\left(z \cdot y\right)}, -a \cdot 4\right), t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      7. associate-*r*85.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      8. *-commutative85.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{i \cdot \left(x \cdot 4\right)}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      9. associate-*r*85.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{\left(j \cdot 27\right) \cdot k}\right) \]
      10. *-commutative85.5%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    5. Applied egg-rr85.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\right)} \]
    6. Taylor expanded in x around 0 75.9%

      \[\leadsto \mathsf{fma}\left(\color{blue}{-4 \cdot a}, t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\right) \]
    7. Taylor expanded in k around 0 68.2%

      \[\leadsto \mathsf{fma}\left(-4 \cdot a, t, \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)}\right) \]
    8. Taylor expanded in b around 0 57.6%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv57.6%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + \left(-4\right) \cdot \left(i \cdot x\right)} \]
      2. metadata-eval57.6%

        \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      3. *-commutative57.6%

        \[\leadsto -4 \cdot \left(a \cdot t\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      4. distribute-lft-out57.6%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t + x \cdot i\right)} \]
      5. *-commutative57.6%

        \[\leadsto -4 \cdot \left(\color{blue}{t \cdot a} + x \cdot i\right) \]
    10. Simplified57.6%

      \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]

    if -1.3999999999999999e58 < i < 1.10000000000000004e23

    1. Initial program 90.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified91.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + k \cdot \left(j \cdot -27\right)} \]
    3. Taylor expanded in b around inf 60.7%

      \[\leadsto \color{blue}{b \cdot c} + k \cdot \left(j \cdot -27\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.4 \cdot 10^{+58} \lor \neg \left(i \leq 1.1 \cdot 10^{+23}\right):\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 24: 33.2% accurate, 3.4× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;c \leq -2.4 \cdot 10^{-50} \lor \neg \left(c \leq 4.9 \cdot 10^{-20}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= c -2.4e-50) (not (<= c 4.9e-20))) (* b c) (* -27.0 (* j k))))
assert(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 ((c <= -2.4e-50) || !(c <= 4.9e-20)) {
		tmp = b * c;
	} else {
		tmp = -27.0 * (j * k);
	}
	return tmp;
}
NOTE: 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 ((c <= (-2.4d-50)) .or. (.not. (c <= 4.9d-20))) then
        tmp = b * c
    else
        tmp = (-27.0d0) * (j * k)
    end if
    code = tmp
end function
assert 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 ((c <= -2.4e-50) || !(c <= 4.9e-20)) {
		tmp = b * c;
	} else {
		tmp = -27.0 * (j * k);
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (c <= -2.4e-50) or not (c <= 4.9e-20):
		tmp = b * c
	else:
		tmp = -27.0 * (j * k)
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((c <= -2.4e-50) || !(c <= 4.9e-20))
		tmp = Float64(b * c);
	else
		tmp = Float64(-27.0 * Float64(j * k));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((c <= -2.4e-50) || ~((c <= 4.9e-20)))
		tmp = b * c;
	else
		tmp = -27.0 * (j * k);
	end
	tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[c, -2.4e-50], N[Not[LessEqual[c, 4.9e-20]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.4 \cdot 10^{-50} \lor \neg \left(c \leq 4.9 \cdot 10^{-20}\right):\\
\;\;\;\;b \cdot c\\

\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.40000000000000002e-50 or 4.9000000000000002e-20 < c

    1. Initial program 86.5%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*86.4%

        \[\leadsto \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+86.4%

        \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*84.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)}\right)\right) - j \cdot \left(27 \cdot k\right) \]
    3. Simplified84.9%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+84.9%

        \[\leadsto \color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      2. *-commutative84.9%

        \[\leadsto \color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) \cdot t} + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      3. fma-def87.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
      4. associate-*l*87.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(18 \cdot \left(y \cdot z\right)\right)} - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      5. fma-neg87.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -a \cdot 4\right)}, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      6. *-commutative87.9%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \color{blue}{\left(z \cdot y\right)}, -a \cdot 4\right), t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
      7. associate-*r*87.9%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      8. *-commutative87.9%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{i \cdot \left(x \cdot 4\right)}\right) - j \cdot \left(27 \cdot k\right)\right) \]
      9. associate-*r*87.9%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{\left(j \cdot 27\right) \cdot k}\right) \]
      10. *-commutative87.9%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    5. Applied egg-rr87.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\right)} \]
    6. Taylor expanded in b around inf 46.9%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -2.40000000000000002e-50 < c < 4.9000000000000002e-20

    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. Simplified88.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + k \cdot \left(j \cdot -27\right)} \]
    3. Taylor expanded in k around inf 25.3%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.4 \cdot 10^{-50} \lor \neg \left(c \leq 4.9 \cdot 10^{-20}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 25: 24.1% accurate, 10.3× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ b \cdot c \end{array} \]
NOTE: 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(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: 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 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;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	return b * c
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(b * c)
end
j, k = num2cell(sort([j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = b * c;
end
NOTE: 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}
[j, k] = \mathsf{sort}([j, k])\\
\\
b \cdot c
\end{array}
Derivation
  1. Initial program 86.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*86.4%

      \[\leadsto \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
    2. associate--l+86.4%

      \[\leadsto \color{blue}{\left(\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)} - j \cdot \left(27 \cdot k\right) \]
    3. distribute-rgt-out--88.0%

      \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
    4. associate-*l*86.8%

      \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
    5. associate-*l*86.8%

      \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)}\right)\right) - j \cdot \left(27 \cdot k\right) \]
  3. Simplified86.8%

    \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
  4. Step-by-step derivation
    1. associate--l+86.8%

      \[\leadsto \color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
    2. *-commutative86.8%

      \[\leadsto \color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) \cdot t} + \left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
    3. fma-def88.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right)} \]
    4. associate-*l*88.8%

      \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(18 \cdot \left(y \cdot z\right)\right)} - a \cdot 4, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
    5. fma-neg88.8%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -a \cdot 4\right)}, t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
    6. *-commutative88.8%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \color{blue}{\left(z \cdot y\right)}, -a \cdot 4\right), t, \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\right) \]
    7. associate-*r*88.8%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{\left(x \cdot 4\right) \cdot i}\right) - j \cdot \left(27 \cdot k\right)\right) \]
    8. *-commutative88.8%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - \color{blue}{i \cdot \left(x \cdot 4\right)}\right) - j \cdot \left(27 \cdot k\right)\right) \]
    9. associate-*r*88.8%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{\left(j \cdot 27\right) \cdot k}\right) \]
    10. *-commutative88.8%

      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
  5. Applied egg-rr88.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -a \cdot 4\right), t, \left(b \cdot c - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\right)} \]
  6. Taylor expanded in b around inf 28.8%

    \[\leadsto \color{blue}{b \cdot c} \]
  7. Final simplification28.8%

    \[\leadsto b \cdot c \]

Developer target: 89.2% accurate, 0.9× 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 2023309 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :herbie-target
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))