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

Percentage Accurate: 85.1% → 91.7%
Time: 26.8s
Alternatives: 24
Speedup: 0.9×

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: 85.1% accurate, 1.0× speedup?

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

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

Alternative 1: 91.7% accurate, 0.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_1 \leq 10^{+208}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \end{array} \]
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1
         (-
          (-
           (+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
           (* (* x 4.0) i))
          (* (* j 27.0) k))))
   (if (<= t_1 1e+208)
     t_1
     (fma
      j
      (* k -27.0)
      (fma
       x
       (* i -4.0)
       (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (* b c)))))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double tmp;
	if (t_1 <= 1e+208) {
		tmp = t_1;
	} else {
		tmp = fma(j, (k * -27.0), fma(x, (i * -4.0), fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), (b * c))));
	}
	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(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
	tmp = 0.0
	if (t_1 <= 1e+208)
		tmp = t_1;
	else
		tmp = fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), Float64(b * c))));
	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_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+208], t$95$1, 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[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq 10^{+208}:\\
\;\;\;\;t_1\\

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


\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)) < 9.9999999999999998e207

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

    if 9.9999999999999998e207 < (-.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 67.4%

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

        \[\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. *-commutative73.2%

        \[\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-in73.2%

        \[\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-eval73.2%

        \[\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-neg73.2%

        \[\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. +-commutative73.2%

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

        \[\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-in74.1%

        \[\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. Simplified87.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.1%

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

Alternative 2: 90.4% accurate, 0.5× speedup?

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

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


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

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

    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. Taylor expanded in t around -inf 60.0%

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

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

Alternative 3: 81.4% accurate, 0.9× speedup?

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+80}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\right) - t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j 27) k) < -2.0000000000000001e108

    1. Initial program 78.6%

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

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

    if -2.0000000000000001e108 < (*.f64 (*.f64 j 27) k) < 2e80

    1. Initial program 89.3%

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

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

      \[\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)} \]

    if 2e80 < (*.f64 (*.f64 j 27) k)

    1. Initial program 82.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. Taylor expanded in y around 0 81.3%

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

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

Alternative 4: 87.3% accurate, 0.9× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t \leq -3.8 \cdot 10^{-44} \lor \neg \left(t \leq 10^{-223}\right):\\ \;\;\;\;\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - t \cdot \left(a \cdot 4 - x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\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)\right) - 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 (* (* j 27.0) k)))
   (if (or (<= t -3.8e-44) (not (<= t 1e-223)))
     (-
      (-
       (- (* b c) (* (* x 4.0) i))
       (* t (- (* a 4.0) (* x (* 18.0 (* y z))))))
      t_1)
     (- (- (+ (* b c) (* 18.0 (* y (* t (* x z))))) (* 4.0 (* x i))) t_1))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double tmp;
	if ((t <= -3.8e-44) || !(t <= 1e-223)) {
		tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (18.0 * (y * z)))))) - t_1;
	} else {
		tmp = (((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (x * i))) - 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 = (j * 27.0d0) * k
    if ((t <= (-3.8d-44)) .or. (.not. (t <= 1d-223))) then
        tmp = (((b * c) - ((x * 4.0d0) * i)) - (t * ((a * 4.0d0) - (x * (18.0d0 * (y * z)))))) - t_1
    else
        tmp = (((b * c) + (18.0d0 * (y * (t * (x * z))))) - (4.0d0 * (x * i))) - 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 = (j * 27.0) * k;
	double tmp;
	if ((t <= -3.8e-44) || !(t <= 1e-223)) {
		tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (18.0 * (y * z)))))) - t_1;
	} else {
		tmp = (((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (x * i))) - t_1;
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (j * 27.0) * k
	tmp = 0
	if (t <= -3.8e-44) or not (t <= 1e-223):
		tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (18.0 * (y * z)))))) - t_1
	else:
		tmp = (((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (x * i))) - 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(j * 27.0) * k)
	tmp = 0.0
	if ((t <= -3.8e-44) || !(t <= 1e-223))
		tmp = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - Float64(t * Float64(Float64(a * 4.0) - Float64(x * Float64(18.0 * Float64(y * z)))))) - t_1);
	else
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(y * Float64(t * Float64(x * z))))) - Float64(4.0 * Float64(x * i))) - 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 = (j * 27.0) * k;
	tmp = 0.0;
	if ((t <= -3.8e-44) || ~((t <= 1e-223)))
		tmp = (((b * c) - ((x * 4.0) * i)) - (t * ((a * 4.0) - (x * (18.0 * (y * z)))))) - t_1;
	else
		tmp = (((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (x * i))) - 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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t, -3.8e-44], N[Not[LessEqual[t, 1e-223]], $MachinePrecision]], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(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] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{-44} \lor \neg \left(t \leq 10^{-223}\right):\\
