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

Percentage Accurate: 85.8% → 92.9%
Time: 30.0s
Alternatives: 27
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 27 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.8% 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: 92.9% accurate, 0.1× speedup?

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

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\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)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 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)) < 1.99999999999999989e273

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

    if 1.99999999999999989e273 < (-.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 86.2%

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

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

    1. Initial program 0.0%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--20.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*24.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-in24.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-sub24.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*24.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*24.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. Simplified24.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 72.4%

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

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

Alternative 2: 92.2% accurate, 0.5× speedup?

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

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


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

    1. Initial program 94.9%

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

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

    1. Initial program 0.0%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--20.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*24.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-in24.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-sub24.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*24.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*24.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. Simplified24.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 72.4%

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

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

Alternative 3: 47.9% accurate, 0.8× speedup?

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

\mathbf{elif}\;j \cdot 27 \leq -4 \cdot 10^{+207}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\

\mathbf{elif}\;j \cdot 27 \leq -4 \cdot 10^{+103}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;j \cdot 27 \leq 5 \cdot 10^{-180}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 j 27) < -1e221 or -4.0000000000000002e207 < (*.f64 j 27) < -4e103 or 9.99999999999999989e-96 < (*.f64 j 27)

    1. Initial program 85.5%

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

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

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

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

        \[\leadsto c \cdot b - \color{blue}{\left(k \cdot j\right) \cdot 27} \]
    7. Simplified57.5%

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

    if -1e221 < (*.f64 j 27) < -4.0000000000000002e207

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

    if -4e103 < (*.f64 j 27) < -3.9999999999999999e-266

    1. Initial program 86.0%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. associate-+l-86.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-neg86.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-neg86.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--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*89.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-in89.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-sub89.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*89.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*89.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. Simplified89.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 t around 0 69.1%

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

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

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

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

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

    if -3.9999999999999999e-266 < (*.f64 j 27) < 1.00000000000000005e-230

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e-230 < (*.f64 j 27) < 5.0000000000000001e-180

    1. Initial program 93.5%

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

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

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

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

    if 5.0000000000000001e-180 < (*.f64 j 27) < 9.99999999999999989e-96

    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. Simplified80.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. Taylor expanded in a around 0 86.3%

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

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

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

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

Alternative 4: 86.2% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1999999999999999e-103

    1. Initial program 84.0%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--85.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*77.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-in77.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-sub77.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*77.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*77.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. Simplified77.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 a around 0 77.6%

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

    if -2.1999999999999999e-103 < z < 1.9e92

    1. Initial program 90.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg90.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-90.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-neg90.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-neg90.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--90.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*94.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-in94.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-sub94.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*94.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*94.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. Simplified94.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)} \]

    if 1.9e92 < z

    1. Initial program 77.4%

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

      \[\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 a around 0 83.6%

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

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

Alternative 5: 62.5% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ t_2 := 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ t_3 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{if}\;y \leq -3.1 \cdot 10^{+209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3 \cdot 10^{+176}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{+136}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+113}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -4.9 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.3 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - -18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-145}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k)))))
        (t_2 (+ (* 18.0 (* y (* t (* x z)))) (* -27.0 (* j k))))
        (t_3 (- (* b c) (* 4.0 (+ (* x i) (* t a))))))
   (if (<= y -3.1e+209)
     t_2
     (if (<= y -3e+176)
       t_3
       (if (<= y -3.4e+136)
         t_2
         (if (<= y -8e+113)
           t_3
           (if (<= y -4.9e+82)
             t_1
             (if (<= y -5.3e+20)
               (* t (- (* a (- 4.0)) (* -18.0 (* y (* x z)))))
               (if (<= y 1.45e-145) t_1 t_2)))))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
	double t_2 = (18.0 * (y * (t * (x * z)))) + (-27.0 * (j * k));
	double t_3 = (b * c) - (4.0 * ((x * i) + (t * a)));
	double tmp;
	if (y <= -3.1e+209) {
		tmp = t_2;
	} else if (y <= -3e+176) {
		tmp = t_3;
	} else if (y <= -3.4e+136) {
		tmp = t_2;
	} else if (y <= -8e+113) {
		tmp = t_3;
	} else if (y <= -4.9e+82) {
		tmp = t_1;
	} else if (y <= -5.3e+20) {
		tmp = t * ((a * -4.0) - (-18.0 * (y * (x * z))));
	} else if (y <= 1.45e-145) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
    t_2 = (18.0d0 * (y * (t * (x * z)))) + ((-27.0d0) * (j * k))
    t_3 = (b * c) - (4.0d0 * ((x * i) + (t * a)))
    if (y <= (-3.1d+209)) then
        tmp = t_2
    else if (y <= (-3d+176)) then
        tmp = t_3
    else if (y <= (-3.4d+136)) then
        tmp = t_2
    else if (y <= (-8d+113)) then
        tmp = t_3
    else if (y <= (-4.9d+82)) then
        tmp = t_1
    else if (y <= (-5.3d+20)) then
        tmp = t * ((a * -4.0d0) - ((-18.0d0) * (y * (x * z))))
    else if (y <= 1.45d-145) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
assert y < z;
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
	double t_2 = (18.0 * (y * (t * (x * z)))) + (-27.0 * (j * k));
	double t_3 = (b * c) - (4.0 * ((x * i) + (t * a)));
	double tmp;
	if (y <= -3.1e+209) {
		tmp = t_2;
	} else if (y <= -3e+176) {
		tmp = t_3;
	} else if (y <= -3.4e+136) {
		tmp = t_2;
	} else if (y <= -8e+113) {
		tmp = t_3;
	} else if (y <= -4.9e+82) {
		tmp = t_1;
	} else if (y <= -5.3e+20) {
		tmp = t * ((a * -4.0) - (-18.0 * (y * (x * z))));
	} else if (y <= 1.45e-145) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)))
	t_2 = (18.0 * (y * (t * (x * z)))) + (-27.0 * (j * k))
	t_3 = (b * c) - (4.0 * ((x * i) + (t * a)))
	tmp = 0
	if y <= -3.1e+209:
		tmp = t_2
	elif y <= -3e+176:
		tmp = t_3
	elif y <= -3.4e+136:
		tmp = t_2
	elif y <= -8e+113:
		tmp = t_3
	elif y <= -4.9e+82:
		tmp = t_1
	elif y <= -5.3e+20:
		tmp = t * ((a * -4.0) - (-18.0 * (y * (x * z))))
	elif y <= 1.45e-145:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
