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

Percentage Accurate: 85.2% → 91.2%
Time: 24.7s
Alternatives: 17
Speedup: 0.5×

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 17 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 91.2% accurate, 0.5× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;\left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\ \;\;\;\;\left(t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\ \end{array} \end{array} \]
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<=
      (-
       (-
        (+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* b c))
        (* i (* x 4.0)))
       (* k (* j 27.0)))
      INFINITY)
   (-
    (+ (* t (- (* (* y z) (* x 18.0)) (* a 4.0))) (* b c))
    (+ (* x (* i 4.0)) (* j (* k 27.0))))
   (* x (- (* 18.0 (* y (* t z))) (* i 4.0)))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
		tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
	} else {
		tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	}
	return tmp;
}
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Double.POSITIVE_INFINITY) {
		tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
	} else {
		tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	}
	return tmp;
}
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= math.inf:
		tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)))
	else:
		tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0))
	return tmp
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf)
		tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0))));
	else
		tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(t * z))) - Float64(i * 4.0)));
	end
	return tmp
end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Inf)
		tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
	else
		tmp = x * ((18.0 * (y * (t * z))) - (i * 4.0));
	end
	tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\

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


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

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

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

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

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

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

Alternative 2: 90.4% accurate, 0.1× speedup?

\[\begin{array}{l} [j, k] = \mathsf{sort}([j, k])\\ \\ \mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right) \end{array} \]
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (fma
  j
  (* k -27.0)
  (fma x (* i -4.0) (fma t (fma x (* 18.0 (* y z)) (* -4.0 a)) (* b c)))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return fma(j, (k * -27.0), fma(x, (i * -4.0), fma(t, fma(x, (18.0 * (y * z)), (-4.0 * a)), (b * c))));
}
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)), Float64(b * c))))
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(j * N[(k * -27.0), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right)
\end{array}
Derivation
  1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.5% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.20000000000000029e79 or 1.9999999999999999e168 < t

    1. Initial program 86.5%

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

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

    if -5.20000000000000029e79 < t < 1.24e11

    1. Initial program 84.3%

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

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

    if 1.24e11 < t < 1.9999999999999999e168

    1. Initial program 86.9%

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

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

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

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

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

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

Alternative 4: 44.5% accurate, 1.5× speedup?

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

\mathbf{elif}\;k \leq 2.3 \cdot 10^{-72}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;k \leq 3.8 \cdot 10^{+50}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;k \leq 8.2 \cdot 10^{+145}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if k < -1.5000000000000001e-27

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.5000000000000001e-27 < k < 2.29999999999999995e-72 or 3.4e27 < k < 3.79999999999999987e50 or 9.6e63 < k < 8.2000000000000003e145

    1. Initial program 83.7%

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

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

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

    if 2.29999999999999995e-72 < k < 3.4e27

    1. Initial program 86.5%

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

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

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

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

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

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

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

    if 3.79999999999999987e50 < k < 9.6e63

    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. +-commutative100.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*99.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-in99.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-def99.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. *-commutative99.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-in99.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-eval99.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-neg99.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. +-commutative99.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*99.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-in99.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. Simplified99.6%

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

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

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

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

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

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

    if 8.2000000000000003e145 < k

    1. Initial program 81.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-neg81.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. +-commutative81.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*81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.5 \cdot 10^{-27}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 2.3 \cdot 10^{-72}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 3.4 \cdot 10^{+27}:\\ \;\;\;\;18 \cdot \left(\left(x \cdot z\right) \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;k \leq 3.8 \cdot 10^{+50}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;k \leq 9.6 \cdot 10^{+63}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq 8.2 \cdot 10^{+145}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]

Alternative 5: 58.4% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq -4.1 \cdot 10^{-243}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\

\mathbf{elif}\;x \leq -2.1 \cdot 10^{-302}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right)\right)\\