\;\;\;\;\left(\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - t \cdot \left(a \cdot 4 - x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.8000000000000001e-44 or 9.9999999999999997e-224 < t

    1. Initial program 84.9%

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

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

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

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

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

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

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

    if -3.8000000000000001e-44 < t < 9.9999999999999997e-224

    1. Initial program 88.8%

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

      \[\leadsto \color{blue}{\left(\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)\right)} - \left(j \cdot 27\right) \cdot k \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.1%

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

Alternative 5: 88.0% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.2000000000000001e-109 or 1.22e-60 < t

    1. Initial program 85.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-neg85.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-85.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-neg85.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-neg85.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.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*87.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-in87.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-sub87.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.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*88.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. Simplified88.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)} \]

    if -7.2000000000000001e-109 < t < 1.22e-60

    1. Initial program 88.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-109} \lor \neg \left(t \leq 1.22 \cdot 10^{-60}\right):\\ \;\;\;\;\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)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

Alternative 6: 59.2% accurate, 1.0× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ t_2 := b \cdot c - t_1\\ t_3 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+34}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-108}:\\ \;\;\;\;\left(x \cdot 18\right) \cdot \left(t \cdot \left(y \cdot z\right)\right) - t_1\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-222}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-258}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) - t_1\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-151}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+32}:\\ \;\;\;\;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 (* (* j 27.0) k))
        (t_2 (- (* b c) t_1))
        (t_3 (* t (- (* 18.0 (* z (* x y))) (* a 4.0)))))
   (if (<= t -2.1e+34)
     t_3
     (if (<= t -1.45e-19)
       t_2
       (if (<= t -1.65e-108)
         (- (* (* x 18.0) (* t (* y z))) t_1)
         (if (<= t -2.1e-222)
           t_2
           (if (<= t 3.1e-258)
             (- (* i (* x -4.0)) t_1)
             (if (<= t 5.6e-151)
               t_2
               (if (<= t 2.3e-138)
                 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
                 (if (<= t 7e-136)
                   (- (* b c) (* 4.0 (* x i)))
                   (if (<= t 4.4e+32) 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 = (j * 27.0) * k;
	double t_2 = (b * c) - t_1;
	double t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
	double tmp;
	if (t <= -2.1e+34) {
		tmp = t_3;
	} else if (t <= -1.45e-19) {
		tmp = t_2;
	} else if (t <= -1.65e-108) {
		tmp = ((x * 18.0) * (t * (y * z))) - t_1;
	} else if (t <= -2.1e-222) {
		tmp = t_2;
	} else if (t <= 3.1e-258) {
		tmp = (i * (x * -4.0)) - t_1;
	} else if (t <= 5.6e-151) {
		tmp = t_2;
	} else if (t <= 2.3e-138) {
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	} else if (t <= 7e-136) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 4.4e+32) {
		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 = (j * 27.0d0) * k
    t_2 = (b * c) - t_1
    t_3 = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
    if (t <= (-2.1d+34)) then
        tmp = t_3
    else if (t <= (-1.45d-19)) then
        tmp = t_2
    else if (t <= (-1.65d-108)) then
        tmp = ((x * 18.0d0) * (t * (y * z))) - t_1
    else if (t <= (-2.1d-222)) then
        tmp = t_2
    else if (t <= 3.1d-258) then
        tmp = (i * (x * (-4.0d0))) - t_1
    else if (t <= 5.6d-151) then
        tmp = t_2
    else if (t <= 2.3d-138) then
        tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
    else if (t <= 7d-136) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if (t <= 4.4d+32) 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 = (j * 27.0) * k;
	double t_2 = (b * c) - t_1;
	double t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
	double tmp;
	if (t <= -2.1e+34) {
		tmp = t_3;
	} else if (t <= -1.45e-19) {
		tmp = t_2;
	} else if (t <= -1.65e-108) {
		tmp = ((x * 18.0) * (t * (y * z))) - t_1;
	} else if (t <= -2.1e-222) {
		tmp = t_2;
	} else if (t <= 3.1e-258) {
		tmp = (i * (x * -4.0)) - t_1;
	} else if (t <= 5.6e-151) {
		tmp = t_2;
	} else if (t <= 2.3e-138) {
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	} else if (t <= 7e-136) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 4.4e+32) {
		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 = (j * 27.0) * k
	t_2 = (b * c) - t_1
	t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0))
	tmp = 0
	if t <= -2.1e+34:
		tmp = t_3
	elif t <= -1.45e-19:
		tmp = t_2
	elif t <= -1.65e-108:
		tmp = ((x * 18.0) * (t * (y * z))) - t_1
	elif t <= -2.1e-222:
		tmp = t_2
	elif t <= 3.1e-258:
		tmp = (i * (x * -4.0)) - t_1
	elif t <= 5.6e-151:
		tmp = t_2
	elif t <= 2.3e-138:
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i))
	elif t <= 7e-136:
		tmp = (b * c) - (4.0 * (x * i))
	elif t <= 4.4e+32:
		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(j * 27.0) * k)
	t_2 = Float64(Float64(b * c) - t_1)
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -2.1e+34)
		tmp = t_3;
	elseif (t <= -1.45e-19)
		tmp = t_2;
	elseif (t <= -1.65e-108)
		tmp = Float64(Float64(Float64(x * 18.0) * Float64(t * Float64(y * z))) - t_1);
	elseif (t <= -2.1e-222)
		tmp = t_2;
	elseif (t <= 3.1e-258)
		tmp = Float64(Float64(i * Float64(x * -4.0)) - t_1);
	elseif (t <= 5.6e-151)
		tmp = t_2;
	elseif (t <= 2.3e-138)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)));
	elseif (t <= 7e-136)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (t <= 4.4e+32)
		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 = (j * 27.0) * k;
	t_2 = (b * c) - t_1;
	t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -2.1e+34)
		tmp = t_3;
	elseif (t <= -1.45e-19)
		tmp = t_2;
	elseif (t <= -1.65e-108)
		tmp = ((x * 18.0) * (t * (y * z))) - t_1;
	elseif (t <= -2.1e-222)
		tmp = t_2;
	elseif (t <= 3.1e-258)
		tmp = (i * (x * -4.0)) - t_1;
	elseif (t <= 5.6e-151)
		tmp = t_2;
	elseif (t <= 2.3e-138)
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	elseif (t <= 7e-136)
		tmp = (b * c) - (4.0 * (x * i));
	elseif (t <= 4.4e+32)
		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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+34], t$95$3, If[LessEqual[t, -1.45e-19], t$95$2, If[LessEqual[t, -1.65e-108], N[(N[(N[(x * 18.0), $MachinePrecision] * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, -2.1e-222], t$95$2, If[LessEqual[t, 3.1e-258], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 5.6e-151], t$95$2, If[LessEqual[t, 2.3e-138], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-136], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+32], t$95$2, t$95$3]]]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c - t_1\\
t_3 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+34}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -1.45 \cdot 10^{-19}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq -2.1 \cdot 10^{-222}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 5.6 \cdot 10^{-151}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+32}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -2.10000000000000017e34 or 4.40000000000000002e32 < t

    1. Initial program 83.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-neg83.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-83.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-neg83.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-neg83.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--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*86.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-in86.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-sub86.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*86.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*86.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. Simplified86.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 t around inf 73.6%

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

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

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

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

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

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

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

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

    if -2.10000000000000017e34 < t < -1.45e-19 or -1.6500000000000001e-108 < t < -2.0999999999999999e-222 or 3.09999999999999999e-258 < t < 5.6000000000000002e-151 or 7.00000000000000058e-136 < t < 4.40000000000000002e32

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

    if -1.45e-19 < t < -1.6500000000000001e-108

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-222 < t < 3.09999999999999999e-258

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(i \cdot x\right)} \cdot -4 - \left(j \cdot 27\right) \cdot k \]
      4. associate-*l*82.2%

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

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

    if 5.6000000000000002e-151 < t < 2.2999999999999999e-138

    1. Initial program 50.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-neg50.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-50.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-neg50.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-neg50.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--50.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*75.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-in75.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-sub75.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*75.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*75.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. Simplified75.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 100.0%

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

    if 2.2999999999999999e-138 < t < 7.00000000000000058e-136

    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 j around 0 100.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 y around 0 100.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-19}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-108}:\\ \;\;\;\;\left(x \cdot 18\right) \cdot \left(t \cdot \left(y \cdot z\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-222}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-258}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-151}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+32}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 7: 75.8% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.0999999999999999e224 or 6.80000000000000035e-52 < b

    1. Initial program 83.8%

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

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

        \[\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.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-in83.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-sub83.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*83.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*83.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. Simplified83.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 j around 0 74.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 65.6%

      \[\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 -3.0999999999999999e224 < b < -1.4499999999999999e-53

    1. Initial program 89.6%

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

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

    if -1.4499999999999999e-53 < b < 6.80000000000000035e-52

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

      \[\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)} \]
    3. Taylor expanded in b around 0 86.1%

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

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