y, z = sort([y, z])
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(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k))))
	t_2 = Float64(Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) + Float64(-27.0 * Float64(j * k)))
	t_3 = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a))))
	tmp = 0.0
	if (y <= -3.1e+209)
		tmp = t_2;
	elseif (y <= -3e+176)
		tmp = t_3;
	elseif (y <= -3.4e+136)
		tmp = t_2;
	elseif (y <= -8e+113)
		tmp = t_3;
	elseif (y <= -4.9e+82)
		tmp = t_1;
	elseif (y <= -5.3e+20)
		tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(-18.0 * Float64(y * Float64(x * z)))));
	elseif (y <= 1.45e-145)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
	t_2 = (18.0 * (y * (t * (x * z)))) + (-27.0 * (j * k));
	t_3 = (b * c) - (4.0 * ((x * i) + (t * a)));
	tmp = 0.0;
	if (y <= -3.1e+209)
		tmp = t_2;
	elseif (y <= -3e+176)
		tmp = t_3;
	elseif (y <= -3.4e+136)
		tmp = t_2;
	elseif (y <= -8e+113)
		tmp = t_3;
	elseif (y <= -4.9e+82)
		tmp = t_1;
	elseif (y <= -5.3e+20)
		tmp = t * ((a * -4.0) - (-18.0 * (y * (x * z))));
	elseif (y <= 1.45e-145)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+209], t$95$2, If[LessEqual[y, -3e+176], t$95$3, If[LessEqual[y, -3.4e+136], t$95$2, If[LessEqual[y, -8e+113], t$95$3, If[LessEqual[y, -4.9e+82], t$95$1, If[LessEqual[y, -5.3e+20], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(-18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-145], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
t_2 := 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\
t_3 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+209}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -3 \cdot 10^{+176}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -3.4 \cdot 10^{+136}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -8 \cdot 10^{+113}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -4.9 \cdot 10^{+82}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-145}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.1000000000000001e209 or -3e176 < y < -3.39999999999999997e136 or 1.44999999999999992e-145 < y

    1. Initial program 81.0%

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

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

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

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

    if -3.1000000000000001e209 < y < -3e176 or -3.39999999999999997e136 < y < -8e113

    1. Initial program 71.4%

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

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

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

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

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

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

    if -8e113 < y < -4.9000000000000001e82 or -5.3e20 < y < 1.44999999999999992e-145

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

    if -4.9000000000000001e82 < y < -5.3e20

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

      \[\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 t around -inf 85.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+209}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -3 \cdot 10^{+176}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{+136}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+113}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;y \leq -4.9 \cdot 10^{+82}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;y \leq -5.3 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - -18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-145}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 6: 43.4% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;j \cdot 27 \leq 5 \cdot 10^{-180}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 j 27) < -3.99999999999999994e213

    1. Initial program 94.9%

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

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

        \[\leadsto \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*95.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-in95.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-def95.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. *-commutative95.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-in95.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-eval95.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-neg95.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. +-commutative95.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*95.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-in95.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. Simplified100.0%

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

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

    if -3.99999999999999994e213 < (*.f64 j 27) < -3.9999999999999999e-266

    1. Initial program 85.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-neg85.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-85.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-neg85.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-neg85.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--88.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*89.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-in89.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-sub89.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*89.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*89.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. Simplified89.8%

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

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

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

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

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

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

    if -3.9999999999999999e-266 < (*.f64 j 27) < 1.00000000000000005e-230

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e-230 < (*.f64 j 27) < 5.0000000000000001e-180

    1. Initial program 93.5%

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

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

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

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

    if 5.0000000000000001e-180 < (*.f64 j 27) < 9.99999999999999989e-96

    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. Simplified80.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. Taylor expanded in a around 0 86.3%

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

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

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

    if 9.99999999999999989e-96 < (*.f64 j 27)

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 63.0% accurate, 1.1× speedup?

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

\mathbf{elif}\;y \leq -1.45 \cdot 10^{+177}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -3.6 \cdot 10^{+136}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3.8 \cdot 10^{-65}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-104}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.9e206 or -1.45000000000000007e177 < y < -3.60000000000000006e136 or 4.19999999999999997e-104 < y

    1. Initial program 79.6%

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

      \[\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 a around 0 80.6%

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

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

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

    if -2.9e206 < y < -1.45000000000000007e177 or -3.60000000000000006e136 < y < -3.8000000000000002e-65 or -1.35e-112 < y < 4.19999999999999997e-104

    1. Initial program 91.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 x around 0 85.9%

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

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

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

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

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

    if -3.8000000000000002e-65 < y < -1.35e-112

    1. Initial program 84.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 x around 0 85.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+206}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{+177}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{+136}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-65}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-112}:\\ \;\;\;\;27 \cdot \left(k \cdot \left(-j\right)\right) - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-104}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 8: 82.6% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7e-34

    1. Initial program 85.7%

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

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

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

    if -7e-34 < z < 4.29999999999999969e103

    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 x around 0 89.7%

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

    if 4.29999999999999969e103 < z

    1. Initial program 75.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. Simplified76.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 a around 0 82.6%

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

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

