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

Percentage Accurate: 84.9% → 91.2%
Time: 29.6s
Alternatives: 24
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 24 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: 84.9% accurate, 1.0× speedup?

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

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

Alternative 1: 91.2% accurate, 0.1× speedup?

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

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


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

    1. Initial program 95.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. sub-neg95.1%

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

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

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

    1. Initial program 0.0%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.6% accurate, 0.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right) \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
 (fma
  j
  (* k -27.0)
  (fma x (* i -4.0) (fma t (fma x (* 18.0 (* y z)) (* -4.0 a)) (* 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 fma(j, (k * -27.0), fma(x, (i * -4.0), fma(t, fma(x, (18.0 * (y * z)), (-4.0 * a)), (b * c))));
}
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)), Float64(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[(j * N[(k * -27.0), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right)
\end{array}
Derivation
  1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \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) + b \cdot c\right) + \left(-\left(x \cdot 4\right) \cdot i\right)}\right) \]
    10. +-commutative89.6%

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

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

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

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

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

Alternative 3: 91.2% accurate, 0.1× speedup?

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

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


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

    1. Initial program 95.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. sub-neg95.1%

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

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

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

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

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

    1. Initial program 0.0%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.1% accurate, 0.5× speedup?

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

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


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

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

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

    1. Initial program 0.0%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 86.0% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -7.20000000000000063e131

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000063e131 < i

    1. Initial program 89.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. sub-neg89.9%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-89.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg89.9%

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*91.2%

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

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

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

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

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

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

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

Alternative 6: 58.5% 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 := x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ t_3 := k \cdot \left(j \cdot -27\right)\\ t_4 := t_3 + b \cdot c\\ t_5 := -4 \cdot \left(x \cdot i\right)\\ t_6 := b \cdot c + t_1\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-96}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-124}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + t_5\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-182}:\\ \;\;\;\;t_1 - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq -1.06 \cdot 10^{-271}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-279}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-80}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+33}:\\ \;\;\;\;t_3 + t_5\\ \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 (* -4.0 (* t a)))
        (t_2 (* x (- (* 18.0 (* y (* t z))) (* i 4.0))))
        (t_3 (* k (* j -27.0)))
        (t_4 (+ t_3 (* b c)))
        (t_5 (* -4.0 (* x i)))
        (t_6 (+ (* b c) t_1)))
   (if (<= x -1.05e+70)
     t_2
     (if (<= x -1.6e-96)
       t_4
       (if (<= x -1.05e-124)
         (+ (* 18.0 (* y (* t (* x z)))) t_5)
         (if (<= x -2.1e-182)
           (- t_1 (* 27.0 (* j k)))
           (if (<= x -1.06e-271)
             t_6
             (if (<= x 8.5e-279)
               t_4
               (if (<= x 1.3e-80)
                 t_6
                 (if (<= x 5.2e+33) (+ t_3 t_5) 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 * (t * a);
	double t_2 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	double t_3 = k * (j * -27.0);
	double t_4 = t_3 + (b * c);
	double t_5 = -4.0 * (x * i);
	double t_6 = (b * c) + t_1;
	double tmp;
	if (x <= -1.05e+70) {
		tmp = t_2;
	} else if (x <= -1.6e-96) {
		tmp = t_4;
	} else if (x <= -1.05e-124) {
		tmp = (18.0 * (y * (t * (x * z)))) + t_5;
	} else if (x <= -2.1e-182) {
		tmp = t_1 - (27.0 * (j * k));
	} else if (x <= -1.06e-271) {
		tmp = t_6;
	} else if (x <= 8.5e-279) {
		tmp = t_4;
	} else if (x <= 1.3e-80) {
		tmp = t_6;
	} else if (x <= 5.2e+33) {
		tmp = t_3 + t_5;
	} 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) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: tmp
    t_1 = (-4.0d0) * (t * a)
    t_2 = x * ((18.0d0 * (y * (t * z))) - (i * 4.0d0))
    t_3 = k * (j * (-27.0d0))
    t_4 = t_3 + (b * c)
    t_5 = (-4.0d0) * (x * i)
    t_6 = (b * c) + t_1
    if (x <= (-1.05d+70)) then
        tmp = t_2
    else if (x <= (-1.6d-96)) then
        tmp = t_4
    else if (x <= (-1.05d-124)) then
        tmp = (18.0d0 * (y * (t * (x * z)))) + t_5
    else if (x <= (-2.1d-182)) then
        tmp = t_1 - (27.0d0 * (j * k))
    else if (x <= (-1.06d-271)) then
        tmp = t_6
    else if (x <= 8.5d-279) then
        tmp = t_4
    else if (x <= 1.3d-80) then
        tmp = t_6
    else if (x <= 5.2d+33) then
        tmp = t_3 + t_5
    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 = -4.0 * (t * a);
	double t_2 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	double t_3 = k * (j * -27.0);
	double t_4 = t_3 + (b * c);
	double t_5 = -4.0 * (x * i);
	double t_6 = (b * c) + t_1;
	double tmp;
	if (x <= -1.05e+70) {
		tmp = t_2;
	} else if (x <= -1.6e-96) {
		tmp = t_4;
	} else if (x <= -1.05e-124) {
		tmp = (18.0 * (y * (t * (x * z)))) + t_5;
	} else if (x <= -2.1e-182) {
		tmp = t_1 - (27.0 * (j * k));
	} else if (x <= -1.06e-271) {
		tmp = t_6;
	} else if (x <= 8.5e-279) {
		tmp = t_4;
	} else if (x <= 1.3e-80) {
		tmp = t_6;
	} else if (x <= 5.2e+33) {
		tmp = t_3 + t_5;
	} 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 = -4.0 * (t * a)
	t_2 = x * ((18.0 * (y * (t * z))) - (i * 4.0))
	t_3 = k * (j * -27.0)
	t_4 = t_3 + (b * c)
	t_5 = -4.0 * (x * i)
	t_6 = (b * c) + t_1
	tmp = 0
	if x <= -1.05e+70:
		tmp = t_2
	elif x <= -1.6e-96:
		tmp = t_4
	elif x <= -1.05e-124:
		tmp = (18.0 * (y * (t * (x * z)))) + t_5
	elif x <= -2.1e-182:
		tmp = t_1 - (27.0 * (j * k))
	elif x <= -1.06e-271:
		tmp = t_6
	elif x <= 8.5e-279:
		tmp = t_4
	elif x <= 1.3e-80:
		tmp = t_6
	elif x <= 5.2e+33:
		tmp = t_3 + t_5
	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(-4.0 * Float64(t * a))
	t_2 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(t * z))) - Float64(i * 4.0)))
	t_3 = Float64(k * Float64(j * -27.0))
	t_4 = Float64(t_3 + Float64(b * c))
	t_5 = Float64(-4.0 * Float64(x * i))
	t_6 = Float64(Float64(b * c) + t_1)
	tmp = 0.0
	if (x <= -1.05e+70)
		tmp = t_2;
	elseif (x <= -1.6e-96)
		tmp = t_4;
	elseif (x <= -1.05e-124)
		tmp = Float64(Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) + t_5);
	elseif (x <= -2.1e-182)
		tmp = Float64(t_1 - Float64(27.0 * Float64(j * k)));
	elseif (x <= -1.06e-271)
		tmp = t_6;
	elseif (x <= 8.5e-279)
		tmp = t_4;
	elseif (x <= 1.3e-80)
		tmp = t_6;
	elseif (x <= 5.2e+33)
		tmp = Float64(t_3 + t_5);
	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 = -4.0 * (t * a);
	t_2 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	t_3 = k * (j * -27.0);
	t_4 = t_3 + (b * c);
	t_5 = -4.0 * (x * i);
	t_6 = (b * c) + t_1;
	tmp = 0.0;
	if (x <= -1.05e+70)
		tmp = t_2;
	elseif (x <= -1.6e-96)
		tmp = t_4;
	elseif (x <= -1.05e-124)
		tmp = (18.0 * (y * (t * (x * z)))) + t_5;
	elseif (x <= -2.1e-182)
		tmp = t_1 - (27.0 * (j * k));
	elseif (x <= -1.06e-271)
		tmp = t_6;
	elseif (x <= 8.5e-279)
		tmp = t_4;
	elseif (x <= 1.3e-80)
		tmp = t_6;
	elseif (x <= 5.2e+33)
		tmp = t_3 + t_5;
	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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[x, -1.05e+70], t$95$2, If[LessEqual[x, -1.6e-96], t$95$4, If[LessEqual[x, -1.05e-124], N[(N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision], If[LessEqual[x, -2.1e-182], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.06e-271], t$95$6, If[LessEqual[x, 8.5e-279], t$95$4, If[LessEqual[x, 1.3e-80], t$95$6, If[LessEqual[x, 5.2e+33], N[(t$95$3 + t$95$5), $MachinePrecision], t$95$2]]]]]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
t_3 := k \cdot \left(j \cdot -27\right)\\
t_4 := t_3 + b \cdot c\\
t_5 := -4 \cdot \left(x \cdot i\right)\\
t_6 := b \cdot c + t_1\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+70}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.6 \cdot 10^{-96}:\\
\;\;\;\;t_4\\

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

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

\mathbf{elif}\;x \leq -1.06 \cdot 10^{-271}:\\
\;\;\;\;t_6\\

\mathbf{elif}\;x \leq 8.5 \cdot 10^{-279}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{-80}:\\
\;\;\;\;t_6\\

\mathbf{elif}\;x \leq 5.2 \cdot 10^{+33}:\\
\;\;\;\;t_3 + t_5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -1.05000000000000004e70 or 5.1999999999999995e33 < x

    1. Initial program 78.8%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-78.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg78.8%

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000004e70 < x < -1.60000000000000006e-96 or -1.06e-271 < x < 8.5000000000000002e-279

    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. sub-neg91.4%

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

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

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

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

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

    if -1.60000000000000006e-96 < x < -1.05e-124

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg100.0%

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. 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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in100.0%

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

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

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

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

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

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

    if -1.05e-124 < x < -2.1e-182

    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. sub-neg89.2%

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*78.1%

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

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

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

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

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

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

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

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

    if -2.1e-182 < x < -1.06e-271 or 8.5000000000000002e-279 < x < 1.3e-80

    1. Initial program 95.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. sub-neg95.2%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-95.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e-80 < x < 5.1999999999999995e33

    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. sub-neg92.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+70}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-96}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{-124}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-182}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq -1.06 \cdot 10^{-271}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-279}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-80}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+33}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ \end{array} \]