Alternative 8: 59.8% accurate, 1.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ t_2 := b \cdot c - t_1\\ t_3 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -1 \cdot 10^{+35}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-222}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-259}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) - t_1\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-151}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+33}:\\ \;\;\;\;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 (* (* j 27.0) k))
        (t_2 (- (* b c) t_1))
        (t_3 (* t (- (* 18.0 (* z (* x y))) (* a 4.0)))))
   (if (<= t -1e+35)
     t_3
     (if (<= t -2.45e-222)
       t_2
       (if (<= t 3.8e-259)
         (- (* i (* x -4.0)) t_1)
         (if (<= t 6e-151)
           t_2
           (if (<= t 2.2e-138)
             (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
             (if (<= t 2.9e-136)
               (- (* b c) (* 4.0 (* x i)))
               (if (<= t 1.7e+33) 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 = (j * 27.0) * k;
	double t_2 = (b * c) - t_1;
	double t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
	double tmp;
	if (t <= -1e+35) {
		tmp = t_3;
	} else if (t <= -2.45e-222) {
		tmp = t_2;
	} else if (t <= 3.8e-259) {
		tmp = (i * (x * -4.0)) - t_1;
	} else if (t <= 6e-151) {
		tmp = t_2;
	} else if (t <= 2.2e-138) {
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	} else if (t <= 2.9e-136) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 1.7e+33) {
		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 = (j * 27.0d0) * k
    t_2 = (b * c) - t_1
    t_3 = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
    if (t <= (-1d+35)) then
        tmp = t_3
    else if (t <= (-2.45d-222)) then
        tmp = t_2
    else if (t <= 3.8d-259) then
        tmp = (i * (x * (-4.0d0))) - t_1
    else if (t <= 6d-151) then
        tmp = t_2
    else if (t <= 2.2d-138) then
        tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
    else if (t <= 2.9d-136) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if (t <= 1.7d+33) 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 = (j * 27.0) * k;
	double t_2 = (b * c) - t_1;
	double t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
	double tmp;
	if (t <= -1e+35) {
		tmp = t_3;
	} else if (t <= -2.45e-222) {
		tmp = t_2;
	} else if (t <= 3.8e-259) {
		tmp = (i * (x * -4.0)) - t_1;
	} else if (t <= 6e-151) {
		tmp = t_2;
	} else if (t <= 2.2e-138) {
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	} else if (t <= 2.9e-136) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 1.7e+33) {
		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 = (j * 27.0) * k
	t_2 = (b * c) - t_1
	t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0))
	tmp = 0
	if t <= -1e+35:
		tmp = t_3
	elif t <= -2.45e-222:
		tmp = t_2
	elif t <= 3.8e-259:
		tmp = (i * (x * -4.0)) - t_1
	elif t <= 6e-151:
		tmp = t_2
	elif t <= 2.2e-138:
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i))
	elif t <= 2.9e-136:
		tmp = (b * c) - (4.0 * (x * i))
	elif t <= 1.7e+33:
		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(j * 27.0) * k)
	t_2 = Float64(Float64(b * c) - t_1)
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -1e+35)
		tmp = t_3;
	elseif (t <= -2.45e-222)
		tmp = t_2;
	elseif (t <= 3.8e-259)
		tmp = Float64(Float64(i * Float64(x * -4.0)) - t_1);
	elseif (t <= 6e-151)
		tmp = t_2;
	elseif (t <= 2.2e-138)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)));
	elseif (t <= 2.9e-136)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (t <= 1.7e+33)
		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 = (j * 27.0) * k;
	t_2 = (b * c) - t_1;
	t_3 = t * ((18.0 * (z * (x * y))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -1e+35)
		tmp = t_3;
	elseif (t <= -2.45e-222)
		tmp = t_2;
	elseif (t <= 3.8e-259)
		tmp = (i * (x * -4.0)) - t_1;
	elseif (t <= 6e-151)
		tmp = t_2;
	elseif (t <= 2.2e-138)
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	elseif (t <= 2.9e-136)
		tmp = (b * c) - (4.0 * (x * i));
	elseif (t <= 1.7e+33)
		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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+35], t$95$3, If[LessEqual[t, -2.45e-222], t$95$2, If[LessEqual[t, 3.8e-259], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 6e-151], t$95$2, If[LessEqual[t, 2.2e-138], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e-136], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+33], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c - t_1\\