Alternative 9: 82.7% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.14999999999999997e-100

    1. Initial program 84.0%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--85.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*77.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-in77.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-sub77.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*77.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*77.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. Simplified77.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 a around 0 77.6%

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

    if -1.14999999999999997e-100 < z < 1e108

    1. Initial program 90.2%

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

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

    if 1e108 < z

    1. Initial program 75.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. Simplified76.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 a around 0 82.6%

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

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

Alternative 10: 58.0% accurate, 1.2× speedup?

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

\mathbf{elif}\;x \leq -2.35 \cdot 10^{-160}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.5 \cdot 10^{-18}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 3.2 \cdot 10^{+77}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.00000000000000004e36 or 3.2000000000000002e77 < x

    1. Initial program 75.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-neg75.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-75.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-neg75.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-neg75.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--77.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*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*83.1%

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000004e36 < x < -2.3499999999999999e-160 or 7.6e-255 < x < 1.49999999999999991e-18 or 2.7000000000000001e36 < x < 3.2000000000000002e77

    1. Initial program 95.5%

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

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

      \[\leadsto c \cdot b - \color{blue}{27 \cdot \left(k \cdot j\right)} \]
    6. Step-by-step derivation
      1. *-commutative64.7%

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

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

    if -2.3499999999999999e-160 < x < 7.6e-255

    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 94.0%

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

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

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

    if 1.49999999999999991e-18 < x < 2.7000000000000001e36

    1. Initial program 70.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. Simplified70.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. Taylor expanded in a around 0 69.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -2.35 \cdot 10^{-160}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-255}:\\ \;\;\;\;27 \cdot \left(k \cdot \left(-j\right)\right) - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-18}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+36}:\\ \;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{+77}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \]

Alternative 11: 73.8% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.05e-34 or 1.05000000000000001e83 < x

    1. Initial program 77.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. Simplified91.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. Taylor expanded in a around 0 86.8%

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

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

    if -1.05e-34 < x < 1.50000000000000006e-254

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

    if 1.50000000000000006e-254 < x < 1.05000000000000001e83

    1. Initial program 92.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. Simplified84.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. Taylor expanded in a around 0 76.4%

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

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

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