Alternative 7: 72.8% accurate, 1.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := 27 \cdot \left(j \cdot k\right)\\ t_2 := -4 \cdot \left(t \cdot a + x \cdot i\right) - t_1\\ t_3 := x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ t_4 := \left(b \cdot c + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;x \leq -2.2 \cdot 10^{+86}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-55}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\ \mathbf{elif}\;x \leq 0.155:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 5.9 \cdot 10^{+26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+117}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 10^{+189}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \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 (* 27.0 (* j k)))
        (t_2 (- (* -4.0 (+ (* t a) (* x i))) t_1))
        (t_3 (* x (- (* 18.0 (* y (* t z))) (* i 4.0))))
        (t_4 (- (+ (* b c) (* 18.0 (* y (* t (* x z))))) (* 4.0 (* x i)))))
   (if (<= x -2.2e+86)
     t_3
     (if (<= x 7.5e-55)
       (- (+ (* b c) (* -4.0 (* t a))) t_1)
       (if (<= x 0.155)
         t_4
         (if (<= x 5.9e+26)
           t_2
           (if (<= x 2.2e+117) t_4 (if (<= x 1e+189) t_2 t_3))))))))
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 = 27.0 * (j * k);
	double t_2 = (-4.0 * ((t * a) + (x * i))) - t_1;
	double t_3 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	double t_4 = ((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (x * i));
	double tmp;
	if (x <= -2.2e+86) {
		tmp = t_3;
	} else if (x <= 7.5e-55) {
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	} else if (x <= 0.155) {
		tmp = t_4;
	} else if (x <= 5.9e+26) {
		tmp = t_2;
	} else if (x <= 2.2e+117) {
		tmp = t_4;
	} else if (x <= 1e+189) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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) :: t_4
    real(8) :: tmp
    t_1 = 27.0d0 * (j * k)
    t_2 = ((-4.0d0) * ((t * a) + (x * i))) - t_1
    t_3 = x * ((18.0d0 * (y * (t * z))) - (i * 4.0d0))
    t_4 = ((b * c) + (18.0d0 * (y * (t * (x * z))))) - (4.0d0 * (x * i))
    if (x <= (-2.2d+86)) then
        tmp = t_3
    else if (x <= 7.5d-55) then
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
    else if (x <= 0.155d0) then
        tmp = t_4
    else if (x <= 5.9d+26) then
        tmp = t_2
    else if (x <= 2.2d+117) then
        tmp = t_4
    else if (x <= 1d+189) then
        tmp = t_2
    else
        tmp = t_3
    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 = 27.0 * (j * k);
	double t_2 = (-4.0 * ((t * a) + (x * i))) - t_1;
	double t_3 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	double t_4 = ((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (x * i));
	double tmp;
	if (x <= -2.2e+86) {
		tmp = t_3;
	} else if (x <= 7.5e-55) {
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	} else if (x <= 0.155) {
		tmp = t_4;
	} else if (x <= 5.9e+26) {
		tmp = t_2;
	} else if (x <= 2.2e+117) {
		tmp = t_4;
	} else if (x <= 1e+189) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = 27.0 * (j * k)
	t_2 = (-4.0 * ((t * a) + (x * i))) - t_1
	t_3 = x * ((18.0 * (y * (t * z))) - (i * 4.0))
	t_4 = ((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (x * i))
	tmp = 0
	if x <= -2.2e+86:
		tmp = t_3
	elif x <= 7.5e-55:
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1
	elif x <= 0.155:
		tmp = t_4
	elif x <= 5.9e+26:
		tmp = t_2
	elif x <= 2.2e+117:
		tmp = t_4
	elif x <= 1e+189:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(27.0 * Float64(j * k))
	t_2 = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - t_1)
	t_3 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(t * z))) - Float64(i * 4.0)))
	t_4 = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(y * Float64(t * Float64(x * z))))) - Float64(4.0 * Float64(x * i)))
	tmp = 0.0
	if (x <= -2.2e+86)
		tmp = t_3;
	elseif (x <= 7.5e-55)
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1);
	elseif (x <= 0.155)
		tmp = t_4;
	elseif (x <= 5.9e+26)
		tmp = t_2;
	elseif (x <= 2.2e+117)
		tmp = t_4;
	elseif (x <= 1e+189)
		tmp = t_2;
	else
		tmp = t_3;
	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 = 27.0 * (j * k);
	t_2 = (-4.0 * ((t * a) + (x * i))) - t_1;
	t_3 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	t_4 = ((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (x * i));
	tmp = 0.0;
	if (x <= -2.2e+86)
		tmp = t_3;
	elseif (x <= 7.5e-55)
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	elseif (x <= 0.155)
		tmp = t_4;
	elseif (x <= 5.9e+26)
		tmp = t_2;
	elseif (x <= 2.2e+117)
		tmp = t_4;
	elseif (x <= 1e+189)
		tmp = t_2;
	else
		tmp = t_3;
	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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.2e+86], t$95$3, If[LessEqual[x, 7.5e-55], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 0.155], t$95$4, If[LessEqual[x, 5.9e+26], t$95$2, If[LessEqual[x, 2.2e+117], t$95$4, If[LessEqual[x, 1e+189], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := -4 \cdot \left(t \cdot a + x \cdot i\right) - t_1\\
t_3 := x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
t_4 := \left(b \cdot c + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+86}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;x \leq 0.155:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x \leq 5.9 \cdot 10^{+26}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{+117}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x \leq 10^{+189}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.20000000000000003e86 or 1e189 < x

    1. Initial program 76.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. sub-neg76.0%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-76.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg76.0%

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000003e86 < x < 7.50000000000000023e-55

    1. Initial program 94.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. sub-neg94.0%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-94.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg94.0%

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

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

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

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

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

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

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

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

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

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

    if 7.50000000000000023e-55 < x < 0.154999999999999999 or 5.9000000000000003e26 < x < 2.20000000000000014e117

    1. Initial program 85.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. sub-neg85.7%

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

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. 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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in88.5%

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

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

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

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

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

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

    if 0.154999999999999999 < x < 5.9000000000000003e26 or 2.20000000000000014e117 < x < 1e189

    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. sub-neg86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)\right) - 27 \cdot \left(k \cdot j\right)} \]
      2. cancel-sign-sub-inv88.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+86}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-55}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 0.155:\\ \;\;\;\;\left(b \cdot c + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq 5.9 \cdot 10^{+26}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+117}:\\ \;\;\;\;\left(b \cdot c + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq 10^{+189}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ \end{array} \]

