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

Percentage Accurate: 85.8% → 92.4%
Time: 26.7s
Alternatives: 21
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 21 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.4% 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 97.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 \]

    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--18.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*22.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-in22.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-sub22.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*22.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*22.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. Simplified22.2%

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

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

    \[\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 2: 58.0% accurate, 0.9× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right) + k \cdot \left(j \cdot -27\right)\\ t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ t_3 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\ t_4 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{if}\;x \leq -1.45 \cdot 10^{+45}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq -2 \cdot 10^{+18}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-11}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-247}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-279}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-163}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-40}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 5.7 \cdot 10^{+82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+114}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \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 (+ (* t (* a -4.0)) (* k (* j -27.0))))
        (t_2 (* -4.0 (+ (* x i) (* t a))))
        (t_3 (- (* b c) (* 27.0 (* j k))))
        (t_4 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))))
   (if (<= x -1.45e+45)
     t_4
     (if (<= x -2e+18)
       t_3
       (if (<= x -7e-11)
         t_2
         (if (<= x -1.45e-119)
           t_1
           (if (<= x -3.3e-247)
             t_3
             (if (<= x 2e-279)
               t_1
               (if (<= x 3.4e-163)
                 (- (* b c) (* 4.0 (* t a)))
                 (if (<= x 4.4e-40)
                   t_3
                   (if (<= x 5.7e+82)
                     t_2
                     (if (<= x 2.8e+114) t_3 t_4))))))))))))
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 = (t * (a * -4.0)) + (k * (j * -27.0));
	double t_2 = -4.0 * ((x * i) + (t * a));
	double t_3 = (b * c) - (27.0 * (j * k));
	double t_4 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	double tmp;
	if (x <= -1.45e+45) {
		tmp = t_4;
	} else if (x <= -2e+18) {
		tmp = t_3;
	} else if (x <= -7e-11) {
		tmp = t_2;
	} else if (x <= -1.45e-119) {
		tmp = t_1;
	} else if (x <= -3.3e-247) {
		tmp = t_3;
	} else if (x <= 2e-279) {
		tmp = t_1;
	} else if (x <= 3.4e-163) {
		tmp = (b * c) - (4.0 * (t * a));
	} else if (x <= 4.4e-40) {
		tmp = t_3;
	} else if (x <= 5.7e+82) {
		tmp = t_2;
	} else if (x <= 2.8e+114) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	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) :: t_4
    real(8) :: tmp
    t_1 = (t * (a * (-4.0d0))) + (k * (j * (-27.0d0)))
    t_2 = (-4.0d0) * ((x * i) + (t * a))
    t_3 = (b * c) - (27.0d0 * (j * k))
    t_4 = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
    if (x <= (-1.45d+45)) then
        tmp = t_4
    else if (x <= (-2d+18)) then
        tmp = t_3
    else if (x <= (-7d-11)) then
        tmp = t_2
    else if (x <= (-1.45d-119)) then
        tmp = t_1
    else if (x <= (-3.3d-247)) then
        tmp = t_3
    else if (x <= 2d-279) then
        tmp = t_1
    else if (x <= 3.4d-163) then
        tmp = (b * c) - (4.0d0 * (t * a))
    else if (x <= 4.4d-40) then
        tmp = t_3
    else if (x <= 5.7d+82) then
        tmp = t_2
    else if (x <= 2.8d+114) then
        tmp = t_3
    else
        tmp = t_4
    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 = (t * (a * -4.0)) + (k * (j * -27.0));
	double t_2 = -4.0 * ((x * i) + (t * a));
	double t_3 = (b * c) - (27.0 * (j * k));
	double t_4 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	double tmp;
	if (x <= -1.45e+45) {
		tmp = t_4;
	} else if (x <= -2e+18) {
		tmp = t_3;
	} else if (x <= -7e-11) {
		tmp = t_2;
	} else if (x <= -1.45e-119) {
		tmp = t_1;
	} else if (x <= -3.3e-247) {
		tmp = t_3;
	} else if (x <= 2e-279) {
		tmp = t_1;
	} else if (x <= 3.4e-163) {
		tmp = (b * c) - (4.0 * (t * a));
	} else if (x <= 4.4e-40) {
		tmp = t_3;
	} else if (x <= 5.7e+82) {
		tmp = t_2;
	} else if (x <= 2.8e+114) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	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 = (t * (a * -4.0)) + (k * (j * -27.0))
	t_2 = -4.0 * ((x * i) + (t * a))
	t_3 = (b * c) - (27.0 * (j * k))
	t_4 = x * ((18.0 * (y * (z * t))) - (4.0 * i))
	tmp = 0
	if x <= -1.45e+45:
		tmp = t_4
	elif x <= -2e+18:
		tmp = t_3
	elif x <= -7e-11:
		tmp = t_2
	elif x <= -1.45e-119:
		tmp = t_1
	elif x <= -3.3e-247:
		tmp = t_3
	elif x <= 2e-279:
		tmp = t_1
	elif x <= 3.4e-163:
		tmp = (b * c) - (4.0 * (t * a))
	elif x <= 4.4e-40:
		tmp = t_3
	elif x <= 5.7e+82:
		tmp = t_2
	elif x <= 2.8e+114:
		tmp = t_3
	else:
		tmp = t_4
	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(t * Float64(a * -4.0)) + Float64(k * Float64(j * -27.0)))
	t_2 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)))
	t_3 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)))
	t_4 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)))
	tmp = 0.0
	if (x <= -1.45e+45)
		tmp = t_4;
	elseif (x <= -2e+18)
		tmp = t_3;
	elseif (x <= -7e-11)
		tmp = t_2;
	elseif (x <= -1.45e-119)
		tmp = t_1;
	elseif (x <= -3.3e-247)
		tmp = t_3;
	elseif (x <= 2e-279)
		tmp = t_1;
	elseif (x <= 3.4e-163)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a)));
	elseif (x <= 4.4e-40)
		tmp = t_3;
	elseif (x <= 5.7e+82)
		tmp = t_2;
	elseif (x <= 2.8e+114)
		tmp = t_3;
	else
		tmp = t_4;
	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 = (t * (a * -4.0)) + (k * (j * -27.0));
	t_2 = -4.0 * ((x * i) + (t * a));
	t_3 = (b * c) - (27.0 * (j * k));
	t_4 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	tmp = 0.0;
	if (x <= -1.45e+45)
		tmp = t_4;
	elseif (x <= -2e+18)
		tmp = t_3;
	elseif (x <= -7e-11)
		tmp = t_2;
	elseif (x <= -1.45e-119)
		tmp = t_1;
	elseif (x <= -3.3e-247)
		tmp = t_3;
	elseif (x <= 2e-279)
		tmp = t_1;
	elseif (x <= 3.4e-163)
		tmp = (b * c) - (4.0 * (t * a));
	elseif (x <= 4.4e-40)
		tmp = t_3;
	elseif (x <= 5.7e+82)
		tmp = t_2;
	elseif (x <= 2.8e+114)
		tmp = t_3;
	else
		tmp = t_4;
	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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e+45], t$95$4, If[LessEqual[x, -2e+18], t$95$3, If[LessEqual[x, -7e-11], t$95$2, If[LessEqual[x, -1.45e-119], t$95$1, If[LessEqual[x, -3.3e-247], t$95$3, If[LessEqual[x, 2e-279], t$95$1, If[LessEqual[x, 3.4e-163], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e-40], t$95$3, If[LessEqual[x, 5.7e+82], t$95$2, If[LessEqual[x, 2.8e+114], t$95$3, t$95$4]]]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right) + k \cdot \left(j \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_3 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_4 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+45}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x \leq -2 \cdot 10^{+18}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq -7 \cdot 10^{-11}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.45 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -3.3 \cdot 10^{-247}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 2 \cdot 10^{-279}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 4.4 \cdot 10^{-40}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 5.7 \cdot 10^{+82}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 2.8 \cdot 10^{+114}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.4499999999999999e45 or 2.8e114 < x

    1. Initial program 73.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-neg73.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-73.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-neg73.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-neg73.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--77.8%

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

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

    if -1.4499999999999999e45 < x < -2e18 or -1.45e-119 < x < -3.29999999999999971e-247 or 3.40000000000000014e-163 < x < 4.40000000000000018e-40 or 5.70000000000000016e82 < x < 2.8e114

    1. Initial program 98.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 83.7%

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

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

    if -2e18 < x < -7.00000000000000038e-11 or 4.40000000000000018e-40 < x < 5.70000000000000016e82

    1. Initial program 92.3%

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

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*92.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-in92.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-sub92.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. fma-def96.2%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} - i \cdot \left(x \cdot 4\right) \]
    11. Simplified77.4%

      \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} - i \cdot \left(x \cdot 4\right) \]
    12. Taylor expanded in a around 0 77.4%

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

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

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

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

    if -7.00000000000000038e-11 < x < -1.45e-119 or -3.29999999999999971e-247 < x < 2.00000000000000011e-279

    1. Initial program 92.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(k \cdot j\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt-in82.9%

        \[\leadsto \color{blue}{\left(4 \cdot \left(a \cdot t\right)\right) \cdot -1 + \left(27 \cdot \left(k \cdot j\right)\right) \cdot -1} \]
      2. *-commutative82.9%

        \[\leadsto \left(4 \cdot \color{blue}{\left(t \cdot a\right)}\right) \cdot -1 + \left(27 \cdot \left(k \cdot j\right)\right) \cdot -1 \]
      3. *-commutative82.9%

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

        \[\leadsto \color{blue}{\left(-1 \cdot 4\right) \cdot \left(t \cdot a\right)} + \left(27 \cdot \left(k \cdot j\right)\right) \cdot -1 \]
      5. metadata-eval82.9%

        \[\leadsto \color{blue}{-4} \cdot \left(t \cdot a\right) + \left(27 \cdot \left(k \cdot j\right)\right) \cdot -1 \]
      6. *-commutative82.9%

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

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + \left(27 \cdot \left(k \cdot j\right)\right) \cdot -1 \]
      8. *-commutative82.9%

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

        \[\leadsto \left(-4 \cdot a\right) \cdot t + \color{blue}{\left(\left(j \cdot k\right) \cdot 27\right)} \cdot -1 \]
      10. associate-*l*82.9%

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

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

        \[\leadsto \left(-4 \cdot a\right) \cdot t + \color{blue}{\left(k \cdot j\right)} \cdot -27 \]
      13. associate-*r*82.9%

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

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

    if 2.00000000000000011e-279 < x < 3.40000000000000014e-163

    1. Initial program 95.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -2 \cdot 10^{+18}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-11}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-119}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-247}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-279}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-163}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-40}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 5.7 \cdot 10^{+82}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+114}:\\ \;\;\;\;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 3: 87.8% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < 5.0000000000000003e298

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

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

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

    if 5.0000000000000003e298 < (*.f64 b c)

    1. Initial program 60.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-neg60.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-60.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-neg60.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-neg60.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--60.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*53.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-in53.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-sub53.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*53.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*53.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. Simplified53.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. Step-by-step derivation
      1. fma-def66.7%

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

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

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

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

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

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

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

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

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