t_3 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+35}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -2.45 \cdot 10^{-222}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 6 \cdot 10^{-151}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+33}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -9.9999999999999997e34 or 1.7e33 < t

    1. Initial program 83.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-neg83.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-83.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-neg83.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-neg83.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--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*86.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-in86.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-sub86.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*86.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*86.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. Simplified86.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 t around inf 73.6%

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

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

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

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

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

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

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

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

    if -9.9999999999999997e34 < t < -2.45e-222 or 3.8e-259 < t < 6e-151 or 2.89999999999999995e-136 < t < 1.7e33

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

    if -2.45e-222 < t < 3.8e-259

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(i \cdot x\right)} \cdot -4 - \left(j \cdot 27\right) \cdot k \]
      4. associate-*l*82.2%

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

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

    if 6e-151 < t < 2.1999999999999999e-138

    1. Initial program 50.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-neg50.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-50.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-neg50.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-neg50.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--50.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*75.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-in75.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-sub75.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*75.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*75.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. Simplified75.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 100.0%

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

    if 2.1999999999999999e-138 < t < 2.89999999999999995e-136

    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 j around 0 100.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 y around 0 100.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-222}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-259}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-151}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+33}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 9: 75.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq 3.15 \cdot 10^{+38}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.99999999999999984e275 or -7.2000000000000002e130 < y < 3.15000000000000001e38

    1. Initial program 89.8%

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

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

    if -3.99999999999999984e275 < y < -7.2000000000000002e130

    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. Taylor expanded in t around -inf 72.9%

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

    if 3.15000000000000001e38 < y

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