\mathbf{elif}\;x \leq 2 \cdot 10^{-57}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.6999999999999998e57 or 1.99999999999999991e-57 < x

    1. Initial program 73.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-neg73.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-73.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-neg73.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-neg73.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--76.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*85.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-in85.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-sub85.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*85.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*85.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. Simplified85.5%

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

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

    if -2.6999999999999998e57 < x < -4.09999999999999981e-243

    1. Initial program 94.3%

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

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

      \[\leadsto \color{blue}{c \cdot b - 27 \cdot \left(k \cdot j\right)} \]
    4. Step-by-step derivation
      1. expm1-log1p-u35.0%

        \[\leadsto c \cdot b - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(27 \cdot \left(k \cdot j\right)\right)\right)} \]
      2. expm1-udef34.7%

        \[\leadsto c \cdot b - \color{blue}{\left(e^{\mathsf{log1p}\left(27 \cdot \left(k \cdot j\right)\right)} - 1\right)} \]
      3. *-commutative34.7%

        \[\leadsto c \cdot b - \left(e^{\mathsf{log1p}\left(\color{blue}{\left(k \cdot j\right) \cdot 27}\right)} - 1\right) \]
    5. Applied egg-rr34.7%

      \[\leadsto c \cdot b - \color{blue}{\left(e^{\mathsf{log1p}\left(\left(k \cdot j\right) \cdot 27\right)} - 1\right)} \]
    6. Step-by-step derivation
      1. expm1-def35.0%

        \[\leadsto c \cdot b - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(k \cdot j\right) \cdot 27\right)\right)} \]
      2. expm1-log1p56.6%

        \[\leadsto c \cdot b - \color{blue}{\left(k \cdot j\right) \cdot 27} \]
      3. associate-*l*56.6%

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

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

    if -4.09999999999999981e-243 < x < -2.10000000000000013e-302

    1. Initial program 99.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. Simplified78.5%

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

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

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

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

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

    if -2.10000000000000013e-302 < x < 1.99999999999999991e-57

    1. Initial program 97.7%

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

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

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

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

Alternative 6: 72.6% accurate, 1.5× speedup?

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

\mathbf{elif}\;t \leq 380000000:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.5999999999999999e81 or 1.95e168 < t

    1. Initial program 87.5%

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

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

    if -5.5999999999999999e81 < t < 3.8e8

    1. Initial program 83.6%

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

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

    if 3.8e8 < t < 1.95e168

    1. Initial program 87.4%

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

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

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

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

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

Alternative 7: 48.7% accurate, 1.5× speedup?

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

\mathbf{elif}\;b \leq -4.6 \cdot 10^{+105}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 8000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.2000000000000001e190 or 8e3 < b

    1. Initial program 85.2%

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

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

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

    if -3.2000000000000001e190 < b < -4.5999999999999996e105 or -1.35000000000000002e39 < b < 8e3

    1. Initial program 85.1%

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

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

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

    if -4.5999999999999996e105 < b < -1.35000000000000002e39

    1. Initial program 87.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. Simplified83.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 t around -inf 55.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+190}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{+105}:\\ \;\;\;\;27 \cdot \left(j \cdot \left(-k\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{+39}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right)\right)\\ \mathbf{elif}\;b \leq 8000:\\ \;\;\;\;27 \cdot \left(j \cdot \left(-k\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 8: 59.6% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;t \leq 110000000:\\
\;\;\;\;27 \cdot \left(j \cdot \left(-k\right)\right) - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.3e-49 or 1.1e8 < t

    1. Initial program 87.4%

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

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

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

    if -3.3e-49 < t < 9.5999999999999999e-266

    1. Initial program 86.7%

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

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

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

    if 9.5999999999999999e-266 < t < 1.1e8

    1. Initial program 79.6%

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

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

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

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

Alternative 9: 70.8% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3200000000000001e153 or 2.85e-42 < x

    1. Initial program 71.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-neg71.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-71.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-neg71.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-neg71.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--74.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*85.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-in85.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-sub85.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*85.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*85.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. Simplified85.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 75.1%

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

    if -1.3200000000000001e153 < x < 2.85e-42

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

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

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

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

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

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

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

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

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

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

Alternative 10: 49.1% accurate, 1.9× speedup?

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

\mathbf{elif}\;k \leq 2.3 \cdot 10^{-72}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -2.1999999999999999e-49 or 5.8000000000000002e27 < k

    1. Initial program 86.7%

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

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

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

    if -2.1999999999999999e-49 < k < 2.29999999999999995e-72

    1. Initial program 83.4%

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

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

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

    if 2.29999999999999995e-72 < k < 5.8000000000000002e27

    1. Initial program 87.3%

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

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

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

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

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

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

      \[\leadsto -1 \cdot \left(\color{blue}{\left(\left(z \cdot x\right) \cdot \left(y \cdot -18\right)\right)} \cdot t\right) \]
    7. Taylor expanded in z around 0 49.7%

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

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

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

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

        \[\leadsto -1 \cdot \left(\color{blue}{\left(z \cdot \left(x \cdot \left(y \cdot -18\right)\right)\right)} \cdot t\right) \]
    9. Simplified43.6%

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

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

Alternative 11: 49.1% accurate, 2.0× speedup?

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

\mathbf{elif}\;k \leq 6.2 \cdot 10^{-74}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -9.49999999999999951e-62 or 5.49999999999999966e27 < k

    1. Initial program 87.1%

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

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

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

    if -9.49999999999999951e-62 < k < 6.2000000000000003e-74

    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 t around 0 53.6%

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

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

    if 6.2000000000000003e-74 < k < 5.49999999999999966e27

    1. Initial program 87.3%

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

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

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

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

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

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

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

Alternative 12: 32.3% accurate, 2.2× speedup?

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

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

\mathbf{elif}\;t \leq -1.15 \cdot 10^{-307}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;t \leq 160000000:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.5999999999999998e203 or 1.6e8 < t

    1. Initial program 85.3%

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

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

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

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

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

    if -5.5999999999999998e203 < t < -4.80000000000000015e-53

    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. Simplified95.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 75.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 63.9%

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

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

    if -4.80000000000000015e-53 < t < -1.1499999999999999e-307

    1. Initial program 87.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-neg87.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. +-commutative87.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*87.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-in87.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-def87.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. *-commutative87.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-in87.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-eval87.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-neg87.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. +-commutative87.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*87.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-in87.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. Simplified94.4%

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

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

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

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

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

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

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

    if -1.1499999999999999e-307 < t < 1.6e8

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+203}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right)\right)\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-53}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-307}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 160000000:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right)\right)\\ \end{array} \]