Alternative 4: 58.7% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\ t_3 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -6.3 \cdot 10^{+91}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{+36}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -0.00037:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-254}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \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 (+ (* j (* k -27.0)) (* -4.0 (* x i))))
        (t_2 (- (* b c) (* 27.0 (* j k))))
        (t_3 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
   (if (<= t -6.3e+91)
     t_3
     (if (<= t -3.6e+36)
       t_2
       (if (<= t -0.00037)
         t_3
         (if (<= t -2.3e-156)
           t_1
           (if (<= t -9.5e-254)
             t_2
             (if (<= t 3.3e-134)
               t_1
               (if (<= t 8e-97) t_2 (if (<= t 1.4e+38) t_1 t_3))))))))))
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 = (j * (k * -27.0)) + (-4.0 * (x * i));
	double t_2 = (b * c) - (27.0 * (j * k));
	double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	double tmp;
	if (t <= -6.3e+91) {
		tmp = t_3;
	} else if (t <= -3.6e+36) {
		tmp = t_2;
	} else if (t <= -0.00037) {
		tmp = t_3;
	} else if (t <= -2.3e-156) {
		tmp = t_1;
	} else if (t <= -9.5e-254) {
		tmp = t_2;
	} else if (t <= 3.3e-134) {
		tmp = t_1;
	} else if (t <= 8e-97) {
		tmp = t_2;
	} else if (t <= 1.4e+38) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	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 = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
    t_2 = (b * c) - (27.0d0 * (j * k))
    t_3 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
    if (t <= (-6.3d+91)) then
        tmp = t_3
    else if (t <= (-3.6d+36)) then
        tmp = t_2
    else if (t <= (-0.00037d0)) then
        tmp = t_3
    else if (t <= (-2.3d-156)) then
        tmp = t_1
    else if (t <= (-9.5d-254)) then
        tmp = t_2
    else if (t <= 3.3d-134) then
        tmp = t_1
    else if (t <= 8d-97) then
        tmp = t_2
    else if (t <= 1.4d+38) then
        tmp = t_1
    else
        tmp = t_3
    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 = (j * (k * -27.0)) + (-4.0 * (x * i));
	double t_2 = (b * c) - (27.0 * (j * k));
	double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	double tmp;
	if (t <= -6.3e+91) {
		tmp = t_3;
	} else if (t <= -3.6e+36) {
		tmp = t_2;
	} else if (t <= -0.00037) {
		tmp = t_3;
	} else if (t <= -2.3e-156) {
		tmp = t_1;
	} else if (t <= -9.5e-254) {
		tmp = t_2;
	} else if (t <= 3.3e-134) {
		tmp = t_1;
	} else if (t <= 8e-97) {
		tmp = t_2;
	} else if (t <= 1.4e+38) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	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 = (j * (k * -27.0)) + (-4.0 * (x * i))
	t_2 = (b * c) - (27.0 * (j * k))
	t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0))
	tmp = 0
	if t <= -6.3e+91:
		tmp = t_3
	elif t <= -3.6e+36:
		tmp = t_2
	elif t <= -0.00037:
		tmp = t_3
	elif t <= -2.3e-156:
		tmp = t_1
	elif t <= -9.5e-254:
		tmp = t_2
	elif t <= 3.3e-134:
		tmp = t_1
	elif t <= 8e-97:
		tmp = t_2
	elif t <= 1.4e+38:
		tmp = t_1
	else:
		tmp = t_3
	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(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i)))
	t_2 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)))
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -6.3e+91)
		tmp = t_3;
	elseif (t <= -3.6e+36)
		tmp = t_2;
	elseif (t <= -0.00037)
		tmp = t_3;
	elseif (t <= -2.3e-156)
		tmp = t_1;
	elseif (t <= -9.5e-254)
		tmp = t_2;
	elseif (t <= 3.3e-134)
		tmp = t_1;
	elseif (t <= 8e-97)
		tmp = t_2;
	elseif (t <= 1.4e+38)
		tmp = t_1;
	else
		tmp = t_3;
	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 = (j * (k * -27.0)) + (-4.0 * (x * i));
	t_2 = (b * c) - (27.0 * (j * k));
	t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -6.3e+91)
		tmp = t_3;
	elseif (t <= -3.6e+36)
		tmp = t_2;
	elseif (t <= -0.00037)
		tmp = t_3;
	elseif (t <= -2.3e-156)
		tmp = t_1;
	elseif (t <= -9.5e-254)
		tmp = t_2;
	elseif (t <= 3.3e-134)
		tmp = t_1;
	elseif (t <= 8e-97)
		tmp = t_2;
	elseif (t <= 1.4e+38)
		tmp = t_1;
	else
		tmp = t_3;
	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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.3e+91], t$95$3, If[LessEqual[t, -3.6e+36], t$95$2, If[LessEqual[t, -0.00037], t$95$3, If[LessEqual[t, -2.3e-156], t$95$1, If[LessEqual[t, -9.5e-254], t$95$2, If[LessEqual[t, 3.3e-134], t$95$1, If[LessEqual[t, 8e-97], t$95$2, If[LessEqual[t, 1.4e+38], t$95$1, t$95$3]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_3 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -6.3 \cdot 10^{+91}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t \leq -0.00037:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -2.3 \cdot 10^{-156}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -9.5 \cdot 10^{-254}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-134}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 8 \cdot 10^{-97}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.3e91 or -3.5999999999999997e36 < t < -3.6999999999999999e-4 or 1.4e38 < t

    1. Initial program 82.6%

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

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

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

    if -6.3e91 < t < -3.5999999999999997e36 or -2.3e-156 < t < -9.5000000000000003e-254 or 3.30000000000000019e-134 < t < 8.00000000000000029e-97

    1. Initial program 91.0%

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

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

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

    if -3.6999999999999999e-4 < t < -2.3e-156 or -9.5000000000000003e-254 < t < 3.30000000000000019e-134 or 8.00000000000000029e-97 < t < 1.4e38

    1. Initial program 89.8%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. +-commutative89.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*89.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-in89.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-def91.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. *-commutative91.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-in91.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-eval91.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-neg91.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. +-commutative91.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*91.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-in91.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. Simplified90.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 i around inf 65.7%

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

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, -4 \cdot \color{blue}{\left(x \cdot i\right)}\right) \]
    6. Simplified65.7%

      \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{-4 \cdot \left(x \cdot i\right)}\right) \]
    7. Step-by-step derivation
      1. fma-udef64.7%

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)} \]
    8. Applied egg-rr64.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.3 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{+36}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq -0.00037:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-156}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-254}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-134}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-97}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+38}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 5: 80.8% 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 + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{if}\;x \leq -3 \cdot 10^{+180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+79}:\\ \;\;\;\;\left(z \cdot \left(x \cdot t\right)\right) \cdot \left(18 \cdot y\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+49} \lor \neg \left(x \leq 1.6 \cdot 10^{+62}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \end{array} \]