Alternative 10: 67.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j 27) k) < -4.00000000000000037e56

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000037e56 < (*.f64 (*.f64 j 27) k) < 4.99999999999999954e186

    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*88.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-in88.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-sub88.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*88.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*88.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. Simplified88.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 j around 0 85.9%

      \[\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 y around 0 71.6%

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

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

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

    if 4.99999999999999954e186 < (*.f64 (*.f64 j 27) k)

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

Alternative 11: 74.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq 1.75 \cdot 10^{+79}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 1.2 \cdot 10^{+188}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 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.05e19 or 6.4000000000000003e-60 < x < 1.7499999999999999e79

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

    if -3.05e19 < x < 6.4000000000000003e-60

    1. Initial program 92.8%

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

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

    if 1.7499999999999999e79 < x < 1.2e188

    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--78.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*78.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-in78.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-sub78.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*78.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*78.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. Simplified78.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 78.5%

      \[\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 y around 0 87.2%

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

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

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

    if 1.2e188 < x

    1. Initial program 73.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-neg73.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-73.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-neg73.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-neg73.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--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*89.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-in89.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-sub89.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*94.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*94.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. Simplified94.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 x around inf 69.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.05 \cdot 10^{+19}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 6.4 \cdot 10^{-60}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+79}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+188}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \end{array} \]