Alternative 8: 62.2% accurate, 1.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_2 := -4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ t_3 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{+17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.65 \cdot 10^{-226}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-177}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-36}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 64000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+100}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \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) (* 4.0 (* x i))))
        (t_2 (- (* -4.0 (+ (* t a) (* x i))) (* 27.0 (* j k))))
        (t_3 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
   (if (<= t -6.8e+17)
     t_3
     (if (<= t -2.65e-226)
       t_2
       (if (<= t 2.55e-177)
         t_1
         (if (<= t 6.5e-36)
           t_2
           (if (<= t 64000000.0) t_1 (if (<= t 8.2e+100) t_2 t_3))))))))
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) - (4.0 * (x * i));
	double t_2 = (-4.0 * ((t * a) + (x * i))) - (27.0 * (j * k));
	double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	double tmp;
	if (t <= -6.8e+17) {
		tmp = t_3;
	} else if (t <= -2.65e-226) {
		tmp = t_2;
	} else if (t <= 2.55e-177) {
		tmp = t_1;
	} else if (t <= 6.5e-36) {
		tmp = t_2;
	} else if (t <= 64000000.0) {
		tmp = t_1;
	} else if (t <= 8.2e+100) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 = (b * c) - (4.0d0 * (x * i))
    t_2 = ((-4.0d0) * ((t * a) + (x * i))) - (27.0d0 * (j * k))
    t_3 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    if (t <= (-6.8d+17)) then
        tmp = t_3
    else if (t <= (-2.65d-226)) then
        tmp = t_2
    else if (t <= 2.55d-177) then
        tmp = t_1
    else if (t <= 6.5d-36) then
        tmp = t_2
    else if (t <= 64000000.0d0) then
        tmp = t_1
    else if (t <= 8.2d+100) then
        tmp = t_2
    else
        tmp = t_3
    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) - (4.0 * (x * i));
	double t_2 = (-4.0 * ((t * a) + (x * i))) - (27.0 * (j * k));
	double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	double tmp;
	if (t <= -6.8e+17) {
		tmp = t_3;
	} else if (t <= -2.65e-226) {
		tmp = t_2;
	} else if (t <= 2.55e-177) {
		tmp = t_1;
	} else if (t <= 6.5e-36) {
		tmp = t_2;
	} else if (t <= 64000000.0) {
		tmp = t_1;
	} else if (t <= 8.2e+100) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - (4.0 * (x * i))
	t_2 = (-4.0 * ((t * a) + (x * i))) - (27.0 * (j * k))
	t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	tmp = 0
	if t <= -6.8e+17:
		tmp = t_3
	elif t <= -2.65e-226:
		tmp = t_2
	elif t <= 2.55e-177:
		tmp = t_1
	elif t <= 6.5e-36:
		tmp = t_2
	elif t <= 64000000.0:
		tmp = t_1
	elif t <= 8.2e+100:
		tmp = t_2
	else:
		tmp = t_3
	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(4.0 * Float64(x * i)))
	t_2 = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - Float64(27.0 * Float64(j * k)))
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -6.8e+17)
		tmp = t_3;
	elseif (t <= -2.65e-226)
		tmp = t_2;
	elseif (t <= 2.55e-177)
		tmp = t_1;
	elseif (t <= 6.5e-36)
		tmp = t_2;
	elseif (t <= 64000000.0)
		tmp = t_1;
	elseif (t <= 8.2e+100)
		tmp = t_2;
	else
		tmp = t_3;
	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) - (4.0 * (x * i));
	t_2 = (-4.0 * ((t * a) + (x * i))) - (27.0 * (j * k));
	t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -6.8e+17)
		tmp = t_3;
	elseif (t <= -2.65e-226)
		tmp = t_2;
	elseif (t <= 2.55e-177)
		tmp = t_1;
	elseif (t <= 6.5e-36)
		tmp = t_2;
	elseif (t <= 64000000.0)
		tmp = t_1;
	elseif (t <= 8.2e+100)
		tmp = t_2;
	else
		tmp = t_3;
	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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+17], t$95$3, If[LessEqual[t, -2.65e-226], t$95$2, If[LessEqual[t, 2.55e-177], t$95$1, If[LessEqual[t, 6.5e-36], t$95$2, If[LessEqual[t, 64000000.0], t$95$1, If[LessEqual[t, 8.2e+100], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_2 := -4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\
t_3 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+17}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -2.65 \cdot 10^{-226}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.55 \cdot 10^{-177}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6.5 \cdot 10^{-36}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 64000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 8.2 \cdot 10^{+100}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.8e17 or 8.2000000000000006e100 < t

    1. Initial program 84.6%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-84.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg84.6%

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*89.4%

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

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

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

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

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

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

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

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

    if -6.8e17 < t < -2.6500000000000002e-226 or 2.55000000000000004e-177 < t < 6.50000000000000012e-36 or 6.4e7 < t < 8.2000000000000006e100

    1. Initial program 88.1%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-88.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg88.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)\right) - 27 \cdot \left(k \cdot j\right)} \]
      2. cancel-sign-sub-inv72.9%

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

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

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

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

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

    if -2.6500000000000002e-226 < t < 2.55000000000000004e-177 or 6.50000000000000012e-36 < t < 6.4e7

    1. Initial program 91.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. sub-neg91.0%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-91.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg91.0%

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. 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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in87.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -2.65 \cdot 10^{-226}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-177}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-36}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 64000000:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+100}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 9: 70.7% accurate, 1.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := 27 \cdot \left(j \cdot k\right)\\ t_2 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t_1\right)\\ t_3 := -4 \cdot \left(t \cdot a + x \cdot i\right) - t_1\\ t_4 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -2.4 \cdot 10^{+16}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{-56}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.92 \cdot 10^{-90}:\\ \;\;\;\;x \cdot \left(y \cdot \left(18 \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-135}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-180}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+98}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \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 (* 27.0 (* j k)))
        (t_2 (- (* b c) (+ (* 4.0 (* x i)) t_1)))
        (t_3 (- (* -4.0 (+ (* t a) (* x i))) t_1))
        (t_4 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
   (if (<= t -2.4e+16)
     t_4
     (if (<= t -1.95e-56)
       t_3
       (if (<= t -1.92e-90)
         (* x (* y (* 18.0 (* t z))))
         (if (<= t -9e-135)
           t_2
           (if (<= t -1.35e-180) t_3 (if (<= t 1.4e+98) t_2 t_4))))))))
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 = 27.0 * (j * k);
	double t_2 = (b * c) - ((4.0 * (x * i)) + t_1);
	double t_3 = (-4.0 * ((t * a) + (x * i))) - t_1;
	double t_4 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	double tmp;
	if (t <= -2.4e+16) {
		tmp = t_4;
	} else if (t <= -1.95e-56) {
		tmp = t_3;
	} else if (t <= -1.92e-90) {
		tmp = x * (y * (18.0 * (t * z)));
	} else if (t <= -9e-135) {
		tmp = t_2;
	} else if (t <= -1.35e-180) {
		tmp = t_3;
	} else if (t <= 1.4e+98) {
		tmp = t_2;
	} else {
		tmp = t_4;
	}
	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) :: t_4
    real(8) :: tmp
    t_1 = 27.0d0 * (j * k)
    t_2 = (b * c) - ((4.0d0 * (x * i)) + t_1)
    t_3 = ((-4.0d0) * ((t * a) + (x * i))) - t_1
    t_4 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    if (t <= (-2.4d+16)) then
        tmp = t_4
    else if (t <= (-1.95d-56)) then
        tmp = t_3
    else if (t <= (-1.92d-90)) then
        tmp = x * (y * (18.0d0 * (t * z)))
    else if (t <= (-9d-135)) then
        tmp = t_2
    else if (t <= (-1.35d-180)) then
        tmp = t_3
    else if (t <= 1.4d+98) then
        tmp = t_2
    else
        tmp = t_4
    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 = 27.0 * (j * k);
	double t_2 = (b * c) - ((4.0 * (x * i)) + t_1);
	double t_3 = (-4.0 * ((t * a) + (x * i))) - t_1;
	double t_4 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	double tmp;
	if (t <= -2.4e+16) {
		tmp = t_4;
	} else if (t <= -1.95e-56) {
		tmp = t_3;
	} else if (t <= -1.92e-90) {
		tmp = x * (y * (18.0 * (t * z)));
	} else if (t <= -9e-135) {
		tmp = t_2;
	} else if (t <= -1.35e-180) {
		tmp = t_3;
	} else if (t <= 1.4e+98) {
		tmp = t_2;
	} else {
		tmp = t_4;
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = 27.0 * (j * k)
	t_2 = (b * c) - ((4.0 * (x * i)) + t_1)
	t_3 = (-4.0 * ((t * a) + (x * i))) - t_1
	t_4 = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	tmp = 0
	if t <= -2.4e+16:
		tmp = t_4
	elif t <= -1.95e-56:
		tmp = t_3
	elif t <= -1.92e-90:
		tmp = x * (y * (18.0 * (t * z)))
	elif t <= -9e-135:
		tmp = t_2
	elif t <= -1.35e-180:
		tmp = t_3
	elif t <= 1.4e+98:
		tmp = t_2
	else:
		tmp = t_4
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(27.0 * Float64(j * k))
	t_2 = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + t_1))
	t_3 = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - t_1)
	t_4 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -2.4e+16)
		tmp = t_4;
	elseif (t <= -1.95e-56)
		tmp = t_3;
	elseif (t <= -1.92e-90)
		tmp = Float64(x * Float64(y * Float64(18.0 * Float64(t * z))));
	elseif (t <= -9e-135)
		tmp = t_2;
	elseif (t <= -1.35e-180)
		tmp = t_3;
	elseif (t <= 1.4e+98)
		tmp = t_2;
	else
		tmp = t_4;
	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 = 27.0 * (j * k);
	t_2 = (b * c) - ((4.0 * (x * i)) + t_1);
	t_3 = (-4.0 * ((t * a) + (x * i))) - t_1;
	t_4 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -2.4e+16)
		tmp = t_4;
	elseif (t <= -1.95e-56)
		tmp = t_3;
	elseif (t <= -1.92e-90)
		tmp = x * (y * (18.0 * (t * z)));
	elseif (t <= -9e-135)
		tmp = t_2;
	elseif (t <= -1.35e-180)
		tmp = t_3;
	elseif (t <= 1.4e+98)
		tmp = t_2;
	else
		tmp = t_4;
	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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$4 = 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.4e+16], t$95$4, If[LessEqual[t, -1.95e-56], t$95$3, If[LessEqual[t, -1.92e-90], N[(x * N[(y * N[(18.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e-135], t$95$2, If[LessEqual[t, -1.35e-180], t$95$3, If[LessEqual[t, 1.4e+98], t$95$2, t$95$4]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t_1\right)\\
t_3 := -4 \cdot \left(t \cdot a + x \cdot i\right) - t_1\\
t_4 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+16}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq -1.95 \cdot 10^{-56}:\\
\;\;\;\;t_3\\

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

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

\mathbf{elif}\;t \leq -1.35 \cdot 10^{-180}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+98}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.4e16 or 1.4e98 < t

    1. Initial program 84.6%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-84.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg84.6%

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*89.4%

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

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

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

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

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

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

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

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

    if -2.4e16 < t < -1.95e-56 or -8.99999999999999975e-135 < t < -1.35000000000000007e-180

    1. Initial program 96.0%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-96.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)\right) - 27 \cdot \left(k \cdot j\right)} \]
      2. cancel-sign-sub-inv91.7%

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

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

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

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

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

    if -1.95e-56 < t < -1.92000000000000009e-90

    1. Initial program 63.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. sub-neg63.3%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-63.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.92000000000000009e-90 < t < -8.99999999999999975e-135 or -1.35000000000000007e-180 < t < 1.4e98

    1. Initial program 88.9%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-88.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg88.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{-56}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq -1.92 \cdot 10^{-90}:\\ \;\;\;\;x \cdot \left(y \cdot \left(18 \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-135}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-180}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+98}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 10: 84.3% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.1000000000000003e70 or 3.00000000000000016e-55 < x

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

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

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

    if -3.1000000000000003e70 < x < 3.00000000000000016e-55

    1. Initial program 93.7%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-93.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg93.7%

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. 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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in91.4%

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

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

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

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

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

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

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