NOTE: 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 -3e+180)
     t_1
     (if (<= x -1.4e+79)
       (- (* (* z (* x t)) (* 18.0 y)) (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
       (if (or (<= x -1.9e+49) (not (<= x 1.6e+62)))
         t_1
         (-
          (- (* b c) (+ (* 4.0 (* x i)) (* 4.0 (* t a))))
          (* (* 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 t_1 = (b * c) + (x * ((18.0 * (y * (z * t))) + (i * -4.0)));
	double tmp;
	if (x <= -3e+180) {
		tmp = t_1;
	} else if (x <= -1.4e+79) {
		tmp = ((z * (x * t)) * (18.0 * y)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else if ((x <= -1.9e+49) || !(x <= 1.6e+62)) {
		tmp = t_1;
	} else {
		tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - ((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) :: t_1
    real(8) :: tmp
    t_1 = (b * c) + (x * ((18.0d0 * (y * (z * t))) + (i * (-4.0d0))))
    if (x <= (-3d+180)) then
        tmp = t_1
    else if (x <= (-1.4d+79)) then
        tmp = ((z * (x * t)) * (18.0d0 * y)) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
    else if ((x <= (-1.9d+49)) .or. (.not. (x <= 1.6d+62))) then
        tmp = t_1
    else
        tmp = ((b * c) - ((4.0d0 * (x * i)) + (4.0d0 * (t * a)))) - ((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 t_1 = (b * c) + (x * ((18.0 * (y * (z * t))) + (i * -4.0)));
	double tmp;
	if (x <= -3e+180) {
		tmp = t_1;
	} else if (x <= -1.4e+79) {
		tmp = ((z * (x * t)) * (18.0 * y)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else if ((x <= -1.9e+49) || !(x <= 1.6e+62)) {
		tmp = t_1;
	} else {
		tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - ((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):
	t_1 = (b * c) + (x * ((18.0 * (y * (z * t))) + (i * -4.0)))
	tmp = 0
	if x <= -3e+180:
		tmp = t_1
	elif x <= -1.4e+79:
		tmp = ((z * (x * t)) * (18.0 * y)) - ((x * (4.0 * i)) + (j * (27.0 * k)))
	elif (x <= -1.9e+49) or not (x <= 1.6e+62):
		tmp = t_1
	else:
		tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - ((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)
	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 <= -3e+180)
		tmp = t_1;
	elseif (x <= -1.4e+79)
		tmp = Float64(Float64(Float64(z * Float64(x * t)) * Float64(18.0 * y)) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))));
	elseif ((x <= -1.9e+49) || !(x <= 1.6e+62))
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(4.0 * Float64(t * a)))) - Float64(Float64(j * 27.0) * k));
	end
	return tmp
end
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 <= -3e+180)
		tmp = t_1;
	elseif (x <= -1.4e+79)
		tmp = ((z * (x * t)) * (18.0 * y)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	elseif ((x <= -1.9e+49) || ~((x <= 1.6e+62)))
		tmp = t_1;
	else
		tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - ((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_] := 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, -3e+180], t$95$1, If[LessEqual[x, -1.4e+79], N[(N[(N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision] * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.9e+49], N[Not[LessEqual[x, 1.6e+62]], $MachinePrecision]], t$95$1, N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[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 -3 \cdot 10^{+180}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq -1.9 \cdot 10^{+49} \lor \neg \left(x \leq 1.6 \cdot 10^{+62}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.00000000000000003e180 or -1.4000000000000001e79 < x < -1.8999999999999999e49 or 1.59999999999999992e62 < x

    1. Initial program 75.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.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 84.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 k around 0 83.1%

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

    if -3.00000000000000003e180 < x < -1.4000000000000001e79

    1. Initial program 74.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-neg74.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-74.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-neg74.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-neg74.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e49 < x < 1.59999999999999992e62

    1. Initial program 95.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 y around 0 90.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+180}:\\ \;\;\;\;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.4 \cdot 10^{+79}:\\ \;\;\;\;\left(z \cdot \left(x \cdot t\right)\right) \cdot \left(18 \cdot y\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+49} \lor \neg \left(x \leq 1.6 \cdot 10^{+62}\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 - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

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

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

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


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

    1. Initial program 79.0%

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

    if -1.9e17 < x < 7.99999999999999986e77

    1. Initial program 94.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 y around 0 91.3%

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

    if 7.99999999999999986e77 < x

    1. Initial program 76.4%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--80.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*82.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-in82.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-sub82.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*82.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*82.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. Simplified82.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. Step-by-step derivation
      1. fma-def82.2%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 50.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 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;j \leq -8.5 \cdot 10^{+34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -10500000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -9.8 \cdot 10^{-41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -2.2 \cdot 10^{-119}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 4.2 \cdot 10^{-102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 4.5 \cdot 10^{-48}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{elif}\;j \leq 1.66 \cdot 10^{+49}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \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
 (let* ((t_1 (* -4.0 (+ (* x i) (* t a)))) (t_2 (- (* b c) (* 27.0 (* j k)))))
   (if (<= j -8.5e+34)
     t_2
     (if (<= j -10500000.0)
       t_1
       (if (<= j -9.8e-41)
         t_2
         (if (<= j -2.2e-119)
           (- (* b c) (* 4.0 (* t a)))
           (if (<= j 4.2e-102)
             t_1
             (if (<= j 4.5e-48)
               (* x (* 18.0 (* y (* z t))))
               (if (<= j 1.66e+49)
                 (+ (* j (* k -27.0)) (* -4.0 (* x i)))
                 (* -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 = -4.0 * ((x * i) + (t * a));
	double t_2 = (b * c) - (27.0 * (j * k));
	double tmp;
	if (j <= -8.5e+34) {
		tmp = t_2;
	} else if (j <= -10500000.0) {
		tmp = t_1;
	} else if (j <= -9.8e-41) {
		tmp = t_2;
	} else if (j <= -2.2e-119) {
		tmp = (b * c) - (4.0 * (t * a));
	} else if (j <= 4.2e-102) {
		tmp = t_1;
	} else if (j <= 4.5e-48) {
		tmp = x * (18.0 * (y * (z * t)));
	} else if (j <= 1.66e+49) {
		tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-4.0d0) * ((x * i) + (t * a))
    t_2 = (b * c) - (27.0d0 * (j * k))
    if (j <= (-8.5d+34)) then
        tmp = t_2
    else if (j <= (-10500000.0d0)) then
        tmp = t_1
    else if (j <= (-9.8d-41)) then
        tmp = t_2
    else if (j <= (-2.2d-119)) then
        tmp = (b * c) - (4.0d0 * (t * a))
    else if (j <= 4.2d-102) then
        tmp = t_1
    else if (j <= 4.5d-48) then
        tmp = x * (18.0d0 * (y * (z * t)))
    else if (j <= 1.66d+49) then
        tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
    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 t_1 = -4.0 * ((x * i) + (t * a));
	double t_2 = (b * c) - (27.0 * (j * k));
	double tmp;
	if (j <= -8.5e+34) {
		tmp = t_2;
	} else if (j <= -10500000.0) {
		tmp = t_1;
	} else if (j <= -9.8e-41) {
		tmp = t_2;
	} else if (j <= -2.2e-119) {
		tmp = (b * c) - (4.0 * (t * a));
	} else if (j <= 4.2e-102) {
		tmp = t_1;
	} else if (j <= 4.5e-48) {
		tmp = x * (18.0 * (y * (z * t)));
	} else if (j <= 1.66e+49) {
		tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
	} 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):
	t_1 = -4.0 * ((x * i) + (t * a))
	t_2 = (b * c) - (27.0 * (j * k))
	tmp = 0
	if j <= -8.5e+34:
		tmp = t_2
	elif j <= -10500000.0:
		tmp = t_1
	elif j <= -9.8e-41:
		tmp = t_2
	elif j <= -2.2e-119:
		tmp = (b * c) - (4.0 * (t * a))
	elif j <= 4.2e-102:
		tmp = t_1
	elif j <= 4.5e-48:
		tmp = x * (18.0 * (y * (z * t)))
	elif j <= 1.66e+49:
		tmp = (j * (k * -27.0)) + (-4.0 * (x * i))
	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)
	t_1 = 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 (j <= -8.5e+34)
		tmp = t_2;
	elseif (j <= -10500000.0)
		tmp = t_1;
	elseif (j <= -9.8e-41)
		tmp = t_2;
	elseif (j <= -2.2e-119)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a)));
	elseif (j <= 4.2e-102)
		tmp = t_1;
	elseif (j <= 4.5e-48)
		tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t))));
	elseif (j <= 1.66e+49)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i)));
	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)
	t_1 = -4.0 * ((x * i) + (t * a));
	t_2 = (b * c) - (27.0 * (j * k));
	tmp = 0.0;
	if (j <= -8.5e+34)
		tmp = t_2;
	elseif (j <= -10500000.0)
		tmp = t_1;
	elseif (j <= -9.8e-41)
		tmp = t_2;
	elseif (j <= -2.2e-119)
		tmp = (b * c) - (4.0 * (t * a));
	elseif (j <= 4.2e-102)
		tmp = t_1;
	elseif (j <= 4.5e-48)
		tmp = x * (18.0 * (y * (z * t)));
	elseif (j <= 1.66e+49)
		tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
	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_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -8.5e+34], t$95$2, If[LessEqual[j, -10500000.0], t$95$1, If[LessEqual[j, -9.8e-41], t$95$2, If[LessEqual[j, -2.2e-119], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.2e-102], t$95$1, If[LessEqual[j, 4.5e-48], N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.66e+49], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $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}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;j \leq -8.5 \cdot 10^{+34}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;j \leq -10500000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq -9.8 \cdot 10^{-41}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;j \leq 4.2 \cdot 10^{-102}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if j < -8.5000000000000003e34 or -1.05e7 < j < -9.79999999999999906e-41

    1. Initial program 87.6%

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

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

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

    if -8.5000000000000003e34 < j < -1.05e7 or -2.2000000000000001e-119 < j < 4.2e-102

    1. Initial program 92.2%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + 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.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-neg92.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--92.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} - i \cdot \left(x \cdot 4\right) \]
    12. Taylor expanded in a around 0 61.7%

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

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

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

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

    if -9.79999999999999906e-41 < j < -2.2000000000000001e-119

    1. Initial program 89.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 68.8%

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

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

    if 4.2e-102 < j < 4.49999999999999988e-48

    1. Initial program 82.6%

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

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

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

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

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

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

    if 4.49999999999999988e-48 < j < 1.65999999999999999e49

    1. Initial program 73.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-neg73.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. +-commutative73.0%

        \[\leadsto \color{blue}{\left(-\left(j \cdot 27\right) \cdot k\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      3. associate-*l*73.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-in73.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-def73.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. *-commutative73.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-in73.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-eval73.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-neg73.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. +-commutative73.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*73.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-in73.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. Simplified95.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 i around inf 43.7%

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

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, -4 \cdot \color{blue}{\left(x \cdot i\right)}\right) \]
    6. Simplified43.7%

      \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{-4 \cdot \left(x \cdot i\right)}\right) \]
    7. Step-by-step derivation
      1. fma-udef43.7%

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)} \]
    8. Applied egg-rr43.7%

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

    if 1.65999999999999999e49 < j

    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. Step-by-step derivation
      1. sub-neg80.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. +-commutative80.6%

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

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

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def85.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. *-commutative85.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-in85.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-eval85.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-neg85.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. +-commutative85.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*85.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-in85.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. Simplified88.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -8.5 \cdot 10^{+34}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -10500000:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq -9.8 \cdot 10^{-41}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -2.2 \cdot 10^{-119}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 4.2 \cdot 10^{-102}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 4.5 \cdot 10^{-48}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{elif}\;j \leq 1.66 \cdot 10^{+49}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 8: 50.1% accurate, 1.2× speedup?

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

\mathbf{elif}\;j \leq -960000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq -4.6 \cdot 10^{-39}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;j \leq 5.3 \cdot 10^{-97}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if j < -1.90000000000000012e36 or -9.6e5 < j < -4.60000000000000016e-39

    1. Initial program 87.6%

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

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

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

    if -1.90000000000000012e36 < j < -9.6e5 or -3.8999999999999999e-119 < j < 5.29999999999999992e-97

    1. Initial program 92.2%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + 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.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-neg92.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--92.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} - i \cdot \left(x \cdot 4\right) \]
    12. Taylor expanded in a around 0 61.7%

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

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

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

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

    if -4.60000000000000016e-39 < j < -3.8999999999999999e-119

    1. Initial program 89.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 68.8%

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

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

    if 5.29999999999999992e-97 < j < 2.99999999999999989e-38

    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. Step-by-step derivation
      1. sub-neg84.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-84.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-neg84.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-neg84.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--84.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*92.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-in92.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-sub92.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*92.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*92.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. Simplified92.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 68.0%

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

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

    if 2.99999999999999989e-38 < j < 2.40000000000000019e47

    1. Initial program 71.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-neg71.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. +-commutative71.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*71.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-in71.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-def71.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. *-commutative71.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-in71.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-eval71.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-neg71.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. +-commutative71.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*71.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-in71.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. Simplified95.5%

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

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

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, -4 \cdot \color{blue}{\left(x \cdot i\right)}\right) \]
    6. Simplified41.0%

      \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{-4 \cdot \left(x \cdot i\right)}\right) \]
    7. Step-by-step derivation
      1. fma-udef41.0%

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

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

    if 2.40000000000000019e47 < j

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-4} \cdot \left(t \cdot a\right) + \left(27 \cdot \left(k \cdot j\right)\right) \cdot -1 \]
      6. *-commutative55.0%

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

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + \left(27 \cdot \left(k \cdot j\right)\right) \cdot -1 \]
      8. *-commutative55.0%

        \[\leadsto \left(-4 \cdot a\right) \cdot t + \left(27 \cdot \color{blue}{\left(j \cdot k\right)}\right) \cdot -1 \]
      9. *-commutative55.0%

        \[\leadsto \left(-4 \cdot a\right) \cdot t + \color{blue}{\left(\left(j \cdot k\right) \cdot 27\right)} \cdot -1 \]
      10. associate-*l*55.0%

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

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

        \[\leadsto \left(-4 \cdot a\right) \cdot t + \color{blue}{\left(k \cdot j\right)} \cdot -27 \]
      13. associate-*r*55.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.9 \cdot 10^{+36}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -960000:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq -4.6 \cdot 10^{-39}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -3.9 \cdot 10^{-119}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 5.3 \cdot 10^{-97}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq 3 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{elif}\;j \leq 2.4 \cdot 10^{+47}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 9: 76.4% 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 -3.6 \cdot 10^{+53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+14}:\\ \;\;\;\;b \cdot c + \left(-27 \cdot \left(j \cdot k\right) + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-11}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+33}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: 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 -3.6e+53)
     t_1
     (if (<= x -1.25e+14)
       (+ (* b c) (+ (* -27.0 (* j k)) (* 18.0 (* y (* t (* x z))))))
       (if (<= x -1.45e-11)
         (- (* t (* a -4.0)) (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
         (if (<= x 1.3e+33)
           (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) 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 <= -3.6e+53) {
		tmp = t_1;
	} else if (x <= -1.25e+14) {
		tmp = (b * c) + ((-27.0 * (j * k)) + (18.0 * (y * (t * (x * z)))));
	} else if (x <= -1.45e-11) {
		tmp = (t * (a * -4.0)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else if (x <= 1.3e+33) {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * 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 <= (-3.6d+53)) then
        tmp = t_1
    else if (x <= (-1.25d+14)) then
        tmp = (b * c) + (((-27.0d0) * (j * k)) + (18.0d0 * (y * (t * (x * z)))))
    else if (x <= (-1.45d-11)) then
        tmp = (t * (a * (-4.0d0))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
    else if (x <= 1.3d+33) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * 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 <= -3.6e+53) {
		tmp = t_1;
	} else if (x <= -1.25e+14) {
		tmp = (b * c) + ((-27.0 * (j * k)) + (18.0 * (y * (t * (x * z)))));
	} else if (x <= -1.45e-11) {
		tmp = (t * (a * -4.0)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else if (x <= 1.3e+33) {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * 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 <= -3.6e+53:
		tmp = t_1
	elif x <= -1.25e+14:
		tmp = (b * c) + ((-27.0 * (j * k)) + (18.0 * (y * (t * (x * z)))))
	elif x <= -1.45e-11:
		tmp = (t * (a * -4.0)) - ((x * (4.0 * i)) + (j * (27.0 * k)))
	elif x <= 1.3e+33:
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * 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 <= -3.6e+53)
		tmp = t_1;
	elseif (x <= -1.25e+14)
		tmp = Float64(Float64(b * c) + Float64(Float64(-27.0 * Float64(j * k)) + Float64(18.0 * Float64(y * Float64(t * Float64(x * z))))));
	elseif (x <= -1.45e-11)
		tmp = Float64(Float64(t * Float64(a * -4.0)) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))));
	elseif (x <= 1.3e+33)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k));
	else
		tmp = t_1;
	end
	return tmp
end
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 <= -3.6e+53)
		tmp = t_1;
	elseif (x <= -1.25e+14)
		tmp = (b * c) + ((-27.0 * (j * k)) + (18.0 * (y * (t * (x * z)))));
	elseif (x <= -1.45e-11)
		tmp = (t * (a * -4.0)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	elseif (x <= 1.3e+33)
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * 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, -3.6e+53], t$95$1, If[LessEqual[x, -1.25e+14], N[(N[(b * c), $MachinePrecision] + N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e-11], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+33], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[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 -3.6 \cdot 10^{+53}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.6e53 or 1.2999999999999999e33 < x

    1. Initial program 77.2%

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

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

    if -3.6e53 < x < -1.25e14

    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. Simplified99.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 99.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 i around 0 92.0%

      \[\leadsto c \cdot b + \color{blue}{\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.25e14 < x < -1.45e-11

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45e-11 < x < 1.2999999999999999e33

    1. Initial program 95.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{+53}:\\ \;\;\;\;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.25 \cdot 10^{+14}:\\ \;\;\;\;b \cdot c + \left(-27 \cdot \left(j \cdot k\right) + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-11}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+33}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\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 10: 75.9% 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 -9 \cdot 10^{+180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-11}:\\ \;\;\;\;\left(z \cdot \left(x \cdot t\right)\right) \cdot \left(18 \cdot y\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+21}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: 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 -9e+180)
     t_1
     (if (<= x -6.5e-11)
       (- (* (* z (* x t)) (* 18.0 y)) (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
       (if (<= x 2.2e+21)
         (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) 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 <= -9e+180) {
		tmp = t_1;
	} else if (x <= -6.5e-11) {
		tmp = ((z * (x * t)) * (18.0 * y)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else if (x <= 2.2e+21) {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * 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 <= (-9d+180)) then
        tmp = t_1
    else if (x <= (-6.5d-11)) then
        tmp = ((z * (x * t)) * (18.0d0 * y)) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
    else if (x <= 2.2d+21) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * 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 <= -9e+180) {
		tmp = t_1;
	} else if (x <= -6.5e-11) {
		tmp = ((z * (x * t)) * (18.0 * y)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else if (x <= 2.2e+21) {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * 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 <= -9e+180:
		tmp = t_1
	elif x <= -6.5e-11:
		tmp = ((z * (x * t)) * (18.0 * y)) - ((x * (4.0 * i)) + (j * (27.0 * k)))
	elif x <= 2.2e+21:
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * 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 <= -9e+180)
		tmp = t_1;
	elseif (x <= -6.5e-11)
		tmp = Float64(Float64(Float64(z * Float64(x * t)) * Float64(18.0 * y)) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))));
	elseif (x <= 2.2e+21)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k));
	else
		tmp = t_1;
	end
	return tmp
end
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 <= -9e+180)
		tmp = t_1;
	elseif (x <= -6.5e-11)
		tmp = ((z * (x * t)) * (18.0 * y)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	elseif (x <= 2.2e+21)
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * 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, -9e+180], t$95$1, If[LessEqual[x, -6.5e-11], N[(N[(N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision] * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+21], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[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 -9 \cdot 10^{+180}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8.99999999999999962e180 or 2.2e21 < x

    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. Simplified89.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 82.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 c \cdot b + \color{blue}{\left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) + -4 \cdot i\right) \cdot x} \]

    if -8.99999999999999962e180 < x < -6.49999999999999953e-11

    1. Initial program 83.1%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--87.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*89.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-in89.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-sub89.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*89.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*89.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. Simplified89.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. Step-by-step derivation
      1. fma-def91.7%

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

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

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

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

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

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

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

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

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

    if -6.49999999999999953e-11 < x < 2.2e21

    1. Initial program 95.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9 \cdot 10^{+180}:\\ \;\;\;\;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 -6.5 \cdot 10^{-11}:\\ \;\;\;\;\left(z \cdot \left(x \cdot t\right)\right) \cdot \left(18 \cdot y\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+21}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\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 11: 83.1% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 79.0%

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

    if -8e17 < x < 5.19999999999999968e62

    1. Initial program 95.4%

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

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

    if 5.19999999999999968e62 < x

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

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

      \[\leadsto c \cdot b + \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 simplification88.8%

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.19999999999999983e50 or 8.5e17 < 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. Simplified88.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 84.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 k around 0 79.3%

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

    if -3.19999999999999983e50 < x < 8.5e17

    1. Initial program 95.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{+50} \lor \neg \left(x \leq 8.5 \cdot 10^{+17}\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) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

Alternative 13: 32.8% accurate, 1.6× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ t_2 := x \cdot \left(i \cdot -4\right)\\ \mathbf{if}\;j \leq -1.25 \cdot 10^{+72}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -2.18 \cdot 10^{-119}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -7.5 \cdot 10^{-134}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -2.8 \cdot 10^{-219}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -2.25 \cdot 10^{-246}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 1.38 \cdot 10^{-272}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 9.5 \cdot 10^{-127}:\\ \;\;\;\;t_2\\ \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
 (let* ((t_1 (* t (* a -4.0))) (t_2 (* x (* i -4.0))))
   (if (<= j -1.25e+72)
     (* j (* k -27.0))
     (if (<= j -2.18e-119)
       (* b c)
       (if (<= j -7.5e-134)
         t_2
         (if (<= j -2.8e-219)
           t_1
           (if (<= j -2.25e-246)
             t_2
             (if (<= j 1.38e-272)
               t_1
               (if (<= j 9.5e-127) t_2 (* -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 = t * (a * -4.0);
	double t_2 = x * (i * -4.0);
	double tmp;
	if (j <= -1.25e+72) {
		tmp = j * (k * -27.0);
	} else if (j <= -2.18e-119) {
		tmp = b * c;
	} else if (j <= -7.5e-134) {
		tmp = t_2;
	} else if (j <= -2.8e-219) {
		tmp = t_1;
	} else if (j <= -2.25e-246) {
		tmp = t_2;
	} else if (j <= 1.38e-272) {
		tmp = t_1;
	} else if (j <= 9.5e-127) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (a * (-4.0d0))
    t_2 = x * (i * (-4.0d0))
    if (j <= (-1.25d+72)) then
        tmp = j * (k * (-27.0d0))
    else if (j <= (-2.18d-119)) then
        tmp = b * c
    else if (j <= (-7.5d-134)) then
        tmp = t_2
    else if (j <= (-2.8d-219)) then
        tmp = t_1
    else if (j <= (-2.25d-246)) then
        tmp = t_2
    else if (j <= 1.38d-272) then
        tmp = t_1
    else if (j <= 9.5d-127) then
        tmp = t_2
    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 t_1 = t * (a * -4.0);
	double t_2 = x * (i * -4.0);
	double tmp;
	if (j <= -1.25e+72) {
		tmp = j * (k * -27.0);
	} else if (j <= -2.18e-119) {
		tmp = b * c;
	} else if (j <= -7.5e-134) {
		tmp = t_2;
	} else if (j <= -2.8e-219) {
		tmp = t_1;
	} else if (j <= -2.25e-246) {
		tmp = t_2;
	} else if (j <= 1.38e-272) {
		tmp = t_1;
	} else if (j <= 9.5e-127) {
		tmp = t_2;
	} 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):
	t_1 = t * (a * -4.0)
	t_2 = x * (i * -4.0)
	tmp = 0
	if j <= -1.25e+72:
		tmp = j * (k * -27.0)
	elif j <= -2.18e-119:
		tmp = b * c
	elif j <= -7.5e-134:
		tmp = t_2
	elif j <= -2.8e-219:
		tmp = t_1
	elif j <= -2.25e-246:
		tmp = t_2
	elif j <= 1.38e-272:
		tmp = t_1
	elif j <= 9.5e-127:
		tmp = t_2
	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)
	t_1 = Float64(t * Float64(a * -4.0))
	t_2 = Float64(x * Float64(i * -4.0))
	tmp = 0.0
	if (j <= -1.25e+72)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (j <= -2.18e-119)
		tmp = Float64(b * c);
	elseif (j <= -7.5e-134)
		tmp = t_2;
	elseif (j <= -2.8e-219)
		tmp = t_1;
	elseif (j <= -2.25e-246)
		tmp = t_2;
	elseif (j <= 1.38e-272)
		tmp = t_1;
	elseif (j <= 9.5e-127)
		tmp = t_2;
	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)
	t_1 = t * (a * -4.0);
	t_2 = x * (i * -4.0);
	tmp = 0.0;
	if (j <= -1.25e+72)
		tmp = j * (k * -27.0);
	elseif (j <= -2.18e-119)
		tmp = b * c;
	elseif (j <= -7.5e-134)
		tmp = t_2;
	elseif (j <= -2.8e-219)
		tmp = t_1;
	elseif (j <= -2.25e-246)
		tmp = t_2;
	elseif (j <= 1.38e-272)
		tmp = t_1;
	elseif (j <= 9.5e-127)
		tmp = t_2;
	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_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.25e+72], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -2.18e-119], N[(b * c), $MachinePrecision], If[LessEqual[j, -7.5e-134], t$95$2, If[LessEqual[j, -2.8e-219], t$95$1, If[LessEqual[j, -2.25e-246], t$95$2, If[LessEqual[j, 1.38e-272], t$95$1, If[LessEqual[j, 9.5e-127], t$95$2, 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}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;j \leq -1.25 \cdot 10^{+72}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;j \leq -2.18 \cdot 10^{-119}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;j \leq -7.5 \cdot 10^{-134}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;j \leq -2.8 \cdot 10^{-219}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq -2.25 \cdot 10^{-246}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;j \leq 1.38 \cdot 10^{-272}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq 9.5 \cdot 10^{-127}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if j < -1.24999999999999998e72

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

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

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

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

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

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

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified83.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. Step-by-step derivation
      1. fma-def84.9%

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

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

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

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

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

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

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

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

    if -1.24999999999999998e72 < j < -2.17999999999999997e-119

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--93.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*95.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-in95.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-sub95.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*95.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*95.7%

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

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

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

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

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

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

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

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

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

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

    if -2.17999999999999997e-119 < j < -7.50000000000000048e-134 or -2.7999999999999999e-219 < j < -2.25e-246 or 1.37999999999999997e-272 < j < 9.4999999999999997e-127

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. associate-*r*46.2%

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

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
    8. Simplified46.2%

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

    if -7.50000000000000048e-134 < j < -2.7999999999999999e-219 or -2.25e-246 < j < 1.37999999999999997e-272

    1. Initial program 100.0%

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

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

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

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*97.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-in97.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-sub97.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*97.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*97.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. Simplified97.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. Step-by-step derivation
      1. fma-def97.3%

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

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

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

      \[\leadsto \mathsf{fma}\left(t, x \cdot \left(18 \cdot \left(y \cdot z\right)\right) - a \cdot 4, b \cdot c\right) - \color{blue}{4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. *-commutative97.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(t \cdot a\right)} \cdot -4 \]
      3. associate-*l*42.5%

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

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

    if 9.4999999999999997e-127 < j

    1. Initial program 78.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-neg78.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. +-commutative78.0%

        \[\leadsto \color{blue}{\left(-\left(j \cdot 27\right) \cdot k\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      3. associate-*l*78.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-in78.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-def80.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. *-commutative80.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-in80.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-eval80.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-neg80.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. +-commutative80.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*80.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-in80.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. Simplified88.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 31.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.25 \cdot 10^{+72}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -2.18 \cdot 10^{-119}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -7.5 \cdot 10^{-134}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;j \leq -2.8 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;j \leq -2.25 \cdot 10^{-246}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;j \leq 1.38 \cdot 10^{-272}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;j \leq 9.5 \cdot 10^{-127}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 14: 50.7% accurate, 1.6× speedup?

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

\mathbf{elif}\;j \leq -430000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq -2.4 \cdot 10^{-39}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;j \leq 6.5 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -2.0999999999999999e35 or -4.3e5 < j < -2.40000000000000016e-39 or 6.5e-119 < j

    1. Initial program 82.6%

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

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

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

    if -2.0999999999999999e35 < j < -4.3e5 or -7.4000000000000003e-119 < j < 6.5e-119

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} - i \cdot \left(x \cdot 4\right) \]
    12. Taylor expanded in a around 0 63.2%

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

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

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

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

    if -2.40000000000000016e-39 < j < -7.4000000000000003e-119

    1. Initial program 89.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 68.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -2.1 \cdot 10^{+35}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -430000:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq -2.4 \cdot 10^{-39}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -7.4 \cdot 10^{-119}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 6.5 \cdot 10^{-119}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2e46 or 3.45e112 < x

    1. Initial program 73.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-neg73.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-73.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-neg73.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-neg73.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--77.8%

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

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

    if -2.2e46 < x < 3.45e112

    1. Initial program 95.4%

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

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

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

Alternative 16: 44.4% accurate, 1.8× speedup?

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

\mathbf{elif}\;j \leq -180000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq -4.6 \cdot 10^{-39}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;j \leq 7 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 84.6%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--86.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*82.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-in82.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-sub82.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*82.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*82.7%

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

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

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

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

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

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

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

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

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

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

    if -1.96000000000000011e77 < j < -1.8e5 or -4.60000000000000016e-39 < j < 6.99999999999999987e-53

    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--92.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*92.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-in92.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-sub92.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. fma-def92.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} - i \cdot \left(x \cdot 4\right) \]
    12. Taylor expanded in a around 0 56.7%

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

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

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

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

    if -1.8e5 < j < -4.60000000000000016e-39

    1. Initial program 90.9%

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

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

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

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*90.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-in90.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-sub90.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*90.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*90.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. Simplified90.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. Step-by-step derivation
      1. fma-def90.9%

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

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

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

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

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

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

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

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

    if 6.99999999999999987e-53 < j

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.96 \cdot 10^{+77}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -180000:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;j \leq -4.6 \cdot 10^{-39}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 7 \cdot 10^{-53}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 17: 46.4% accurate, 2.0× speedup?

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

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

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

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


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

    1. Initial program 82.9%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--85.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*80.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-in80.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-sub80.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*80.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*80.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. Simplified80.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. Step-by-step derivation
      1. fma-def83.0%

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

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

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

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

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

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

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

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

    if -1.8e100 < j < -3.5e-119

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

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

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

    if -3.5e-119 < j < 6.99999999999999987e-53

    1. Initial program 92.2%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + 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.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-neg92.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--92.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*90.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-in90.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-sub90.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*90.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*90.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. Simplified90.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. Step-by-step derivation
      1. fma-def90.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} - i \cdot \left(x \cdot 4\right) \]
    11. Simplified57.4%

      \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} - i \cdot \left(x \cdot 4\right) \]
    12. Taylor expanded in a around 0 57.4%

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

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

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

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

    if 6.99999999999999987e-53 < j

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.8 \cdot 10^{+100}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -3.5 \cdot 10^{-119}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 7 \cdot 10^{-53}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 18: 32.9% accurate, 2.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;j \leq -2.25 \cdot 10^{+67}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -9.5 \cdot 10^{-95}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 6 \cdot 10^{-69}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \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 (<= j -2.25e+67)
   (* j (* k -27.0))
   (if (<= j -9.5e-95)
     (* b c)
     (if (<= j 6e-69) (* t (* a -4.0)) (* -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 (j <= -2.25e+67) {
		tmp = j * (k * -27.0);
	} else if (j <= -9.5e-95) {
		tmp = b * c;
	} else if (j <= 6e-69) {
		tmp = t * (a * -4.0);
	} 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 (j <= (-2.25d+67)) then
        tmp = j * (k * (-27.0d0))
    else if (j <= (-9.5d-95)) then
        tmp = b * c
    else if (j <= 6d-69) then
        tmp = t * (a * (-4.0d0))
    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 (j <= -2.25e+67) {
		tmp = j * (k * -27.0);
	} else if (j <= -9.5e-95) {
		tmp = b * c;
	} else if (j <= 6e-69) {
		tmp = t * (a * -4.0);
	} 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 j <= -2.25e+67:
		tmp = j * (k * -27.0)
	elif j <= -9.5e-95:
		tmp = b * c
	elif j <= 6e-69:
		tmp = t * (a * -4.0)
	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 (j <= -2.25e+67)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (j <= -9.5e-95)
		tmp = Float64(b * c);
	elseif (j <= 6e-69)
		tmp = Float64(t * Float64(a * -4.0));
	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 (j <= -2.25e+67)
		tmp = j * (k * -27.0);
	elseif (j <= -9.5e-95)
		tmp = b * c;
	elseif (j <= 6e-69)
		tmp = t * (a * -4.0);
	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[LessEqual[j, -2.25e+67], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -9.5e-95], N[(b * c), $MachinePrecision], If[LessEqual[j, 6e-69], N[(t * N[(a * -4.0), $MachinePrecision]), $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}\;j \leq -2.25 \cdot 10^{+67}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;j \leq -9.5 \cdot 10^{-95}:\\
\;\;\;\;b \cdot c\\

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

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


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

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

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

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

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

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

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

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified83.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. Step-by-step derivation
      1. fma-def84.9%

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

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

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

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

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

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

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

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

    if -2.2499999999999999e67 < j < -9.49999999999999998e-95

    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--93.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*95.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-in95.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-sub95.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*95.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*95.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. Simplified95.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. Step-by-step derivation
      1. fma-def95.3%

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

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

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

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

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

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

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

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

    if -9.49999999999999998e-95 < j < 5.99999999999999978e-69

    1. Initial program 92.4%

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

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

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

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified90.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. Step-by-step derivation
      1. fma-def90.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(t \cdot a\right)} \cdot -4 \]
      3. associate-*l*34.1%

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

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

    if 5.99999999999999978e-69 < j

    1. Initial program 76.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-neg76.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. +-commutative76.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*76.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-in76.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-def79.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. *-commutative79.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-in79.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-eval79.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-neg79.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. +-commutative79.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*79.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-in79.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. Simplified90.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 35.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -2.25 \cdot 10^{+67}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -9.5 \cdot 10^{-95}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq 6 \cdot 10^{-69}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 19: 33.9% accurate, 3.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;j \leq -3.4 \cdot 10^{+68} \lor \neg \left(j \leq 2.6 \cdot 10^{-58}\right):\\ \;\;\;\;-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 (or (<= j -3.4e+68) (not (<= j 2.6e-58))) (* -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 ((j <= -3.4e+68) || !(j <= 2.6e-58)) {
		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 ((j <= (-3.4d+68)) .or. (.not. (j <= 2.6d-58))) 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 ((j <= -3.4e+68) || !(j <= 2.6e-58)) {
		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 (j <= -3.4e+68) or not (j <= 2.6e-58):
		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 ((j <= -3.4e+68) || !(j <= 2.6e-58))
		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 ((j <= -3.4e+68) || ~((j <= 2.6e-58)))
		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[Or[LessEqual[j, -3.4e+68], N[Not[LessEqual[j, 2.6e-58]], $MachinePrecision]], 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}\;j \leq -3.4 \cdot 10^{+68} \lor \neg \left(j \leq 2.6 \cdot 10^{-58}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -3.40000000000000015e68 or 2.60000000000000007e-58 < j

    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. Step-by-step derivation
      1. sub-neg80.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. +-commutative80.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*80.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-in80.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-def82.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. *-commutative82.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-in82.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-eval82.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-neg82.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. +-commutative82.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*82.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-in82.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. Simplified91.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 44.8%

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

    if -3.40000000000000015e68 < j < 2.60000000000000007e-58

    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.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*92.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-in92.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-sub92.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. fma-def92.1%

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

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

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

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

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

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

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

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

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

Alternative 20: 33.9% accurate, 3.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;j \leq -2.5 \cdot 10^{+69}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq 3.8 \cdot 10^{-56}:\\ \;\;\;\;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 (<= j -2.5e+69)
   (* j (* k -27.0))
   (if (<= j 3.8e-56) (* 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 (j <= -2.5e+69) {
		tmp = j * (k * -27.0);
	} else if (j <= 3.8e-56) {
		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 (j <= (-2.5d+69)) then
        tmp = j * (k * (-27.0d0))
    else if (j <= 3.8d-56) 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 (j <= -2.5e+69) {
		tmp = j * (k * -27.0);
	} else if (j <= 3.8e-56) {
		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 j <= -2.5e+69:
		tmp = j * (k * -27.0)
	elif j <= 3.8e-56:
		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 (j <= -2.5e+69)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (j <= 3.8e-56)
		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 (j <= -2.5e+69)
		tmp = j * (k * -27.0);
	elseif (j <= 3.8e-56)
		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[LessEqual[j, -2.5e+69], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.8e-56], 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}\;j \leq -2.5 \cdot 10^{+69}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;j \leq 3.8 \cdot 10^{-56}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -2.50000000000000018e69

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

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

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

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

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

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

        \[\leadsto \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified83.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. Step-by-step derivation
      1. fma-def84.9%

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

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

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

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

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

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

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

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

    if -2.50000000000000018e69 < j < 3.8000000000000002e-56

    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. Step-by-step derivation
      1. sub-neg92.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-92.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-neg92.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-neg92.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--92.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. associate-*l*92.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-in92.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-sub92.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. fma-def92.1%

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

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

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

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

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

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

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

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

    if 3.8000000000000002e-56 < j

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -2.5 \cdot 10^{+69}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq 3.8 \cdot 10^{-56}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 21: 24.0% 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 86.8%

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

      \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + 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.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-neg86.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--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*87.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-in87.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-sub87.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*87.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*87.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{c \cdot b} \]
  10. Final simplification22.1%

    \[\leadsto b \cdot c \]

Developer target: 90.0% 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 2023258 
(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)))