Alternative 12: 73.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq 1.3 \cdot 10^{+78}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.05e19 or 5.70000000000000032e-58 < x < 1.3e78

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

    if -1.05e19 < x < 5.70000000000000032e-58

    1. Initial program 92.8%

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

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

    if 1.3e78 < x

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

        \[\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.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-in83.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-sub83.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*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*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(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified85.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 j around 0 83.4%

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

      \[\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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.1%

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

Alternative 13: 72.7% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

    if -6.5e18 < x < 1.65e-139

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

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

    if 1.65e-139 < x < 8.8000000000000005e74

    1. Initial program 88.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. Taylor expanded in t around -inf 80.3%

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

    if 8.8000000000000005e74 < x

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

        \[\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.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-in83.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-sub83.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*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*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(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified85.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 j around 0 83.4%

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

      \[\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) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification81.0%

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

Alternative 14: 70.5% accurate, 1.3× speedup?

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

\mathbf{elif}\;x \leq 360:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\

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

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

\mathbf{elif}\;x \leq 8 \cdot 10^{+264}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.6500000000000001e111 or 4.60000000000000023e188 < x < 8.00000000000000035e264

    1. Initial program 74.3%

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

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

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

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

    if -1.6500000000000001e111 < x < 360

    1. Initial program 92.1%

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

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

    if 360 < x < 1.3e78

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e78 < x < 4.60000000000000023e188

    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--78.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*78.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-in78.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-sub78.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*78.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*78.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. Simplified78.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 78.5%

      \[\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 y around 0 87.2%

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

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

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

    if 8.00000000000000035e264 < x

    1. Initial program 83.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg83.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-83.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-neg83.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-neg83.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--83.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*83.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-in83.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-sub83.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*99.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*99.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. Simplified99.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 j around 0 83.1%

      \[\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 y around 0 83.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq 360:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+78}:\\ \;\;\;\;\left(x \cdot 18\right) \cdot \left(t \cdot \left(y \cdot z\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{+188}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+264}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 15: 59.4% accurate, 1.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 8.2 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.4500000000000002e33 or 8.2000000000000003e31 < t

    1. Initial program 83.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-neg83.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-83.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-neg83.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-neg83.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--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*86.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-in86.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-sub86.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*86.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*86.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. Simplified86.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 t around inf 73.6%

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

    if -4.4500000000000002e33 < t < -2.99999999999999996e-283 or 9.7999999999999999e-136 < t < 8.2000000000000003e31

    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. associate--l+89.6%

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

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

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

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

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

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

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

    if -2.99999999999999996e-283 < t < 9.7999999999999999e-136

    1. Initial program 84.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg84.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-84.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-neg84.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-neg84.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--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*79.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-in79.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-sub79.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*79.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*79.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. Simplified79.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 j around 0 66.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 y around 0 71.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.45 \cdot 10^{+33}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-283}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+31}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 16: 59.4% accurate, 1.5× speedup?

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

\mathbf{elif}\;t \leq -8.3 \cdot 10^{-283}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.3 \cdot 10^{+33}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.6999999999999998e33 or 4.30000000000000028e33 < t

    1. Initial program 83.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-neg83.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-83.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-neg83.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-neg83.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--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*86.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-in86.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-sub86.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*86.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*86.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. Simplified86.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 t around inf 73.6%

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

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

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

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

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

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

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

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

    if -4.6999999999999998e33 < t < -8.29999999999999981e-283 or 5.9999999999999996e-136 < t < 4.30000000000000028e33

    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. associate--l+89.6%

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

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

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

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

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

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

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

    if -8.29999999999999981e-283 < t < 5.9999999999999996e-136

    1. Initial program 84.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg84.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-84.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-neg84.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-neg84.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--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*79.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-in79.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-sub79.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*79.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*79.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. Simplified79.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 j around 0 66.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 y around 0 71.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{+33}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -8.3 \cdot 10^{-283}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+33}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 17: 72.2% accurate, 1.5× speedup?

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

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

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

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


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

    1. Initial program 75.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-neg75.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-75.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-neg75.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-neg75.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--77.8%

        \[\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*77.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-in77.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-sub77.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*77.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*77.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. Simplified77.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 t around inf 81.1%

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

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

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

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

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

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

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

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

    if -1.6500000000000001e152 < t < -6.0000000000000005e-44

    1. Initial program 89.1%

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

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

    if -6.0000000000000005e-44 < t < 3.8000000000000001e77

    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. Taylor expanded in t around 0 77.2%

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

    if 3.8000000000000001e77 < t

    1. Initial program 85.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg85.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-85.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-neg85.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-neg85.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--89.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*89.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-in89.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-sub89.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*89.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*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 t around inf 76.5%

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

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

Alternative 18: 41.8% accurate, 1.8× speedup?

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

\mathbf{elif}\;b \leq -8 \cdot 10^{+132}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.8 \cdot 10^{-56}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.70000000000000005e195 or 1.79999999999999989e-56 < b

    1. Initial program 83.9%

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

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      2. *-commutative80.4%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      3. *-commutative80.4%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)}\right) \cdot \left(t \cdot \left(y \cdot z\right)\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. *-commutative80.4%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\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. Applied egg-rr80.4%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \left(\left(y \cdot z\right) \cdot t\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) \]
    5. Taylor expanded in b around inf 40.7%

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

    if -1.70000000000000005e195 < b < -7.99999999999999993e132 or -1.95000000000000019e75 < b < 1.79999999999999989e-56

    1. Initial program 87.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg87.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-87.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-neg87.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-neg87.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.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*86.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-in86.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-sub86.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.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*87.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. Simplified87.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 j around 0 72.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 y around 0 53.9%

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

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

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

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

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

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

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

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

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

    if -7.99999999999999993e132 < b < -1.95000000000000019e75

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.7 \cdot 10^{+195}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -8 \cdot 10^{+132}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{+75}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-56}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 19: 49.3% accurate, 1.8× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := b \cdot c - \left(j \cdot 27\right) \cdot k\\ t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{if}\;t \leq -1.55 \cdot 10^{+34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.95 \cdot 10^{-283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \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) (* (* j 27.0) k))) (t_2 (* -4.0 (+ (* x i) (* t a)))))
   (if (<= t -1.55e+34)
     t_2
     (if (<= t -3.95e-283)
       t_1
       (if (<= t 4.1e-136)
         (- (* b c) (* 4.0 (* x i)))
         (if (<= t 3.9e+32) t_1 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) - ((j * 27.0) * k);
	double t_2 = -4.0 * ((x * i) + (t * a));
	double tmp;
	if (t <= -1.55e+34) {
		tmp = t_2;
	} else if (t <= -3.95e-283) {
		tmp = t_1;
	} else if (t <= 4.1e-136) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 3.9e+32) {
		tmp = t_1;
	} 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) - ((j * 27.0d0) * k)
    t_2 = (-4.0d0) * ((x * i) + (t * a))
    if (t <= (-1.55d+34)) then
        tmp = t_2
    else if (t <= (-3.95d-283)) then
        tmp = t_1
    else if (t <= 4.1d-136) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if (t <= 3.9d+32) then
        tmp = t_1
    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) - ((j * 27.0) * k);
	double t_2 = -4.0 * ((x * i) + (t * a));
	double tmp;
	if (t <= -1.55e+34) {
		tmp = t_2;
	} else if (t <= -3.95e-283) {
		tmp = t_1;
	} else if (t <= 4.1e-136) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 3.9e+32) {
		tmp = t_1;
	} 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) - ((j * 27.0) * k)
	t_2 = -4.0 * ((x * i) + (t * a))
	tmp = 0
	if t <= -1.55e+34:
		tmp = t_2
	elif t <= -3.95e-283:
		tmp = t_1
	elif t <= 4.1e-136:
		tmp = (b * c) - (4.0 * (x * i))
	elif t <= 3.9e+32:
		tmp = t_1
	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(Float64(j * 27.0) * k))
	t_2 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)))
	tmp = 0.0
	if (t <= -1.55e+34)
		tmp = t_2;
	elseif (t <= -3.95e-283)
		tmp = t_1;
	elseif (t <= 4.1e-136)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (t <= 3.9e+32)
		tmp = t_1;
	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) - ((j * 27.0) * k);
	t_2 = -4.0 * ((x * i) + (t * a));
	tmp = 0.0;
	if (t <= -1.55e+34)
		tmp = t_2;
	elseif (t <= -3.95e-283)
		tmp = t_1;
	elseif (t <= 4.1e-136)
		tmp = (b * c) - (4.0 * (x * i));
	elseif (t <= 3.9e+32)
		tmp = t_1;
	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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+34], t$95$2, If[LessEqual[t, -3.95e-283], t$95$1, If[LessEqual[t, 4.1e-136], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e+32], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(j \cdot 27\right) \cdot k\\
t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+34}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -3.95 \cdot 10^{-283}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 3.9 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.54999999999999989e34 or 3.8999999999999999e32 < t

    1. Initial program 83.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-neg83.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-83.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-neg83.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-neg83.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--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*86.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-in86.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-sub86.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*86.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*86.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. Simplified86.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 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 y around 0 60.7%

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

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

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

      \[\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-inv53.5%

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

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

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

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

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

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

    if -1.54999999999999989e34 < t < -3.9500000000000002e-283 or 4.10000000000000025e-136 < t < 3.8999999999999999e32

    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. associate--l+89.6%

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

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

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

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

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

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

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

    if -3.9500000000000002e-283 < t < 4.10000000000000025e-136

    1. Initial program 84.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg84.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-84.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-neg84.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-neg84.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--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*79.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-in79.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-sub79.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*79.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*79.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. Simplified79.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 j around 0 66.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 y around 0 71.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+34}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;t \leq -3.95 \cdot 10^{-283}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+32}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \end{array} \]