Alternative 12: 79.4% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.19999999999999996e-34

    1. Initial program 85.7%

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

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

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

    if -1.19999999999999996e-34 < z < 5.8000000000000003e116

    1. Initial program 88.9%

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

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

    if 5.8000000000000003e116 < z

    1. Initial program 75.4%

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

      \[\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 a around 0 82.2%

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

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

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

Alternative 13: 59.6% accurate, 1.3× speedup?

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

\mathbf{elif}\;k \leq 2.5 \cdot 10^{-216}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;k \leq 1.9 \cdot 10^{+84}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if k < -1.6500000000000001e-94 or 3.5e214 < k

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--87.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.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-in86.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-sub86.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*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 t around 0 73.0%

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

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

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

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

    if -1.6500000000000001e-94 < k < 2.5000000000000001e-216 or 1.69999999999999987e-58 < k < 1.9e84

    1. Initial program 88.1%

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

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

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

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

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

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

    if 2.5000000000000001e-216 < k < 1.69999999999999987e-58

    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*73.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-in73.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-sub73.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*73.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*73.3%

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

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

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

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

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

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

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

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

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

    if 1.9e84 < k < 1.9500000000000002e110

    1. Initial program 88.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-neg88.4%

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

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

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

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

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

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

    if 1.9500000000000002e110 < k < 3.5e214

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.65 \cdot 10^{-94}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 2.5 \cdot 10^{-216}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;k \leq 1.7 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;k \leq 1.9 \cdot 10^{+84}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;k \leq 1.95 \cdot 10^{+110}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;k \leq 3.5 \cdot 10^{+214}:\\ \;\;\;\;27 \cdot \left(k \cdot \left(-j\right)\right) - 4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 14: 33.1% accurate, 1.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{if}\;b \leq -4 \cdot 10^{+175}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -1.38 \cdot 10^{+122}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq -1.12 \cdot 10^{-111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-202}:\\ \;\;\;\;\left(j \cdot 27\right) \cdot \left(-k\right)\\ \mathbf{elif}\;b \leq -1.3 \cdot 10^{-272}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-233}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \leq 4.9 \cdot 10^{-164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.8 \cdot 10^{+20}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
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 (* 18.0 (* y (* t (* x z))))))
   (if (<= b -4e+175)
     (* b c)
     (if (<= b -1.38e+122)
       (* -4.0 (* t a))
       (if (<= b -1.12e-111)
         t_1
         (if (<= b -1.25e-202)
           (* (* j 27.0) (- k))
           (if (<= b -1.3e-272)
             (* x (* i -4.0))
             (if (<= b 9e-233)
               (* j (* k -27.0))
               (if (<= b 4.9e-164)
                 t_1
                 (if (<= b 3.8e+20) (* -27.0 (* j k)) (* b c)))))))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = 18.0 * (y * (t * (x * z)));
	double tmp;
	if (b <= -4e+175) {
		tmp = b * c;
	} else if (b <= -1.38e+122) {
		tmp = -4.0 * (t * a);
	} else if (b <= -1.12e-111) {
		tmp = t_1;
	} else if (b <= -1.25e-202) {
		tmp = (j * 27.0) * -k;
	} else if (b <= -1.3e-272) {
		tmp = x * (i * -4.0);
	} else if (b <= 9e-233) {
		tmp = j * (k * -27.0);
	} else if (b <= 4.9e-164) {
		tmp = t_1;
	} else if (b <= 3.8e+20) {
		tmp = -27.0 * (j * k);
	} else {
		tmp = b * c;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = 18.0d0 * (y * (t * (x * z)))
    if (b <= (-4d+175)) then
        tmp = b * c
    else if (b <= (-1.38d+122)) then
        tmp = (-4.0d0) * (t * a)
    else if (b <= (-1.12d-111)) then
        tmp = t_1
    else if (b <= (-1.25d-202)) then
        tmp = (j * 27.0d0) * -k
    else if (b <= (-1.3d-272)) then
        tmp = x * (i * (-4.0d0))
    else if (b <= 9d-233) then
        tmp = j * (k * (-27.0d0))
    else if (b <= 4.9d-164) then
        tmp = t_1
    else if (b <= 3.8d+20) then
        tmp = (-27.0d0) * (j * k)
    else
        tmp = b * c
    end if
    code = tmp
end function
assert y < z;
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 = 18.0 * (y * (t * (x * z)));
	double tmp;
	if (b <= -4e+175) {
		tmp = b * c;
	} else if (b <= -1.38e+122) {
		tmp = -4.0 * (t * a);
	} else if (b <= -1.12e-111) {
		tmp = t_1;
	} else if (b <= -1.25e-202) {
		tmp = (j * 27.0) * -k;
	} else if (b <= -1.3e-272) {
		tmp = x * (i * -4.0);
	} else if (b <= 9e-233) {
		tmp = j * (k * -27.0);
	} else if (b <= 4.9e-164) {
		tmp = t_1;
	} else if (b <= 3.8e+20) {
		tmp = -27.0 * (j * k);
	} else {
		tmp = b * c;
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = 18.0 * (y * (t * (x * z)))
	tmp = 0
	if b <= -4e+175:
		tmp = b * c
	elif b <= -1.38e+122:
		tmp = -4.0 * (t * a)
	elif b <= -1.12e-111:
		tmp = t_1
	elif b <= -1.25e-202:
		tmp = (j * 27.0) * -k
	elif b <= -1.3e-272:
		tmp = x * (i * -4.0)
	elif b <= 9e-233:
		tmp = j * (k * -27.0)
	elif b <= 4.9e-164:
		tmp = t_1
	elif b <= 3.8e+20:
		tmp = -27.0 * (j * k)
	else:
		tmp = b * c
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(18.0 * Float64(y * Float64(t * Float64(x * z))))
	tmp = 0.0
	if (b <= -4e+175)
		tmp = Float64(b * c);
	elseif (b <= -1.38e+122)
		tmp = Float64(-4.0 * Float64(t * a));
	elseif (b <= -1.12e-111)
		tmp = t_1;
	elseif (b <= -1.25e-202)
		tmp = Float64(Float64(j * 27.0) * Float64(-k));
	elseif (b <= -1.3e-272)
		tmp = Float64(x * Float64(i * -4.0));
	elseif (b <= 9e-233)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (b <= 4.9e-164)
		tmp = t_1;
	elseif (b <= 3.8e+20)
		tmp = Float64(-27.0 * Float64(j * k));
	else
		tmp = Float64(b * c);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = 18.0 * (y * (t * (x * z)));
	tmp = 0.0;
	if (b <= -4e+175)
		tmp = b * c;
	elseif (b <= -1.38e+122)
		tmp = -4.0 * (t * a);
	elseif (b <= -1.12e-111)
		tmp = t_1;
	elseif (b <= -1.25e-202)
		tmp = (j * 27.0) * -k;
	elseif (b <= -1.3e-272)
		tmp = x * (i * -4.0);
	elseif (b <= 9e-233)
		tmp = j * (k * -27.0);
	elseif (b <= 4.9e-164)
		tmp = t_1;
	elseif (b <= 3.8e+20)
		tmp = -27.0 * (j * k);
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4e+175], N[(b * c), $MachinePrecision], If[LessEqual[b, -1.38e+122], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.12e-111], t$95$1, If[LessEqual[b, -1.25e-202], N[(N[(j * 27.0), $MachinePrecision] * (-k)), $MachinePrecision], If[LessEqual[b, -1.3e-272], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e-233], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.9e-164], t$95$1, If[LessEqual[b, 3.8e+20], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;b \leq -4 \cdot 10^{+175}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;b \leq -1.12 \cdot 10^{-111}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;b \leq 4.9 \cdot 10^{-164}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if b < -3.9999999999999997e175 or 3.8e20 < b

    1. Initial program 84.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. Simplified87.5%

      \[\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 a around 0 78.4%

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

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

    if -3.9999999999999997e175 < b < -1.37999999999999992e122

    1. Initial program 64.2%

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

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

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

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

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

    if -1.37999999999999992e122 < b < -1.12000000000000009e-111 or 9.0000000000000004e-233 < b < 4.8999999999999996e-164

    1. Initial program 86.7%

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

      \[\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 a around 0 82.7%

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

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

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

    if -1.12000000000000009e-111 < b < -1.24999999999999993e-202

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999993e-202 < b < -1.29999999999999996e-272

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999996e-272 < b < 9.0000000000000004e-233

    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. Step-by-step derivation
      1. sub-neg91.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. +-commutative91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8999999999999996e-164 < b < 3.8e20

    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. Step-by-step derivation
      1. sub-neg92.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. +-commutative92.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*92.1%

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

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

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

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

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

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

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

        \[\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*92.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-in92.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. Simplified89.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{+175}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -1.38 \cdot 10^{+122}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq -1.12 \cdot 10^{-111}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-202}:\\ \;\;\;\;\left(j \cdot 27\right) \cdot \left(-k\right)\\ \mathbf{elif}\;b \leq -1.3 \cdot 10^{-272}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-233}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \leq 4.9 \cdot 10^{-164}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \leq 3.8 \cdot 10^{+20}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 15: 70.7% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;x \leq -6.2 \cdot 10^{-176}:\\
\;\;\;\;4 \cdot \left(t \cdot \left(-a\right) - x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.45e61

    1. Initial program 79.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-neg79.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-79.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-neg79.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-neg79.8%

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

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

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

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

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

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

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

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

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

    if -1.45e61 < x < -4.55000000000000014e-156

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

    if -4.55000000000000014e-156 < x < -6.19999999999999983e-176

    1. Initial program 87.5%

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

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

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

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

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

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

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

    if -6.19999999999999983e-176 < x < 4.4999999999999997e82

    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. Step-by-step derivation
      1. sub-neg92.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-92.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-neg92.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-neg92.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--94.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*85.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-in85.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-sub85.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*85.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*86.0%

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

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

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

    if 4.4999999999999997e82 < x

    1. Initial program 71.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-neg71.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-71.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-neg71.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-neg71.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--73.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*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 x around inf 67.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+61}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -4.55 \cdot 10^{-156}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;x \leq -6.2 \cdot 10^{-176}:\\ \;\;\;\;4 \cdot \left(t \cdot \left(-a\right) - x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+82}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \end{array} \]

Alternative 16: 32.9% accurate, 1.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+175}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{+121}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq -1.5 \cdot 10^{-115}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \leq -1.4 \cdot 10^{-202}:\\ \;\;\;\;\left(j \cdot 27\right) \cdot \left(-k\right)\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-273}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-162}:\\ \;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{+18}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
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 -3.2e+175)
   (* b c)
   (if (<= b -1.6e+121)
     (* -4.0 (* t a))
     (if (<= b -1.5e-115)
       (* 18.0 (* y (* t (* x z))))
       (if (<= b -1.4e-202)
         (* (* j 27.0) (- k))
         (if (<= b -6.6e-273)
           (* x (* i -4.0))
           (if (<= b 7.2e-162)
             (* 18.0 (* (* z t) (* x y)))
             (if (<= b 8.8e+18) (* -27.0 (* j k)) (* b c)))))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (b <= -3.2e+175) {
		tmp = b * c;
	} else if (b <= -1.6e+121) {
		tmp = -4.0 * (t * a);
	} else if (b <= -1.5e-115) {
		tmp = 18.0 * (y * (t * (x * z)));
	} else if (b <= -1.4e-202) {
		tmp = (j * 27.0) * -k;
	} else if (b <= -6.6e-273) {
		tmp = x * (i * -4.0);
	} else if (b <= 7.2e-162) {
		tmp = 18.0 * ((z * t) * (x * y));
	} else if (b <= 8.8e+18) {
		tmp = -27.0 * (j * k);
	} else {
		tmp = b * c;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 <= (-3.2d+175)) then
        tmp = b * c
    else if (b <= (-1.6d+121)) then
        tmp = (-4.0d0) * (t * a)
    else if (b <= (-1.5d-115)) then
        tmp = 18.0d0 * (y * (t * (x * z)))
    else if (b <= (-1.4d-202)) then
        tmp = (j * 27.0d0) * -k
    else if (b <= (-6.6d-273)) then
        tmp = x * (i * (-4.0d0))
    else if (b <= 7.2d-162) then
        tmp = 18.0d0 * ((z * t) * (x * y))
    else if (b <= 8.8d+18) then
        tmp = (-27.0d0) * (j * k)
    else
        tmp = b * c
    end if
    code = tmp
end function
assert y < z;
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 <= -3.2e+175) {
		tmp = b * c;
	} else if (b <= -1.6e+121) {
		tmp = -4.0 * (t * a);
	} else if (b <= -1.5e-115) {
		tmp = 18.0 * (y * (t * (x * z)));
	} else if (b <= -1.4e-202) {
		tmp = (j * 27.0) * -k;
	} else if (b <= -6.6e-273) {
		tmp = x * (i * -4.0);
	} else if (b <= 7.2e-162) {
		tmp = 18.0 * ((z * t) * (x * y));
	} else if (b <= 8.8e+18) {
		tmp = -27.0 * (j * k);
	} else {
		tmp = b * c;
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if b <= -3.2e+175:
		tmp = b * c
	elif b <= -1.6e+121:
		tmp = -4.0 * (t * a)
	elif b <= -1.5e-115:
		tmp = 18.0 * (y * (t * (x * z)))
	elif b <= -1.4e-202:
		tmp = (j * 27.0) * -k
	elif b <= -6.6e-273:
		tmp = x * (i * -4.0)
	elif b <= 7.2e-162:
		tmp = 18.0 * ((z * t) * (x * y))
	elif b <= 8.8e+18:
		tmp = -27.0 * (j * k)
	else:
		tmp = b * c
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (b <= -3.2e+175)
		tmp = Float64(b * c);
	elseif (b <= -1.6e+121)
		tmp = Float64(-4.0 * Float64(t * a));
	elseif (b <= -1.5e-115)
		tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z))));
	elseif (b <= -1.4e-202)
		tmp = Float64(Float64(j * 27.0) * Float64(-k));
	elseif (b <= -6.6e-273)
		tmp = Float64(x * Float64(i * -4.0));
	elseif (b <= 7.2e-162)
		tmp = Float64(18.0 * Float64(Float64(z * t) * Float64(x * y)));
	elseif (b <= 8.8e+18)
		tmp = Float64(-27.0 * Float64(j * k));
	else
		tmp = Float64(b * c);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
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 <= -3.2e+175)
		tmp = b * c;
	elseif (b <= -1.6e+121)
		tmp = -4.0 * (t * a);
	elseif (b <= -1.5e-115)
		tmp = 18.0 * (y * (t * (x * z)));
	elseif (b <= -1.4e-202)
		tmp = (j * 27.0) * -k;
	elseif (b <= -6.6e-273)
		tmp = x * (i * -4.0);
	elseif (b <= 7.2e-162)
		tmp = 18.0 * ((z * t) * (x * y));
	elseif (b <= 8.8e+18)
		tmp = -27.0 * (j * k);
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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, -3.2e+175], N[(b * c), $MachinePrecision], If[LessEqual[b, -1.6e+121], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.5e-115], N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.4e-202], N[(N[(j * 27.0), $MachinePrecision] * (-k)), $MachinePrecision], If[LessEqual[b, -6.6e-273], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e-162], N[(18.0 * N[(N[(z * t), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.8e+18], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.2 \cdot 10^{+175}:\\
\;\;\;\;b \cdot c\\

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if b < -3.20000000000000022e175 or 8.8e18 < b

    1. Initial program 84.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. Simplified87.7%

      \[\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 a around 0 77.5%

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

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

    if -3.20000000000000022e175 < b < -1.6e121

    1. Initial program 64.2%

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

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

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

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

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

    if -1.6e121 < b < -1.5000000000000001e-115

    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. Simplified79.7%

      \[\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 a around 0 80.2%

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

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

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

    if -1.5000000000000001e-115 < b < -1.4000000000000001e-202

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e-202 < b < -6.5999999999999998e-273

    1. Initial program 93.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-neg93.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-93.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-neg93.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-neg93.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--93.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*86.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-in86.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-sub86.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*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*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 x around inf 48.6%

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

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

    if -6.5999999999999998e-273 < b < 7.1999999999999996e-162

    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. Simplified93.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. Taylor expanded in a around 0 84.7%

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

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

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

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

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

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

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

    if 7.1999999999999996e-162 < b < 8.8e18

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+175}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{+121}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq -1.5 \cdot 10^{-115}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \leq -1.4 \cdot 10^{-202}:\\ \;\;\;\;\left(j \cdot 27\right) \cdot \left(-k\right)\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-273}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-162}:\\ \;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{+18}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 17: 43.9% accurate, 1.5× speedup?

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

\mathbf{elif}\;y \leq -2.35 \cdot 10^{+176}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -5.8 \cdot 10^{+135}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-65}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -2.55 \cdot 10^{-135}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-145}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.29999999999999992e206

    1. Initial program 80.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. Simplified65.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. Taylor expanded in a around 0 73.2%

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

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

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

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

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

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

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

    if -5.29999999999999992e206 < y < -2.34999999999999991e176 or -5.7999999999999997e135 < y < -5.20000000000000019e-65 or -2.5500000000000001e-135 < y < 1.44999999999999992e-145

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

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

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

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

    if -2.34999999999999991e176 < y < -5.7999999999999997e135 or -5.20000000000000019e-65 < y < -2.5500000000000001e-135

    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. Step-by-step derivation
      1. sub-neg89.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. +-commutative89.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*89.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-in89.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-def89.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. *-commutative89.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-in89.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-eval89.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-neg89.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. +-commutative89.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*89.2%

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

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

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

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

    if 1.44999999999999992e-145 < y

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

      \[\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 a around 0 80.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.3 \cdot 10^{+206}:\\ \;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;y \leq -2.35 \cdot 10^{+176}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+135}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-65}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;y \leq -2.55 \cdot 10^{-135}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-145}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 18: 49.6% accurate, 1.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;b \leq -7.7 \cdot 10^{+177}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;b \leq -1.06 \cdot 10^{+126}:\\ \;\;\;\;27 \cdot \left(k \cdot \left(-j\right)\right) - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-164}:\\ \;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* -27.0 (* j k)) (* -4.0 (* x i)))))
   (if (<= b -7.7e+177)
     (- (* b c) (* (* x 4.0) i))
     (if (<= b -1.06e+126)
       (- (* 27.0 (* k (- j))) (* 4.0 (* t a)))
       (if (<= b 2e-220)
         t_1
         (if (<= b 4.2e-164)
           (* 18.0 (* (* z t) (* x y)))
           (if (<= b 3.2e+15) t_1 (- (* b c) (* 27.0 (* j k))))))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (-27.0 * (j * k)) + (-4.0 * (x * i));
	double tmp;
	if (b <= -7.7e+177) {
		tmp = (b * c) - ((x * 4.0) * i);
	} else if (b <= -1.06e+126) {
		tmp = (27.0 * (k * -j)) - (4.0 * (t * a));
	} else if (b <= 2e-220) {
		tmp = t_1;
	} else if (b <= 4.2e-164) {
		tmp = 18.0 * ((z * t) * (x * y));
	} else if (b <= 3.2e+15) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = ((-27.0d0) * (j * k)) + ((-4.0d0) * (x * i))
    if (b <= (-7.7d+177)) then
        tmp = (b * c) - ((x * 4.0d0) * i)
    else if (b <= (-1.06d+126)) then
        tmp = (27.0d0 * (k * -j)) - (4.0d0 * (t * a))
    else if (b <= 2d-220) then
        tmp = t_1
    else if (b <= 4.2d-164) then
        tmp = 18.0d0 * ((z * t) * (x * y))
    else if (b <= 3.2d+15) then
        tmp = t_1
    else
        tmp = (b * c) - (27.0d0 * (j * k))
    end if
    code = tmp
end function
assert y < z;
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (-27.0 * (j * k)) + (-4.0 * (x * i));
	double tmp;
	if (b <= -7.7e+177) {
		tmp = (b * c) - ((x * 4.0) * i);
	} else if (b <= -1.06e+126) {
		tmp = (27.0 * (k * -j)) - (4.0 * (t * a));
	} else if (b <= 2e-220) {
		tmp = t_1;
	} else if (b <= 4.2e-164) {
		tmp = 18.0 * ((z * t) * (x * y));
	} else if (b <= 3.2e+15) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (-27.0 * (j * k)) + (-4.0 * (x * i))
	tmp = 0
	if b <= -7.7e+177:
		tmp = (b * c) - ((x * 4.0) * i)
	elif b <= -1.06e+126:
		tmp = (27.0 * (k * -j)) - (4.0 * (t * a))
	elif b <= 2e-220:
		tmp = t_1
	elif b <= 4.2e-164:
		tmp = 18.0 * ((z * t) * (x * y))
	elif b <= 3.2e+15:
		tmp = t_1
	else:
		tmp = (b * c) - (27.0 * (j * k))
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(-27.0 * Float64(j * k)) + Float64(-4.0 * Float64(x * i)))
	tmp = 0.0
	if (b <= -7.7e+177)
		tmp = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i));
	elseif (b <= -1.06e+126)
		tmp = Float64(Float64(27.0 * Float64(k * Float64(-j))) - Float64(4.0 * Float64(t * a)));
	elseif (b <= 2e-220)
		tmp = t_1;
	elseif (b <= 4.2e-164)
		tmp = Float64(18.0 * Float64(Float64(z * t) * Float64(x * y)));
	elseif (b <= 3.2e+15)
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (-27.0 * (j * k)) + (-4.0 * (x * i));
	tmp = 0.0;
	if (b <= -7.7e+177)
		tmp = (b * c) - ((x * 4.0) * i);
	elseif (b <= -1.06e+126)
		tmp = (27.0 * (k * -j)) - (4.0 * (t * a));
	elseif (b <= 2e-220)
		tmp = t_1;
	elseif (b <= 4.2e-164)
		tmp = 18.0 * ((z * t) * (x * y));
	elseif (b <= 3.2e+15)
		tmp = t_1;
	else
		tmp = (b * c) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.7e+177], N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.06e+126], N[(N[(27.0 * N[(k * (-j)), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e-220], t$95$1, If[LessEqual[b, 4.2e-164], N[(18.0 * N[(N[(z * t), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.2e+15], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \leq -7.7 \cdot 10^{+177}:\\
\;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\

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

\mathbf{elif}\;b \leq 2 \cdot 10^{-220}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 3.2 \cdot 10^{+15}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -7.6999999999999997e177

    1. Initial program 82.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-neg82.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-82.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-neg82.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-neg82.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--82.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*82.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-in82.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-sub82.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*82.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*82.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. Simplified82.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 t around 0 65.2%

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

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

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

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

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

    if -7.6999999999999997e177 < b < -1.0600000000000001e126

    1. Initial program 70.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 x around 0 80.5%

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

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

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

    if -1.0600000000000001e126 < b < 1.99999999999999998e-220 or 4.1999999999999998e-164 < b < 3.2e15

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

    if 1.99999999999999998e-220 < b < 4.1999999999999998e-164

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

    if 3.2e15 < b

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

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

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

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

      \[\leadsto c \cdot b - \color{blue}{27 \cdot \left(k \cdot j\right)} \]
    6. Step-by-step derivation
      1. *-commutative60.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.7 \cdot 10^{+177}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;b \leq -1.06 \cdot 10^{+126}:\\ \;\;\;\;27 \cdot \left(k \cdot \left(-j\right)\right) - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-220}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-164}:\\ \;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{+15}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 19: 58.9% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq -1.4 \cdot 10^{-160}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 4.8 \cdot 10^{-25}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.9000000000000001e34 or 4.80000000000000018e-25 < 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.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-in83.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-sub83.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*83.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*83.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. Simplified83.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 x around inf 69.7%

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

    if -2.9000000000000001e34 < x < -1.40000000000000008e-160 or 2.70000000000000016e-255 < x < 4.80000000000000018e-25

    1. Initial program 95.3%

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

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

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

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

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

      \[\leadsto c \cdot b - \color{blue}{27 \cdot \left(k \cdot j\right)} \]
    6. Step-by-step derivation
      1. *-commutative62.7%

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

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

    if -1.40000000000000008e-160 < x < 2.70000000000000016e-255

    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 94.0%

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

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

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

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

Alternative 20: 75.3% accurate, 1.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.0000000000000003e-36 or 8.49999999999999992e76 < x

    1. Initial program 77.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. Simplified91.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. Taylor expanded in a around 0 86.8%

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

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

    if -6.0000000000000003e-36 < x < 8.49999999999999992e76

    1. Initial program 93.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-neg93.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-93.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-neg93.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-neg93.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--94.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.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-in86.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-sub86.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*86.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*86.6%

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

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

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

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

Alternative 21: 72.4% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.2000000000000002e61

    1. Initial program 79.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-neg79.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-79.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-neg79.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-neg79.8%

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

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

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

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

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

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

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

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

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

    if -4.2000000000000002e61 < x < 1.65e78

    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. Step-by-step derivation
      1. sub-neg92.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-92.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-neg92.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-neg92.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--94.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*87.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-in87.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-sub87.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*87.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*87.3%

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

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

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

    if 1.65e78 < x

    1. Initial program 71.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-neg71.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-71.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-neg71.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-neg71.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--73.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*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 x around inf 67.3%

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

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

Alternative 22: 31.9% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;b \leq -3.3 \cdot 10^{-53}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -3.2 \cdot 10^{-202}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -7 \cdot 10^{-273}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 5.8 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.9999999999999997e175 or 5.8e17 < b

    1. Initial program 84.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. Simplified87.7%

      \[\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 a around 0 77.5%

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

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

    if -3.9999999999999997e175 < b < -3.70000000000000013e121

    1. Initial program 64.2%

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

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

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

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

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

    if -3.70000000000000013e121 < b < -3.30000000000000004e-53 or -3.2000000000000001e-202 < b < -6.99999999999999984e-273

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

    if -3.30000000000000004e-53 < b < -3.2000000000000001e-202 or -6.99999999999999984e-273 < b < 5.8e17

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{+175}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -3.7 \cdot 10^{+121}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \leq -3.2 \cdot 10^{-202}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-273}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{+17}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 23: 31.9% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;b \leq -3.3 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq -6.5 \cdot 10^{-273}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.20000000000000022e175 or 1.45e19 < b

    1. Initial program 84.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. Simplified87.7%

      \[\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 a around 0 77.5%

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

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

    if -3.20000000000000022e175 < b < -1.02000000000000005e121

    1. Initial program 64.2%

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

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

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

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

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

    if -1.02000000000000005e121 < b < -3.30000000000000004e-53 or -3.40000000000000012e-202 < b < -6.49999999999999979e-273

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

    if -3.30000000000000004e-53 < b < -3.40000000000000012e-202

    1. Initial program 75.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 x around 0 79.4%

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

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

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

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

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

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

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

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

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

    if -6.49999999999999979e-273 < b < 1.45e19

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+175}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -1.02 \cdot 10^{+121}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \leq -3.4 \cdot 10^{-202}:\\ \;\;\;\;\left(j \cdot 27\right) \cdot \left(-k\right)\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-273}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{+19}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 24: 50.9% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -4.9999999999999997e-37

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e-37 < c < 3.40000000000000007e78

    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. +-commutative87.9%

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

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

        \[\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-def87.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. *-commutative87.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-in87.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-eval87.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-neg87.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. +-commutative87.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*87.9%

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

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

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

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

    if 3.40000000000000007e78 < c

    1. Initial program 84.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 80.7%

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

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

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

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

Alternative 25: 32.5% accurate, 2.3× speedup?

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

\mathbf{elif}\;b \leq -6.2 \cdot 10^{-209}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 2.45 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.54999999999999996e178 or 2.45e19 < b

    1. Initial program 84.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. Simplified87.7%

      \[\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 a around 0 77.5%

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

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

    if -1.54999999999999996e178 < b < -6.2e-209 or -2.2e-289 < b < 2.45e19

    1. Initial program 85.7%

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

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

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

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

        \[\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-def85.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. *-commutative85.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-in85.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-eval85.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-neg85.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. +-commutative85.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*85.7%

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

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

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

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

    if -6.2e-209 < b < -2.2e-289

    1. Initial program 93.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 x around 0 87.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.55 \cdot 10^{+178}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \leq -6.2 \cdot 10^{-209}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{-289}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \leq 2.45 \cdot 10^{+19}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 26: 32.6% accurate, 3.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -6.4 \cdot 10^{+176} \lor \neg \left(b \leq 6.3 \cdot 10^{+15}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= b -6.4e+176) (not (<= b 6.3e+15))) (* b c) (* -27.0 (* j k))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((b <= -6.4e+176) || !(b <= 6.3e+15)) {
		tmp = b * c;
	} else {
		tmp = -27.0 * (j * k);
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 <= (-6.4d+176)) .or. (.not. (b <= 6.3d+15))) then
        tmp = b * c
    else
        tmp = (-27.0d0) * (j * k)
    end if
    code = tmp
end function
assert y < z;
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 <= -6.4e+176) || !(b <= 6.3e+15)) {
		tmp = b * c;
	} else {
		tmp = -27.0 * (j * k);
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (b <= -6.4e+176) or not (b <= 6.3e+15):
		tmp = b * c
	else:
		tmp = -27.0 * (j * k)
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((b <= -6.4e+176) || !(b <= 6.3e+15))
		tmp = Float64(b * c);
	else
		tmp = Float64(-27.0 * Float64(j * k));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
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 <= -6.4e+176) || ~((b <= 6.3e+15)))
		tmp = b * c;
	else
		tmp = -27.0 * (j * k);
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[b, -6.4e+176], N[Not[LessEqual[b, 6.3e+15]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.4 \cdot 10^{+176} \lor \neg \left(b \leq 6.3 \cdot 10^{+15}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.3999999999999996e176 or 6.3e15 < b

    1. Initial program 84.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. Simplified87.7%

      \[\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 a around 0 77.5%

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

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

    if -6.3999999999999996e176 < b < 6.3e15

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 27: 24.2% accurate, 10.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ b \cdot c \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
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(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return b * c;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 y < z;
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;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	return b * c
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(b * c)
end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = b * c;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
b \cdot c
\end{array}
Derivation
  1. Initial program 85.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. Simplified88.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 a around 0 78.6%

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

    \[\leadsto \color{blue}{c \cdot b} \]
  5. Final simplification23.9%

    \[\leadsto b \cdot c \]

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