Alternative 13: 31.9% accurate, 2.5× speedup?

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

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-307}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;t \leq 115000000:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\

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


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

    1. Initial program 87.5%

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

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

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

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

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

    if -6.59999999999999953e33 < t < -1.29999999999999998e-307

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999998e-307 < t < 1.15e8

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{+33}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right)\right)\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-307}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 115000000:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right)\right)\\ \end{array} \]

Alternative 14: 31.1% accurate, 2.8× speedup?

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

\mathbf{elif}\;x \leq -9.2 \cdot 10^{-197}:\\
\;\;\;\;b \cdot c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.2999999999999999e85 or 4.99999999999999973e-21 < x

    1. Initial program 72.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. Simplified93.5%

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

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

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

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

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

    if -5.2999999999999999e85 < x < -9.2000000000000002e-197

    1. Initial program 91.4%

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

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

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

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

    if -9.2000000000000002e-197 < x < 4.99999999999999973e-21

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.3 \cdot 10^{+85}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{-197}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-21}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 15: 33.1% accurate, 3.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -9.50000000000000001e-28 or 3.2999999999999998e-19 < k

    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. +-commutative86.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*86.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-in86.8%

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def87.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. *-commutative87.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-in87.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-eval87.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-neg87.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. +-commutative87.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*87.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-in87.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. Simplified94.7%

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

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

    if -9.50000000000000001e-28 < k < 3.2999999999999998e-19

    1. Initial program 83.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -9.5 \cdot 10^{-28} \lor \neg \left(k \leq 3.3 \cdot 10^{-19}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 16: 33.1% accurate, 3.4× speedup?

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

\mathbf{elif}\;k \leq 2.3 \cdot 10^{-18}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -1.5000000000000001e-27

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.5000000000000001e-27 < k < 2.3000000000000001e-18

    1. Initial program 83.8%

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

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

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

    if 2.3000000000000001e-18 < k

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.5 \cdot 10^{-27}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 2.3 \cdot 10^{-18}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]

Alternative 17: 23.0% accurate, 10.3× speedup?

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

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

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

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

    \[\leadsto \color{blue}{c \cdot b} \]
  5. Final simplification19.9%

    \[\leadsto b \cdot c \]

Developer target: 89.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\ t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
        (t_2
         (-
          (- (* (* 18.0 t) (* (* x y) z)) t_1)
          (- (* (* k j) 27.0) (* c b)))))
   (if (< t -1.6210815397541398e-69)
     t_2
     (if (< t 165.68027943805222)
       (+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((a * t) + (i * x)) * 4.0d0
    t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
    if (t < (-1.6210815397541398d-69)) then
        tmp = t_2
    else if (t < 165.68027943805222d0) then
        tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((a * t) + (i * x)) * 4.0
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b))
	tmp = 0
	if t < -1.6210815397541398e-69:
		tmp = t_2
	elif t < 165.68027943805222:
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0)
	t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b)))
	tmp = 0.0
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((a * t) + (i * x)) * 4.0;
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	tmp = 0.0;
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023195 
(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)))