Alternative 20: 43.5% accurate, 2.0× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -5.5 \cdot 10^{+132}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{+75}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-57}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\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 -5.5e+132)
   (- (* b c) (* 4.0 (* x i)))
   (if (<= b -1.95e+75)
     (* k (* j -27.0))
     (if (<= b 6.5e-57) (* -4.0 (+ (* x i) (* t 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) {
	double tmp;
	if (b <= -5.5e+132) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (b <= -1.95e+75) {
		tmp = k * (j * -27.0);
	} else if (b <= 6.5e-57) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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 <= (-5.5d+132)) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if (b <= (-1.95d+75)) then
        tmp = k * (j * (-27.0d0))
    else if (b <= 6.5d-57) then
        tmp = (-4.0d0) * ((x * i) + (t * a))
    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 <= -5.5e+132) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (b <= -1.95e+75) {
		tmp = k * (j * -27.0);
	} else if (b <= 6.5e-57) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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 <= -5.5e+132:
		tmp = (b * c) - (4.0 * (x * i))
	elif b <= -1.95e+75:
		tmp = k * (j * -27.0)
	elif b <= 6.5e-57:
		tmp = -4.0 * ((x * i) + (t * a))
	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 <= -5.5e+132)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (b <= -1.95e+75)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (b <= 6.5e-57)
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	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 <= -5.5e+132)
		tmp = (b * c) - (4.0 * (x * i));
	elseif (b <= -1.95e+75)
		tmp = k * (j * -27.0);
	elseif (b <= 6.5e-57)
		tmp = -4.0 * ((x * i) + (t * a));
	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, -5.5e+132], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.95e+75], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e-57], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+132}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -5.5e132

    1. Initial program 82.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-neg82.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-82.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-neg82.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-neg82.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--82.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*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 j around 0 78.5%

      \[\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 y around 0 66.8%

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

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

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

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

    if -5.5e132 < b < -1.95000000000000019e75

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95000000000000019e75 < b < 6.49999999999999992e-57

    1. Initial program 87.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg87.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-87.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-neg87.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-neg87.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--89.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*87.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-in87.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-sub87.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*87.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*87.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. Simplified87.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 j around 0 71.5%

      \[\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 y around 0 51.7%

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

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

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

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

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

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

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

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

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

    if 6.49999999999999992e-57 < b

    1. Initial program 83.8%

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

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      2. *-commutative79.3%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      3. *-commutative79.3%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)}\right) \cdot \left(t \cdot \left(y \cdot z\right)\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. *-commutative79.3%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\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. Applied egg-rr79.3%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \left(\left(y \cdot z\right) \cdot t\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) \]
    5. Taylor expanded in b around inf 36.0%

      \[\leadsto \color{blue}{c \cdot b} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification43.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.5 \cdot 10^{+132}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{+75}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-57}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 21: 32.2% accurate, 2.3× speedup?

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

\mathbf{elif}\;j \leq -750000:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;j \leq 3.8 \cdot 10^{-221}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