Alternative 11: 58.3% accurate, 1.2× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_2 := k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ t_3 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -3.2 \cdot 10^{-91}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.28 \cdot 10^{-226}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-178}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-38}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 125000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{+30}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \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) (* 4.0 (* x i))))
        (t_2 (+ (* k (* j -27.0)) (* -4.0 (* x i))))
        (t_3 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
   (if (<= t -3.2e-91)
     t_3
     (if (<= t -1.28e-226)
       t_2
       (if (<= t 2.2e-178)
         t_1
         (if (<= t 6.5e-38)
           t_2
           (if (<= t 125000000.0) t_1 (if (<= t 2.15e+30) t_2 t_3))))))))
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) - (4.0 * (x * i));
	double t_2 = (k * (j * -27.0)) + (-4.0 * (x * i));
	double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	double tmp;
	if (t <= -3.2e-91) {
		tmp = t_3;
	} else if (t <= -1.28e-226) {
		tmp = t_2;
	} else if (t <= 2.2e-178) {
		tmp = t_1;
	} else if (t <= 6.5e-38) {
		tmp = t_2;
	} else if (t <= 125000000.0) {
		tmp = t_1;
	} else if (t <= 2.15e+30) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 = (b * c) - (4.0d0 * (x * i))
    t_2 = (k * (j * (-27.0d0))) + ((-4.0d0) * (x * i))
    t_3 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    if (t <= (-3.2d-91)) then
        tmp = t_3
    else if (t <= (-1.28d-226)) then
        tmp = t_2
    else if (t <= 2.2d-178) then
        tmp = t_1
    else if (t <= 6.5d-38) then
        tmp = t_2
    else if (t <= 125000000.0d0) then
        tmp = t_1
    else if (t <= 2.15d+30) then
        tmp = t_2
    else
        tmp = t_3
    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) - (4.0 * (x * i));
	double t_2 = (k * (j * -27.0)) + (-4.0 * (x * i));
	double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	double tmp;
	if (t <= -3.2e-91) {
		tmp = t_3;
	} else if (t <= -1.28e-226) {
		tmp = t_2;
	} else if (t <= 2.2e-178) {
		tmp = t_1;
	} else if (t <= 6.5e-38) {
		tmp = t_2;
	} else if (t <= 125000000.0) {
		tmp = t_1;
	} else if (t <= 2.15e+30) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - (4.0 * (x * i))
	t_2 = (k * (j * -27.0)) + (-4.0 * (x * i))
	t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	tmp = 0
	if t <= -3.2e-91:
		tmp = t_3
	elif t <= -1.28e-226:
		tmp = t_2
	elif t <= 2.2e-178:
		tmp = t_1
	elif t <= 6.5e-38:
		tmp = t_2
	elif t <= 125000000.0:
		tmp = t_1
	elif t <= 2.15e+30:
		tmp = t_2
	else:
		tmp = t_3
	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(4.0 * Float64(x * i)))
	t_2 = Float64(Float64(k * Float64(j * -27.0)) + Float64(-4.0 * Float64(x * i)))
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -3.2e-91)
		tmp = t_3;
	elseif (t <= -1.28e-226)
		tmp = t_2;
	elseif (t <= 2.2e-178)
		tmp = t_1;
	elseif (t <= 6.5e-38)
		tmp = t_2;
	elseif (t <= 125000000.0)
		tmp = t_1;
	elseif (t <= 2.15e+30)
		tmp = t_2;
	else
		tmp = t_3;
	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) - (4.0 * (x * i));
	t_2 = (k * (j * -27.0)) + (-4.0 * (x * i));
	t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -3.2e-91)
		tmp = t_3;
	elseif (t <= -1.28e-226)
		tmp = t_2;
	elseif (t <= 2.2e-178)
		tmp = t_1;
	elseif (t <= 6.5e-38)
		tmp = t_2;
	elseif (t <= 125000000.0)
		tmp = t_1;
	elseif (t <= 2.15e+30)
		tmp = t_2;
	else
		tmp = t_3;
	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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e-91], t$95$3, If[LessEqual[t, -1.28e-226], t$95$2, If[LessEqual[t, 2.2e-178], t$95$1, If[LessEqual[t, 6.5e-38], t$95$2, If[LessEqual[t, 125000000.0], t$95$1, If[LessEqual[t, 2.15e+30], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_2 := k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
t_3 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-91}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -1.28 \cdot 10^{-226}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-178}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6.5 \cdot 10^{-38}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 125000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.15 \cdot 10^{+30}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.19999999999999996e-91 or 2.15e30 < t

    1. Initial program 85.8%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-85.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg85.8%

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

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999996e-91 < t < -1.28000000000000004e-226 or 2.2000000000000001e-178 < t < 6.49999999999999949e-38 or 1.25e8 < t < 2.15e30

    1. Initial program 87.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. sub-neg87.4%

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

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

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

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

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

    if -1.28000000000000004e-226 < t < 2.2000000000000001e-178 or 6.49999999999999949e-38 < t < 1.25e8

    1. Initial program 91.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. sub-neg91.0%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-91.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg91.0%

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. 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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in87.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-91}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.28 \cdot 10^{-226}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-178}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-38}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 125000000:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{+30}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -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 12: 58.9% accurate, 1.2× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ t_3 := k \cdot \left(j \cdot -27\right)\\ t_4 := t_3 + b \cdot c\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.15 \cdot 10^{-182}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-278}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 1.16 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+33}:\\ \;\;\;\;t_3 + -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) (* -4.0 (* t a))))
        (t_2 (* x (- (* 18.0 (* y (* t z))) (* i 4.0))))
        (t_3 (* k (* j -27.0)))
        (t_4 (+ t_3 (* b c))))
   (if (<= x -3.5e+71)
     t_2
     (if (<= x -2.15e-182)
       t_4
       (if (<= x -1.95e-272)
         t_1
         (if (<= x 1.8e-278)
           t_4
           (if (<= x 1.16e-77)
             t_1
             (if (<= x 4.6e+33) (+ t_3 (* -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) + (-4.0 * (t * a));
	double t_2 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	double t_3 = k * (j * -27.0);
	double t_4 = t_3 + (b * c);
	double tmp;
	if (x <= -3.5e+71) {
		tmp = t_2;
	} else if (x <= -2.15e-182) {
		tmp = t_4;
	} else if (x <= -1.95e-272) {
		tmp = t_1;
	} else if (x <= 1.8e-278) {
		tmp = t_4;
	} else if (x <= 1.16e-77) {
		tmp = t_1;
	} else if (x <= 4.6e+33) {
		tmp = t_3 + (-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) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = (b * c) + ((-4.0d0) * (t * a))
    t_2 = x * ((18.0d0 * (y * (t * z))) - (i * 4.0d0))
    t_3 = k * (j * (-27.0d0))
    t_4 = t_3 + (b * c)
    if (x <= (-3.5d+71)) then
        tmp = t_2
    else if (x <= (-2.15d-182)) then
        tmp = t_4
    else if (x <= (-1.95d-272)) then
        tmp = t_1
    else if (x <= 1.8d-278) then
        tmp = t_4
    else if (x <= 1.16d-77) then
        tmp = t_1
    else if (x <= 4.6d+33) then
        tmp = t_3 + ((-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) + (-4.0 * (t * a));
	double t_2 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	double t_3 = k * (j * -27.0);
	double t_4 = t_3 + (b * c);
	double tmp;
	if (x <= -3.5e+71) {
		tmp = t_2;
	} else if (x <= -2.15e-182) {
		tmp = t_4;
	} else if (x <= -1.95e-272) {
		tmp = t_1;
	} else if (x <= 1.8e-278) {
		tmp = t_4;
	} else if (x <= 1.16e-77) {
		tmp = t_1;
	} else if (x <= 4.6e+33) {
		tmp = t_3 + (-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) + (-4.0 * (t * a))
	t_2 = x * ((18.0 * (y * (t * z))) - (i * 4.0))
	t_3 = k * (j * -27.0)
	t_4 = t_3 + (b * c)
	tmp = 0
	if x <= -3.5e+71:
		tmp = t_2
	elif x <= -2.15e-182:
		tmp = t_4
	elif x <= -1.95e-272:
		tmp = t_1
	elif x <= 1.8e-278:
		tmp = t_4
	elif x <= 1.16e-77:
		tmp = t_1
	elif x <= 4.6e+33:
		tmp = t_3 + (-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(-4.0 * Float64(t * a)))
	t_2 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(t * z))) - Float64(i * 4.0)))
	t_3 = Float64(k * Float64(j * -27.0))
	t_4 = Float64(t_3 + Float64(b * c))
	tmp = 0.0
	if (x <= -3.5e+71)
		tmp = t_2;
	elseif (x <= -2.15e-182)
		tmp = t_4;
	elseif (x <= -1.95e-272)
		tmp = t_1;
	elseif (x <= 1.8e-278)
		tmp = t_4;
	elseif (x <= 1.16e-77)
		tmp = t_1;
	elseif (x <= 4.6e+33)
		tmp = Float64(t_3 + 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) + (-4.0 * (t * a));
	t_2 = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	t_3 = k * (j * -27.0);
	t_4 = t_3 + (b * c);
	tmp = 0.0;
	if (x <= -3.5e+71)
		tmp = t_2;
	elseif (x <= -2.15e-182)
		tmp = t_4;
	elseif (x <= -1.95e-272)
		tmp = t_1;
	elseif (x <= 1.8e-278)
		tmp = t_4;
	elseif (x <= 1.16e-77)
		tmp = t_1;
	elseif (x <= 4.6e+33)
		tmp = t_3 + (-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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.5e+71], t$95$2, If[LessEqual[x, -2.15e-182], t$95$4, If[LessEqual[x, -1.95e-272], t$95$1, If[LessEqual[x, 1.8e-278], t$95$4, If[LessEqual[x, 1.16e-77], t$95$1, If[LessEqual[x, 4.6e+33], N[(t$95$3 + 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 + -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
t_3 := k \cdot \left(j \cdot -27\right)\\
t_4 := t_3 + b \cdot c\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{+71}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -2.15 \cdot 10^{-182}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x \leq -1.95 \cdot 10^{-272}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 1.8 \cdot 10^{-278}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x \leq 1.16 \cdot 10^{-77}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.4999999999999999e71 or 4.60000000000000021e33 < x

    1. Initial program 78.8%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-78.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg78.8%

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999999e71 < x < -2.15e-182 or -1.9499999999999999e-272 < x < 1.79999999999999998e-278

    1. Initial program 91.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. sub-neg91.8%

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

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

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

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

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

    if -2.15e-182 < x < -1.9499999999999999e-272 or 1.79999999999999998e-278 < x < 1.16e-77

    1. Initial program 95.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. sub-neg95.2%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-95.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.16e-77 < x < 4.60000000000000021e33

    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. sub-neg92.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq -2.15 \cdot 10^{-182}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-272}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-278}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;x \leq 1.16 \cdot 10^{-77}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+33}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ \end{array} \]

Alternative 13: 78.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq 4.6 \cdot 10^{+116}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(\left(t \cdot y\right) \cdot \left(x \cdot z\right)\right)\right) - t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -5.69999999999999983e116 or 1e189 < x

    1. Initial program 76.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. sub-neg76.9%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-76.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg76.9%

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*82.9%

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

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

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

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

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

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

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

    if -5.69999999999999983e116 < x < 1.9000000000000001e41

    1. Initial program 92.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. sub-neg92.7%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-92.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg92.7%

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e41 < x < 4.5999999999999999e116

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-81.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg81.3%

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5999999999999999e116 < x < 1e189

    1. Initial program 77.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. sub-neg77.6%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-77.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)\right) - 27 \cdot \left(k \cdot j\right)} \]
      2. cancel-sign-sub-inv80.7%

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

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

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

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

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

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

Alternative 14: 50.4% accurate, 1.5× 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 := k \cdot \left(j \cdot -27\right)\\ t_3 := t_2 + b \cdot c\\ \mathbf{if}\;k \leq -2.95 \cdot 10^{-27}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 8.5 \cdot 10^{-122}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 2.65 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 8.5 \cdot 10^{+179}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 3.5 \cdot 10^{+195}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2 + -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
 (let* ((t_1 (* -4.0 (+ (* t a) (* x i))))
        (t_2 (* k (* j -27.0)))
        (t_3 (+ t_2 (* b c))))
   (if (<= k -2.95e-27)
     t_3
     (if (<= k 8.5e-122)
       (+ (* b c) (* -4.0 (* t a)))
       (if (<= k 2.65e+70)
         t_1
         (if (<= k 8.5e+179)
           t_3
           (if (<= k 3.5e+195) t_1 (+ t_2 (* -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 t_1 = -4.0 * ((t * a) + (x * i));
	double t_2 = k * (j * -27.0);
	double t_3 = t_2 + (b * c);
	double tmp;
	if (k <= -2.95e-27) {
		tmp = t_3;
	} else if (k <= 8.5e-122) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else if (k <= 2.65e+70) {
		tmp = t_1;
	} else if (k <= 8.5e+179) {
		tmp = t_3;
	} else if (k <= 3.5e+195) {
		tmp = t_1;
	} else {
		tmp = t_2 + (-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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (-4.0d0) * ((t * a) + (x * i))
    t_2 = k * (j * (-27.0d0))
    t_3 = t_2 + (b * c)
    if (k <= (-2.95d-27)) then
        tmp = t_3
    else if (k <= 8.5d-122) then
        tmp = (b * c) + ((-4.0d0) * (t * a))
    else if (k <= 2.65d+70) then
        tmp = t_1
    else if (k <= 8.5d+179) then
        tmp = t_3
    else if (k <= 3.5d+195) then
        tmp = t_1
    else
        tmp = t_2 + ((-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 t_1 = -4.0 * ((t * a) + (x * i));
	double t_2 = k * (j * -27.0);
	double t_3 = t_2 + (b * c);
	double tmp;
	if (k <= -2.95e-27) {
		tmp = t_3;
	} else if (k <= 8.5e-122) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else if (k <= 2.65e+70) {
		tmp = t_1;
	} else if (k <= 8.5e+179) {
		tmp = t_3;
	} else if (k <= 3.5e+195) {
		tmp = t_1;
	} else {
		tmp = t_2 + (-4.0 * (x * i));
	}
	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 = k * (j * -27.0)
	t_3 = t_2 + (b * c)
	tmp = 0
	if k <= -2.95e-27:
		tmp = t_3
	elif k <= 8.5e-122:
		tmp = (b * c) + (-4.0 * (t * a))
	elif k <= 2.65e+70:
		tmp = t_1
	elif k <= 8.5e+179:
		tmp = t_3
	elif k <= 3.5e+195:
		tmp = t_1
	else:
		tmp = t_2 + (-4.0 * (x * i))
	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(k * Float64(j * -27.0))
	t_3 = Float64(t_2 + Float64(b * c))
	tmp = 0.0
	if (k <= -2.95e-27)
		tmp = t_3;
	elseif (k <= 8.5e-122)
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	elseif (k <= 2.65e+70)
		tmp = t_1;
	elseif (k <= 8.5e+179)
		tmp = t_3;
	elseif (k <= 3.5e+195)
		tmp = t_1;
	else
		tmp = Float64(t_2 + 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)
	t_1 = -4.0 * ((t * a) + (x * i));
	t_2 = k * (j * -27.0);
	t_3 = t_2 + (b * c);
	tmp = 0.0;
	if (k <= -2.95e-27)
		tmp = t_3;
	elseif (k <= 8.5e-122)
		tmp = (b * c) + (-4.0 * (t * a));
	elseif (k <= 2.65e+70)
		tmp = t_1;
	elseif (k <= 8.5e+179)
		tmp = t_3;
	elseif (k <= 3.5e+195)
		tmp = t_1;
	else
		tmp = t_2 + (-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_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -2.95e-27], t$95$3, If[LessEqual[k, 8.5e-122], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.65e+70], t$95$1, If[LessEqual[k, 8.5e+179], t$95$3, If[LessEqual[k, 3.5e+195], t$95$1, N[(t$95$2 + N[(-4.0 * N[(x * i), $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 := k \cdot \left(j \cdot -27\right)\\
t_3 := t_2 + b \cdot c\\
\mathbf{if}\;k \leq -2.95 \cdot 10^{-27}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;k \leq 2.65 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;k \leq 8.5 \cdot 10^{+179}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;k \leq 3.5 \cdot 10^{+195}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -2.9499999999999999e-27 or 2.65e70 < k < 8.49999999999999962e179

    1. Initial program 86.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. sub-neg86.0%

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

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

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

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

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

    if -2.9499999999999999e-27 < k < 8.50000000000000003e-122

    1. Initial program 85.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. sub-neg85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.50000000000000003e-122 < k < 2.65e70 or 8.49999999999999962e179 < k < 3.5000000000000002e195

    1. Initial program 90.5%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-90.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{x \cdot \left(i \cdot 4\right)} \]
    8. Taylor expanded in c around 0 50.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-inv50.8%

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

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

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

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

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

    if 3.5000000000000002e195 < k

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -2.95 \cdot 10^{-27}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;k \leq 8.5 \cdot 10^{-122}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 2.65 \cdot 10^{+70}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;k \leq 8.5 \cdot 10^{+179}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;k \leq 3.5 \cdot 10^{+195}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 15: 50.6% accurate, 1.6× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right) + b \cdot c\\ \mathbf{if}\;k \leq -6.5 \cdot 10^{-27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;k \leq 2.6 \cdot 10^{-121}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 1.06 \cdot 10^{+71} \lor \neg \left(k \leq 6 \cdot 10^{+177}\right) \land k \leq 1.35 \cdot 10^{+197}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + 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 (+ (* k (* j -27.0)) (* b c))))
   (if (<= k -6.5e-27)
     t_1
     (if (<= k 2.6e-121)
       (+ (* b c) (* -4.0 (* t a)))
       (if (or (<= k 1.06e+71) (and (not (<= k 6e+177)) (<= k 1.35e+197)))
         (* -4.0 (+ (* t a) (* 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 = (k * (j * -27.0)) + (b * c);
	double tmp;
	if (k <= -6.5e-27) {
		tmp = t_1;
	} else if (k <= 2.6e-121) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else if ((k <= 1.06e+71) || (!(k <= 6e+177) && (k <= 1.35e+197))) {
		tmp = -4.0 * ((t * a) + (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 = (k * (j * (-27.0d0))) + (b * c)
    if (k <= (-6.5d-27)) then
        tmp = t_1
    else if (k <= 2.6d-121) then
        tmp = (b * c) + ((-4.0d0) * (t * a))
    else if ((k <= 1.06d+71) .or. (.not. (k <= 6d+177)) .and. (k <= 1.35d+197)) then
        tmp = (-4.0d0) * ((t * a) + (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 = (k * (j * -27.0)) + (b * c);
	double tmp;
	if (k <= -6.5e-27) {
		tmp = t_1;
	} else if (k <= 2.6e-121) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else if ((k <= 1.06e+71) || (!(k <= 6e+177) && (k <= 1.35e+197))) {
		tmp = -4.0 * ((t * a) + (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 = (k * (j * -27.0)) + (b * c)
	tmp = 0
	if k <= -6.5e-27:
		tmp = t_1
	elif k <= 2.6e-121:
		tmp = (b * c) + (-4.0 * (t * a))
	elif (k <= 1.06e+71) or (not (k <= 6e+177) and (k <= 1.35e+197)):
		tmp = -4.0 * ((t * a) + (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(Float64(k * Float64(j * -27.0)) + Float64(b * c))
	tmp = 0.0
	if (k <= -6.5e-27)
		tmp = t_1;
	elseif (k <= 2.6e-121)
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	elseif ((k <= 1.06e+71) || (!(k <= 6e+177) && (k <= 1.35e+197)))
		tmp = Float64(-4.0 * Float64(Float64(t * a) + 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 = (k * (j * -27.0)) + (b * c);
	tmp = 0.0;
	if (k <= -6.5e-27)
		tmp = t_1;
	elseif (k <= 2.6e-121)
		tmp = (b * c) + (-4.0 * (t * a));
	elseif ((k <= 1.06e+71) || (~((k <= 6e+177)) && (k <= 1.35e+197)))
		tmp = -4.0 * ((t * a) + (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[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -6.5e-27], t$95$1, If[LessEqual[k, 2.6e-121], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[k, 1.06e+71], And[N[Not[LessEqual[k, 6e+177]], $MachinePrecision], LessEqual[k, 1.35e+197]]], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right) + b \cdot c\\
\mathbf{if}\;k \leq -6.5 \cdot 10^{-27}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;k \leq 1.06 \cdot 10^{+71} \lor \neg \left(k \leq 6 \cdot 10^{+177}\right) \land k \leq 1.35 \cdot 10^{+197}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -6.50000000000000025e-27 or 1.06e71 < k < 6e177 or 1.35e197 < k

    1. Initial program 87.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. sub-neg87.4%

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

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

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

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

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

    if -6.50000000000000025e-27 < k < 2.59999999999999986e-121

    1. Initial program 85.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. sub-neg85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.59999999999999986e-121 < k < 1.06e71 or 6e177 < k < 1.35e197

    1. Initial program 90.7%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-90.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -6.5 \cdot 10^{-27}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + b \cdot c\\ \mathbf{elif}\;k \leq 2.6 \cdot 10^{-121}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 1.06 \cdot 10^{+71} \lor \neg \left(k \leq 6 \cdot 10^{+177}\right) \land k \leq 1.35 \cdot 10^{+197}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + b \cdot c\\ \end{array} \]

Alternative 16: 45.5% accurate, 1.6× speedup?

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

\mathbf{elif}\;x \leq -3.5 \cdot 10^{-278}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 6.5 \cdot 10^{-84}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.6999999999999999e71 or 3.3e212 < x

    1. Initial program 76.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. sub-neg76.4%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-76.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg76.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6999999999999999e71 < x < -3.4999999999999997e-278 or 1.6e-281 < x < 6.50000000000000022e-84

    1. Initial program 93.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. sub-neg93.6%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-93.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999997e-278 < x < 1.6e-281

    1. Initial program 92.6%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-92.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.50000000000000022e-84 < x < 3.3e212

    1. Initial program 87.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. sub-neg87.8%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-87.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-inv46.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(\left(t \cdot z\right) \cdot \left(18 \cdot y\right)\right)\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-278}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-281}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-84}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+212}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(t \cdot z\right) \cdot \left(18 \cdot y\right)\right)\\ \end{array} \]

Alternative 17: 72.7% accurate, 1.6× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+83} \lor \neg \left(x \leq 3.5 \cdot 10^{+36}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 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 (<= x -1.85e+83) (not (<= x 3.5e+36)))
   (* x (- (* 18.0 (* y (* t z))) (* i 4.0)))
   (- (+ (* b c) (* -4.0 (* t a))) (* 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 ((x <= -1.85e+83) || !(x <= 3.5e+36)) {
		tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	} else {
		tmp = ((b * c) + (-4.0 * (t * a))) - (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 ((x <= (-1.85d+83)) .or. (.not. (x <= 3.5d+36))) then
        tmp = x * ((18.0d0 * (y * (t * z))) - (i * 4.0d0))
    else
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - (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 ((x <= -1.85e+83) || !(x <= 3.5e+36)) {
		tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	} else {
		tmp = ((b * c) + (-4.0 * (t * a))) - (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 (x <= -1.85e+83) or not (x <= 3.5e+36):
		tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0))
	else:
		tmp = ((b * c) + (-4.0 * (t * a))) - (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 ((x <= -1.85e+83) || !(x <= 3.5e+36))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(t * z))) - Float64(i * 4.0)));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - 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 ((x <= -1.85e+83) || ~((x <= 3.5e+36)))
		tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	else
		tmp = ((b * c) + (-4.0 * (t * a))) - (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[x, -1.85e+83], N[Not[LessEqual[x, 3.5e+36]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+83} \lor \neg \left(x \leq 3.5 \cdot 10^{+36}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.8500000000000001e83 or 3.4999999999999998e36 < x

    1. Initial program 77.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. sub-neg77.5%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-77.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg77.5%

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

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

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

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

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

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

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

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

    if -1.8500000000000001e83 < x < 3.4999999999999998e36

    1. Initial program 93.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. sub-neg93.6%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-93.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg93.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 46.2% accurate, 2.4× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;j \leq -1.2 \cdot 10^{+193} \lor \neg \left(j \leq 1.96 \cdot 10^{-29}\right):\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \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 (<= j -1.2e+193) (not (<= j 1.96e-29)))
   (* k (* j -27.0))
   (* -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 ((j <= -1.2e+193) || !(j <= 1.96e-29)) {
		tmp = k * (j * -27.0);
	} 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 ((j <= (-1.2d+193)) .or. (.not. (j <= 1.96d-29))) then
        tmp = k * (j * (-27.0d0))
    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 ((j <= -1.2e+193) || !(j <= 1.96e-29)) {
		tmp = k * (j * -27.0);
	} 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 (j <= -1.2e+193) or not (j <= 1.96e-29):
		tmp = k * (j * -27.0)
	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 ((j <= -1.2e+193) || !(j <= 1.96e-29))
		tmp = Float64(k * Float64(j * -27.0));
	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 ((j <= -1.2e+193) || ~((j <= 1.96e-29)))
		tmp = k * (j * -27.0);
	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[j, -1.2e+193], N[Not[LessEqual[j, 1.96e-29]], $MachinePrecision]], N[(k * N[(j * -27.0), $MachinePrecision]), $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}\;j \leq -1.2 \cdot 10^{+193} \lor \neg \left(j \leq 1.96 \cdot 10^{-29}\right):\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\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 j < -1.2e193 or 1.95999999999999988e-29 < j

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-81.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e193 < j < 1.95999999999999988e-29

    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. sub-neg90.9%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg90.9%

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. 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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. 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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in91.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{x \cdot \left(i \cdot 4\right)} \]
    8. Taylor expanded in c around 0 39.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-inv39.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.2 \cdot 10^{+193} \lor \neg \left(j \leq 1.96 \cdot 10^{-29}\right):\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]

Alternative 19: 43.6% accurate, 2.4× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -28000 \lor \neg \left(z \leq 3.65 \cdot 10^{+227}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\ \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 (<= z -28000.0) (not (<= z 3.65e+227)))
   (* x (* 18.0 (* y (* t z))))
   (* -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 ((z <= -28000.0) || !(z <= 3.65e+227)) {
		tmp = x * (18.0 * (y * (t * z)));
	} 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 ((z <= (-28000.0d0)) .or. (.not. (z <= 3.65d+227))) then
        tmp = x * (18.0d0 * (y * (t * z)))
    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 ((z <= -28000.0) || !(z <= 3.65e+227)) {
		tmp = x * (18.0 * (y * (t * z)));
	} 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 (z <= -28000.0) or not (z <= 3.65e+227):
		tmp = x * (18.0 * (y * (t * z)))
	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 ((z <= -28000.0) || !(z <= 3.65e+227))
		tmp = Float64(x * Float64(18.0 * Float64(y * Float64(t * z))));
	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 ((z <= -28000.0) || ~((z <= 3.65e+227)))
		tmp = x * (18.0 * (y * (t * z)));
	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[z, -28000.0], N[Not[LessEqual[z, 3.65e+227]], $MachinePrecision]], N[(x * N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;z \leq -28000 \lor \neg \left(z \leq 3.65 \cdot 10^{+227}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\

\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 z < -28000 or 3.65000000000000013e227 < z

    1. Initial program 78.5%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-78.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg78.5%

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

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

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

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

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

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

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

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

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

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

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

    if -28000 < z < 3.65000000000000013e227

    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. sub-neg91.4%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-91.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{x \cdot \left(i \cdot 4\right)} \]
    8. Taylor expanded in c around 0 39.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-inv39.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -28000 \lor \neg \left(z \leq 3.65 \cdot 10^{+227}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]

Alternative 20: 43.6% accurate, 2.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.35e10

    1. Initial program 77.7%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-77.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e10 < z < 3.65000000000000013e227

    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. sub-neg91.4%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-91.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{x \cdot \left(i \cdot 4\right)} \]
    7. Simplified59.4%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{x \cdot \left(i \cdot 4\right)} \]
    8. Taylor expanded in c around 0 39.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-inv39.8%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + \left(-4\right) \cdot \left(i \cdot x\right)} \]
      2. metadata-eval39.8%

        \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      3. +-commutative39.8%

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)} \]
      4. distribute-lft-out39.8%

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x + a \cdot t\right)} \]
    10. Simplified39.8%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x + a \cdot t\right)} \]

    if 3.65000000000000013e227 < z

    1. Initial program 81.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. sub-neg81.9%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-81.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg81.9%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + \left(-\left(a \cdot 4\right) \cdot t\right)\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      4. sub-neg81.9%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--81.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*81.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in81.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \color{blue}{\left(-j \cdot 27\right) \cdot k}\right) \]
      8. cancel-sign-sub81.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{\left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
      9. associate-*l*81.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right) \]
      10. associate-*l*81.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified81.9%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    4. Taylor expanded in x around inf 75.1%

      \[\leadsto \color{blue}{\left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - 4 \cdot i\right) \cdot x} \]
    5. Taylor expanded in y around inf 75.1%

      \[\leadsto \color{blue}{\left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)} \cdot x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -13500000000:\\ \;\;\;\;x \cdot \left(y \cdot \left(18 \cdot \left(t \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq 3.65 \cdot 10^{+227}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 21: 32.5% accurate, 2.8× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+90}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-230}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-51}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\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 -1.65e+90)
   (* b c)
   (if (<= b -1.35e-230)
     (* -27.0 (* j k))
     (if (<= b 6.5e-51) (* -4.0 (* x i)) (* 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 <= -1.65e+90) {
		tmp = b * c;
	} else if (b <= -1.35e-230) {
		tmp = -27.0 * (j * k);
	} else if (b <= 6.5e-51) {
		tmp = -4.0 * (x * i);
	} 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 <= (-1.65d+90)) then
        tmp = b * c
    else if (b <= (-1.35d-230)) then
        tmp = (-27.0d0) * (j * k)
    else if (b <= 6.5d-51) then
        tmp = (-4.0d0) * (x * i)
    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 <= -1.65e+90) {
		tmp = b * c;
	} else if (b <= -1.35e-230) {
		tmp = -27.0 * (j * k);
	} else if (b <= 6.5e-51) {
		tmp = -4.0 * (x * i);
	} 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 <= -1.65e+90:
		tmp = b * c
	elif b <= -1.35e-230:
		tmp = -27.0 * (j * k)
	elif b <= 6.5e-51:
		tmp = -4.0 * (x * i)
	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 (b <= -1.65e+90)
		tmp = Float64(b * c);
	elseif (b <= -1.35e-230)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (b <= 6.5e-51)
		tmp = Float64(-4.0 * Float64(x * i));
	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 <= -1.65e+90)
		tmp = b * c;
	elseif (b <= -1.35e-230)
		tmp = -27.0 * (j * k);
	elseif (b <= 6.5e-51)
		tmp = -4.0 * (x * i);
	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[b, -1.65e+90], N[(b * c), $MachinePrecision], If[LessEqual[b, -1.35e-230], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e-51], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{+90}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \leq -1.35 \cdot 10^{-230}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;b \leq 6.5 \cdot 10^{-51}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.65000000000000004e90 or 6.5000000000000003e-51 < b

    1. Initial program 84.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg84.0%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-84.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg84.0%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + \left(-\left(a \cdot 4\right) \cdot t\right)\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      4. sub-neg84.0%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--86.6%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. 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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \color{blue}{\left(-j \cdot 27\right) \cdot k}\right) \]
      8. cancel-sign-sub84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{\left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
      9. associate-*l*84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right) \]
      10. associate-*l*84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\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) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    4. Taylor expanded in y around 0 68.0%

      \[\leadsto \color{blue}{\left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
    5. Step-by-step derivation
      1. *-un-lft-identity68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
      2. fma-def68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(k \cdot j\right)\right)} \]
      3. *-commutative68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, \color{blue}{x \cdot i}, 27 \cdot \left(k \cdot j\right)\right) \]
      4. associate-*r*68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, x \cdot i, \color{blue}{\left(27 \cdot k\right) \cdot j}\right) \]
    6. Applied egg-rr68.0%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lft-identity68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
      2. fma-udef68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\left(4 \cdot \left(x \cdot i\right) + \left(27 \cdot k\right) \cdot j\right)} \]
      3. *-commutative68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{\left(x \cdot i\right) \cdot 4} + \left(27 \cdot k\right) \cdot j\right) \]
      4. associate-*l*68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{x \cdot \left(i \cdot 4\right)} + \left(27 \cdot k\right) \cdot j\right) \]
      5. *-commutative68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(x \cdot \color{blue}{\left(4 \cdot i\right)} + \left(27 \cdot k\right) \cdot j\right) \]
      6. fma-def68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, 4 \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
      7. *-commutative68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, \color{blue}{i \cdot 4}, \left(27 \cdot k\right) \cdot j\right) \]
      8. associate-*r*68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{27 \cdot \left(k \cdot j\right)}\right) \]
      9. *-commutative68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{\left(k \cdot j\right) \cdot 27}\right) \]
      10. associate-*l*68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    8. Simplified68.9%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, i \cdot 4, k \cdot \left(j \cdot 27\right)\right)} \]
    9. Taylor expanded in c around inf 38.4%

      \[\leadsto \color{blue}{c \cdot b} \]

    if -1.65000000000000004e90 < b < -1.35000000000000006e-230

    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. sub-neg91.4%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. +-commutative91.4%

        \[\leadsto \color{blue}{\left(-\left(j \cdot 27\right) \cdot k\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      3. associate-*l*91.4%

        \[\leadsto \left(-\color{blue}{j \cdot \left(27 \cdot k\right)}\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      4. distribute-rgt-neg-in91.4%

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def93.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(j, -27 \cdot k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      6. *-commutative93.9%

        \[\leadsto \mathsf{fma}\left(j, -\color{blue}{k \cdot 27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      7. distribute-rgt-neg-in93.9%

        \[\leadsto \mathsf{fma}\left(j, \color{blue}{k \cdot \left(-27\right)}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      8. metadata-eval93.9%

        \[\leadsto \mathsf{fma}\left(j, k \cdot \color{blue}{-27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. sub-neg93.9%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \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) + b \cdot c\right) + \left(-\left(x \cdot 4\right) \cdot i\right)}\right) \]
      10. +-commutative93.9%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{\left(-\left(x \cdot 4\right) \cdot i\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
      11. associate-*l*93.9%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \left(-\color{blue}{x \cdot \left(4 \cdot i\right)}\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
      12. distribute-rgt-neg-in93.9%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{x \cdot \left(-4 \cdot i\right)} + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
    3. Simplified97.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), b \cdot c\right)\right)\right)} \]
    4. Taylor expanded in j around inf 36.1%

      \[\leadsto \color{blue}{-27 \cdot \left(k \cdot j\right)} \]

    if -1.35000000000000006e-230 < b < 6.5000000000000003e-51

    1. Initial program 88.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg88.2%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. +-commutative88.2%

        \[\leadsto \color{blue}{\left(-\left(j \cdot 27\right) \cdot k\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      3. associate-*l*88.2%

        \[\leadsto \left(-\color{blue}{j \cdot \left(27 \cdot k\right)}\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      4. distribute-rgt-neg-in88.2%

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def90.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(j, -27 \cdot k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      6. *-commutative90.0%

        \[\leadsto \mathsf{fma}\left(j, -\color{blue}{k \cdot 27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      7. distribute-rgt-neg-in90.0%

        \[\leadsto \mathsf{fma}\left(j, \color{blue}{k \cdot \left(-27\right)}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      8. metadata-eval90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot \color{blue}{-27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. sub-neg90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \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) + b \cdot c\right) + \left(-\left(x \cdot 4\right) \cdot i\right)}\right) \]
      10. +-commutative90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{\left(-\left(x \cdot 4\right) \cdot i\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
      11. associate-*l*90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \left(-\color{blue}{x \cdot \left(4 \cdot i\right)}\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
      12. distribute-rgt-neg-in90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{x \cdot \left(-4 \cdot i\right)} + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
    3. Simplified93.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), b \cdot c\right)\right)\right)} \]
    4. Taylor expanded in i around inf 33.0%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification36.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+90}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-230}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-51}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 22: 32.5% accurate, 2.8× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -1.7 \cdot 10^{+90}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-230}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \leq 5.3 \cdot 10^{-51}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\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 -1.7e+90)
   (* b c)
   (if (<= b -3.5e-230)
     (* k (* j -27.0))
     (if (<= b 5.3e-51) (* -4.0 (* x i)) (* 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 <= -1.7e+90) {
		tmp = b * c;
	} else if (b <= -3.5e-230) {
		tmp = k * (j * -27.0);
	} else if (b <= 5.3e-51) {
		tmp = -4.0 * (x * i);
	} 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 <= (-1.7d+90)) then
        tmp = b * c
    else if (b <= (-3.5d-230)) then
        tmp = k * (j * (-27.0d0))
    else if (b <= 5.3d-51) then
        tmp = (-4.0d0) * (x * i)
    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 <= -1.7e+90) {
		tmp = b * c;
	} else if (b <= -3.5e-230) {
		tmp = k * (j * -27.0);
	} else if (b <= 5.3e-51) {
		tmp = -4.0 * (x * i);
	} 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 <= -1.7e+90:
		tmp = b * c
	elif b <= -3.5e-230:
		tmp = k * (j * -27.0)
	elif b <= 5.3e-51:
		tmp = -4.0 * (x * i)
	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 (b <= -1.7e+90)
		tmp = Float64(b * c);
	elseif (b <= -3.5e-230)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (b <= 5.3e-51)
		tmp = Float64(-4.0 * Float64(x * i));
	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 <= -1.7e+90)
		tmp = b * c;
	elseif (b <= -3.5e-230)
		tmp = k * (j * -27.0);
	elseif (b <= 5.3e-51)
		tmp = -4.0 * (x * i);
	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[b, -1.7e+90], N[(b * c), $MachinePrecision], If[LessEqual[b, -3.5e-230], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.3e-51], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{+90}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \leq -3.5 \cdot 10^{-230}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;b \leq 5.3 \cdot 10^{-51}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.70000000000000009e90 or 5.29999999999999974e-51 < b

    1. Initial program 84.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg84.0%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-84.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg84.0%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + \left(-\left(a \cdot 4\right) \cdot t\right)\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      4. sub-neg84.0%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--86.6%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. 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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \color{blue}{\left(-j \cdot 27\right) \cdot k}\right) \]
      8. cancel-sign-sub84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{\left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
      9. associate-*l*84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right) \]
      10. associate-*l*84.9%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\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) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    4. Taylor expanded in y around 0 68.0%

      \[\leadsto \color{blue}{\left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
    5. Step-by-step derivation
      1. *-un-lft-identity68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
      2. fma-def68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(k \cdot j\right)\right)} \]
      3. *-commutative68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, \color{blue}{x \cdot i}, 27 \cdot \left(k \cdot j\right)\right) \]
      4. associate-*r*68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, x \cdot i, \color{blue}{\left(27 \cdot k\right) \cdot j}\right) \]
    6. Applied egg-rr68.0%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lft-identity68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
      2. fma-udef68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\left(4 \cdot \left(x \cdot i\right) + \left(27 \cdot k\right) \cdot j\right)} \]
      3. *-commutative68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{\left(x \cdot i\right) \cdot 4} + \left(27 \cdot k\right) \cdot j\right) \]
      4. associate-*l*68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{x \cdot \left(i \cdot 4\right)} + \left(27 \cdot k\right) \cdot j\right) \]
      5. *-commutative68.0%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(x \cdot \color{blue}{\left(4 \cdot i\right)} + \left(27 \cdot k\right) \cdot j\right) \]
      6. fma-def68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, 4 \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
      7. *-commutative68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, \color{blue}{i \cdot 4}, \left(27 \cdot k\right) \cdot j\right) \]
      8. associate-*r*68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{27 \cdot \left(k \cdot j\right)}\right) \]
      9. *-commutative68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{\left(k \cdot j\right) \cdot 27}\right) \]
      10. associate-*l*68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    8. Simplified68.9%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, i \cdot 4, k \cdot \left(j \cdot 27\right)\right)} \]
    9. Taylor expanded in c around inf 38.4%

      \[\leadsto \color{blue}{c \cdot b} \]

    if -1.70000000000000009e90 < b < -3.49999999999999988e-230

    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. sub-neg91.4%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-91.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg91.4%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + \left(-\left(a \cdot 4\right) \cdot t\right)\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      4. sub-neg91.4%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--91.4%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*93.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in93.8%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \color{blue}{\left(-j \cdot 27\right) \cdot k}\right) \]
      8. cancel-sign-sub93.8%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{\left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
      9. associate-*l*93.8%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right) \]
      10. associate-*l*93.7%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified93.7%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    4. Taylor expanded in y around 0 78.1%

      \[\leadsto \color{blue}{\left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
    5. Step-by-step derivation
      1. *-un-lft-identity78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
      2. fma-def78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(k \cdot j\right)\right)} \]
      3. *-commutative78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, \color{blue}{x \cdot i}, 27 \cdot \left(k \cdot j\right)\right) \]
      4. associate-*r*78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, x \cdot i, \color{blue}{\left(27 \cdot k\right) \cdot j}\right) \]
    6. Applied egg-rr78.1%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lft-identity78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
      2. fma-udef78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\left(4 \cdot \left(x \cdot i\right) + \left(27 \cdot k\right) \cdot j\right)} \]
      3. *-commutative78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{\left(x \cdot i\right) \cdot 4} + \left(27 \cdot k\right) \cdot j\right) \]
      4. associate-*l*78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{x \cdot \left(i \cdot 4\right)} + \left(27 \cdot k\right) \cdot j\right) \]
      5. *-commutative78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(x \cdot \color{blue}{\left(4 \cdot i\right)} + \left(27 \cdot k\right) \cdot j\right) \]
      6. fma-def78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, 4 \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
      7. *-commutative78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, \color{blue}{i \cdot 4}, \left(27 \cdot k\right) \cdot j\right) \]
      8. associate-*r*78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{27 \cdot \left(k \cdot j\right)}\right) \]
      9. *-commutative78.1%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{\left(k \cdot j\right) \cdot 27}\right) \]
      10. associate-*l*78.2%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    8. Simplified78.2%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, i \cdot 4, k \cdot \left(j \cdot 27\right)\right)} \]
    9. Taylor expanded in k around inf 36.1%

      \[\leadsto \color{blue}{-27 \cdot \left(k \cdot j\right)} \]
    10. Step-by-step derivation
      1. *-commutative36.1%

        \[\leadsto \color{blue}{\left(k \cdot j\right) \cdot -27} \]
      2. associate-*r*36.2%

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
    11. Simplified36.2%

      \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]

    if -3.49999999999999988e-230 < b < 5.29999999999999974e-51

    1. Initial program 88.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg88.2%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. +-commutative88.2%

        \[\leadsto \color{blue}{\left(-\left(j \cdot 27\right) \cdot k\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      3. associate-*l*88.2%

        \[\leadsto \left(-\color{blue}{j \cdot \left(27 \cdot k\right)}\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      4. distribute-rgt-neg-in88.2%

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def90.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(j, -27 \cdot k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      6. *-commutative90.0%

        \[\leadsto \mathsf{fma}\left(j, -\color{blue}{k \cdot 27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      7. distribute-rgt-neg-in90.0%

        \[\leadsto \mathsf{fma}\left(j, \color{blue}{k \cdot \left(-27\right)}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      8. metadata-eval90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot \color{blue}{-27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. sub-neg90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \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) + b \cdot c\right) + \left(-\left(x \cdot 4\right) \cdot i\right)}\right) \]
      10. +-commutative90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{\left(-\left(x \cdot 4\right) \cdot i\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
      11. associate-*l*90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \left(-\color{blue}{x \cdot \left(4 \cdot i\right)}\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
      12. distribute-rgt-neg-in90.0%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{x \cdot \left(-4 \cdot i\right)} + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
    3. Simplified93.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), b \cdot c\right)\right)\right)} \]
    4. Taylor expanded in i around inf 33.0%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification36.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.7 \cdot 10^{+90}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-230}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \leq 5.3 \cdot 10^{-51}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 23: 33.3% accurate, 3.4× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+86}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq 22500:\\ \;\;\;\;-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 -5e+86) (* b c) (if (<= b 22500.0) (* -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 <= -5e+86) {
		tmp = b * c;
	} else if (b <= 22500.0) {
		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 <= (-5d+86)) then
        tmp = b * c
    else if (b <= 22500.0d0) 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 <= -5e+86) {
		tmp = b * c;
	} else if (b <= 22500.0) {
		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 <= -5e+86:
		tmp = b * c
	elif b <= 22500.0:
		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 (b <= -5e+86)
		tmp = Float64(b * c);
	elseif (b <= 22500.0)
		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 <= -5e+86)
		tmp = b * c;
	elseif (b <= 22500.0)
		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[b, -5e+86], N[(b * c), $MachinePrecision], If[LessEqual[b, 22500.0], 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 \leq -5 \cdot 10^{+86}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \leq 22500:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.9999999999999998e86 or 22500 < b

    1. Initial program 84.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg84.0%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-84.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
      3. sub-neg84.0%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + \left(-\left(a \cdot 4\right) \cdot t\right)\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      4. sub-neg84.0%

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--86.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*85.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. distribute-lft-neg-in85.0%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \color{blue}{\left(-j \cdot 27\right) \cdot k}\right) \]
      8. cancel-sign-sub85.0%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{\left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
      9. associate-*l*85.0%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right) \]
      10. associate-*l*85.0%

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified85.0%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    4. Taylor expanded in y around 0 67.9%

      \[\leadsto \color{blue}{\left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
    5. Step-by-step derivation
      1. *-un-lft-identity67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
      2. fma-def67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(k \cdot j\right)\right)} \]
      3. *-commutative67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, \color{blue}{x \cdot i}, 27 \cdot \left(k \cdot j\right)\right) \]
      4. associate-*r*67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, x \cdot i, \color{blue}{\left(27 \cdot k\right) \cdot j}\right) \]
    6. Applied egg-rr67.9%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lft-identity67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
      2. fma-udef67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\left(4 \cdot \left(x \cdot i\right) + \left(27 \cdot k\right) \cdot j\right)} \]
      3. *-commutative67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{\left(x \cdot i\right) \cdot 4} + \left(27 \cdot k\right) \cdot j\right) \]
      4. associate-*l*67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{x \cdot \left(i \cdot 4\right)} + \left(27 \cdot k\right) \cdot j\right) \]
      5. *-commutative67.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(x \cdot \color{blue}{\left(4 \cdot i\right)} + \left(27 \cdot k\right) \cdot j\right) \]
      6. fma-def68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, 4 \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
      7. *-commutative68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, \color{blue}{i \cdot 4}, \left(27 \cdot k\right) \cdot j\right) \]
      8. associate-*r*68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{27 \cdot \left(k \cdot j\right)}\right) \]
      9. *-commutative68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{\left(k \cdot j\right) \cdot 27}\right) \]
      10. associate-*l*68.9%

        \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
    8. Simplified68.9%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, i \cdot 4, k \cdot \left(j \cdot 27\right)\right)} \]
    9. Taylor expanded in c around inf 41.5%

      \[\leadsto \color{blue}{c \cdot b} \]

    if -4.9999999999999998e86 < b < 22500

    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. Step-by-step derivation
      1. sub-neg89.6%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. +-commutative89.6%

        \[\leadsto \color{blue}{\left(-\left(j \cdot 27\right) \cdot k\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      3. associate-*l*89.6%

        \[\leadsto \left(-\color{blue}{j \cdot \left(27 \cdot k\right)}\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      4. distribute-rgt-neg-in89.6%

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def91.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(j, -27 \cdot k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      6. *-commutative91.6%

        \[\leadsto \mathsf{fma}\left(j, -\color{blue}{k \cdot 27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      7. distribute-rgt-neg-in91.6%

        \[\leadsto \mathsf{fma}\left(j, \color{blue}{k \cdot \left(-27\right)}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      8. metadata-eval91.6%

        \[\leadsto \mathsf{fma}\left(j, k \cdot \color{blue}{-27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. sub-neg91.6%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \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) + b \cdot c\right) + \left(-\left(x \cdot 4\right) \cdot i\right)}\right) \]
      10. +-commutative91.6%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{\left(-\left(x \cdot 4\right) \cdot i\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
      11. associate-*l*91.6%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \left(-\color{blue}{x \cdot \left(4 \cdot i\right)}\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
      12. distribute-rgt-neg-in91.6%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{x \cdot \left(-4 \cdot i\right)} + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), b \cdot c\right)\right)\right)} \]
    4. Taylor expanded in j around inf 29.8%

      \[\leadsto \color{blue}{-27 \cdot \left(k \cdot j\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+86}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq 22500:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 24: 23.7% 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 87.3%

    \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
  2. Step-by-step derivation
    1. sub-neg87.3%

      \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
    2. associate-+l-87.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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right)} \]
    3. sub-neg87.3%

      \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + \left(-\left(a \cdot 4\right) \cdot t\right)\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
    4. sub-neg87.3%

      \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
    5. distribute-rgt-out--88.5%

      \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
    6. associate-*l*88.8%

      \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
    7. distribute-lft-neg-in88.8%

      \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \color{blue}{\left(-j \cdot 27\right) \cdot k}\right) \]
    8. cancel-sign-sub88.8%

      \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{\left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
    9. associate-*l*88.8%

      \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right) \]
    10. associate-*l*88.8%

      \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
  3. Simplified88.8%

    \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
  4. Taylor expanded in y around 0 73.3%

    \[\leadsto \color{blue}{\left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
  5. Step-by-step derivation
    1. *-un-lft-identity73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
    2. fma-def73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(k \cdot j\right)\right)} \]
    3. *-commutative73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, \color{blue}{x \cdot i}, 27 \cdot \left(k \cdot j\right)\right) \]
    4. associate-*r*73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - 1 \cdot \mathsf{fma}\left(4, x \cdot i, \color{blue}{\left(27 \cdot k\right) \cdot j}\right) \]
  6. Applied egg-rr73.3%

    \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{1 \cdot \mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
  7. Step-by-step derivation
    1. *-lft-identity73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(4, x \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
    2. fma-udef73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\left(4 \cdot \left(x \cdot i\right) + \left(27 \cdot k\right) \cdot j\right)} \]
    3. *-commutative73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{\left(x \cdot i\right) \cdot 4} + \left(27 \cdot k\right) \cdot j\right) \]
    4. associate-*l*73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(\color{blue}{x \cdot \left(i \cdot 4\right)} + \left(27 \cdot k\right) \cdot j\right) \]
    5. *-commutative73.3%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \left(x \cdot \color{blue}{\left(4 \cdot i\right)} + \left(27 \cdot k\right) \cdot j\right) \]
    6. fma-def73.7%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, 4 \cdot i, \left(27 \cdot k\right) \cdot j\right)} \]
    7. *-commutative73.7%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, \color{blue}{i \cdot 4}, \left(27 \cdot k\right) \cdot j\right) \]
    8. associate-*r*73.7%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{27 \cdot \left(k \cdot j\right)}\right) \]
    9. *-commutative73.7%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{\left(k \cdot j\right) \cdot 27}\right) \]
    10. associate-*l*73.7%

      \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \mathsf{fma}\left(x, i \cdot 4, \color{blue}{k \cdot \left(j \cdot 27\right)}\right) \]
  8. Simplified73.7%

    \[\leadsto \left(c \cdot b + -4 \cdot \left(a \cdot t\right)\right) - \color{blue}{\mathsf{fma}\left(x, i \cdot 4, k \cdot \left(j \cdot 27\right)\right)} \]
  9. Taylor expanded in c around inf 21.7%

    \[\leadsto \color{blue}{c \cdot b} \]
  10. Final simplification21.7%

    \[\leadsto b \cdot c \]

Developer target: 88.9% 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 2023181 
(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)))