\mathbf{elif}\;j \leq 2.8 \cdot 10^{-54}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -5.19999999999999999e93

    1. Initial program 77.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-neg77.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. +-commutative77.1%

        \[\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*77.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-in77.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-def84.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. *-commutative84.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-in84.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-eval84.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-neg84.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. +-commutative84.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*84.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-in84.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. Simplified90.8%

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

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

    if -5.19999999999999999e93 < j < -7.5e5 or 3.8000000000000001e-221 < j < 2.8000000000000002e-54

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

      \[\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)} \]
    3. Step-by-step derivation
      1. add-cbrt-cube85.5%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      2. *-commutative85.5%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      3. *-commutative85.5%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)}\right) \cdot \left(t \cdot \left(y \cdot z\right)\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. *-commutative85.5%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\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. Applied egg-rr85.5%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \left(\left(y \cdot z\right) \cdot t\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) \]
    5. Taylor expanded in b around inf 30.5%

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

    if -7.5e5 < j < 3.8000000000000001e-221

    1. Initial program 89.8%

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

        \[\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.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-in87.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-sub87.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*87.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*87.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. Simplified87.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 t around inf 59.5%

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

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

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

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

    if 2.8000000000000002e-54 < j

    1. Initial program 83.0%

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

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

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

        \[\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-def86.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. *-commutative86.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-in86.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-eval86.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-neg86.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. +-commutative86.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*88.3%

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

        \[\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. Simplified90.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -5.2 \cdot 10^{+93}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -750000:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 3.8 \cdot 10^{-221}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;j \leq 2.8 \cdot 10^{-54}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]

Alternative 22: 34.5% accurate, 3.4× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;k \leq -12200000 \lor \neg \left(k \leq 1.5 \cdot 10^{+105}\right):\\ \;\;\;\;-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 (or (<= k -12200000.0) (not (<= k 1.5e+105))) (* -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 ((k <= -12200000.0) || !(k <= 1.5e+105)) {
		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 ((k <= (-12200000.0d0)) .or. (.not. (k <= 1.5d+105))) 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 ((k <= -12200000.0) || !(k <= 1.5e+105)) {
		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 (k <= -12200000.0) or not (k <= 1.5e+105):
		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 ((k <= -12200000.0) || !(k <= 1.5e+105))
		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 ((k <= -12200000.0) || ~((k <= 1.5e+105)))
		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[Or[LessEqual[k, -12200000.0], N[Not[LessEqual[k, 1.5e+105]], $MachinePrecision]], 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}\;k \leq -12200000 \lor \neg \left(k \leq 1.5 \cdot 10^{+105}\right):\\
\;\;\;\;-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 k < -1.22e7 or 1.5e105 < k

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

        \[\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. Simplified91.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 43.4%

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

    if -1.22e7 < k < 1.5e105

    1. Initial program 86.4%

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

      \[\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)} \]
    3. Step-by-step derivation
      1. add-cbrt-cube76.6%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      2. *-commutative76.6%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      3. *-commutative76.6%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)}\right) \cdot \left(t \cdot \left(y \cdot z\right)\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. *-commutative76.6%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\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. Applied egg-rr76.6%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \left(\left(y \cdot z\right) \cdot t\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) \]
    5. Taylor expanded in b around inf 27.0%

      \[\leadsto \color{blue}{c \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -12200000 \lor \neg \left(k \leq 1.5 \cdot 10^{+105}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 23: 34.4% accurate, 3.4× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;k \leq -6.8 \cdot 10^{+15} \lor \neg \left(k \leq 1.6 \cdot 10^{+105}\right):\\ \;\;\;\;j \cdot \left(k \cdot -27\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 (or (<= k -6.8e+15) (not (<= k 1.6e+105))) (* j (* k -27.0)) (* 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 ((k <= -6.8e+15) || !(k <= 1.6e+105)) {
		tmp = j * (k * -27.0);
	} 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 ((k <= (-6.8d+15)) .or. (.not. (k <= 1.6d+105))) then
        tmp = j * (k * (-27.0d0))
    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 ((k <= -6.8e+15) || !(k <= 1.6e+105)) {
		tmp = j * (k * -27.0);
	} 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 (k <= -6.8e+15) or not (k <= 1.6e+105):
		tmp = j * (k * -27.0)
	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 ((k <= -6.8e+15) || !(k <= 1.6e+105))
		tmp = Float64(j * Float64(k * -27.0));
	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 ((k <= -6.8e+15) || ~((k <= 1.6e+105)))
		tmp = j * (k * -27.0);
	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[Or[LessEqual[k, -6.8e+15], N[Not[LessEqual[k, 1.6e+105]], $MachinePrecision]], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -6.8 \cdot 10^{+15} \lor \neg \left(k \leq 1.6 \cdot 10^{+105}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -6.8e15 or 1.6e105 < k

    1. Initial program 85.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-neg85.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. +-commutative85.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*85.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-in85.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*90.5%

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

        \[\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. Simplified91.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 43.8%

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

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

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

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
      4. *-commutative43.7%

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

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

    if -6.8e15 < k < 1.6e105

    1. Initial program 86.5%

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

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      2. *-commutative76.8%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
      3. *-commutative76.8%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)}\right) \cdot \left(t \cdot \left(y \cdot z\right)\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. *-commutative76.8%

        \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\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. Applied egg-rr76.8%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \left(\left(y \cdot z\right) \cdot t\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) \]
    5. Taylor expanded in b around inf 27.5%

      \[\leadsto \color{blue}{c \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -6.8 \cdot 10^{+15} \lor \neg \left(k \leq 1.6 \cdot 10^{+105}\right):\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 24: 23.9% accurate, 10.3× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ b \cdot c \end{array} \]
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return b * c;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    code = b * c
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return b * c;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	return b * c
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(b * c)
end
j, k = num2cell(sort([j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = b * c;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
b \cdot c
\end{array}
Derivation
  1. Initial program 86.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. Simplified88.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)} \]
  3. Step-by-step derivation
    1. add-cbrt-cube78.8%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
    2. *-commutative78.8%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot \left(t \cdot \left(y \cdot z\right)\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) \]
    3. *-commutative78.8%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)}\right) \cdot \left(t \cdot \left(y \cdot z\right)\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. *-commutative78.8%

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\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. Applied egg-rr78.8%

    \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(18, \color{blue}{\sqrt[3]{\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot t\right)\right) \cdot \left(\left(y \cdot z\right) \cdot t\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) \]
  5. Taylor expanded in b around inf 25.3%

    \[\leadsto \color{blue}{c \cdot b} \]
  6. Final simplification25.3%

    \[\leadsto b \cdot c \]

Developer target: 89.4% 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 2023238 
(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)))