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

Percentage Accurate: 84.6% → 92.6%
Time: 30.2s
Alternatives: 27
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 27 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 84.6% accurate, 1.0× speedup?

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

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

Alternative 1: 92.6% accurate, 0.1× speedup?

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j, k \cdot -27, x \cdot \left(-\mathsf{fma}\left(i, 4, y \cdot \left(-18 \cdot \left(z \cdot t\right)\right)\right)\right)\right)\\


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

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

    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. +-commutative0.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*0.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-in0.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-def6.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. *-commutative6.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-in6.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-eval6.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-neg6.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. +-commutative6.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*6.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-in6.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. Simplified50.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 x around -inf 76.7%

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

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

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, -1 \cdot \left(\left(-18 \cdot \left(y \cdot \left(t \cdot z\right)\right) + \color{blue}{\left(--4\right)} \cdot i\right) \cdot x\right)\right) \]
      3. cancel-sign-sub-inv76.7%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, -1 \cdot \left(\color{blue}{\left(-18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - -4 \cdot i\right)} \cdot x\right)\right) \]
      4. mul-1-neg76.7%

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{-\left(-18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - -4 \cdot i\right) \cdot x}\right) \]
      5. cancel-sign-sub-inv76.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.8% accurate, 0.5× speedup?

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

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


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

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

    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*13.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-in13.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-sub13.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*13.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*13.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. Simplified13.3%

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

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

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

Alternative 3: 67.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t_3 \leq -1 \cdot 10^{+77}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j 27) k) < -4.99999999999999961e273 or -1.99999999999999987e146 < (*.f64 (*.f64 j 27) k) < -9.99999999999999983e76

    1. Initial program 73.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-neg73.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-73.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-neg73.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-neg73.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--77.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*75.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-in75.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-sub75.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*75.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*75.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. Simplified75.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 i around 0 75.7%

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

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

    if -4.99999999999999961e273 < (*.f64 (*.f64 j 27) k) < -1.99999999999999987e146

    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. 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)} - \left(j \cdot 27\right) \cdot k \]
    3. Taylor expanded in y around inf 57.8%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(\left(\left(z \cdot x\right) \cdot \color{blue}{\left(y \cdot -18\right)}\right) \cdot t\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified53.8%

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

        \[\leadsto \color{blue}{-1 \cdot \left(\left(\left(z \cdot x\right) \cdot \left(y \cdot -18\right)\right) \cdot t\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. mul-1-neg53.8%

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

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

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{\left(j \cdot 27\right) \cdot k}\right) - t \cdot \left(z \cdot \left(x \cdot \left(y \cdot -18\right)\right)\right) \]
      4. distribute-lft-neg-out57.9%

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

        \[\leadsto \color{blue}{k \cdot \left(-j \cdot 27\right)} - t \cdot \left(z \cdot \left(x \cdot \left(y \cdot -18\right)\right)\right) \]
      6. distribute-rgt-neg-in57.9%

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999983e76 < (*.f64 (*.f64 j 27) k) < 5.0000000000000001e29

    1. Initial program 88.5%

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

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

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

    if 5.0000000000000001e29 < (*.f64 (*.f64 j 27) k)

    1. Initial program 84.9%

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

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

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

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

Alternative 4: 86.1% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 50.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-neg50.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-50.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-neg50.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-neg50.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--60.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*70.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-in70.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-sub70.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*70.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*69.9%

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

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

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

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

    if -1.1000000000000001e222 < y < -9.49999999999999998e138

    1. Initial program 75.3%

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

    if -9.49999999999999998e138 < y < 7.60000000000000056e-8

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.60000000000000056e-8 < y

    1. Initial program 79.8%

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

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

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

Alternative 5: 67.1% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.49999999999999999e233 or 3.6999999999999999e-59 < t

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

    if -4.49999999999999999e233 < t < -5.89999999999999978e-65

    1. Initial program 89.6%

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

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

    if -5.89999999999999978e-65 < t < 3.69999999999999993e-231

    1. Initial program 87.5%

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

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

    if 3.69999999999999993e-231 < t < 3.6999999999999999e-59

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+233}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -5.9 \cdot 10^{-65}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-231}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-59}:\\ \;\;\;\;b \cdot c + \left(-27 \cdot \left(j \cdot k\right) + \left(x \cdot 18\right) \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 6: 80.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\left(b \cdot c - \left(t_1 + 4 \cdot \left(x \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\

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


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

    1. Initial program 50.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-neg50.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-50.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-neg50.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-neg50.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--60.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*70.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-in70.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-sub70.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*70.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*69.9%

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

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

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

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

    if -1.41999999999999997e222 < y < -1.54999999999999995e-30

    1. Initial program 82.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. Simplified84.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 91.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)} \]

    if -1.54999999999999995e-30 < y < 5.00000000000000041e-6

    1. Initial program 92.4%

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

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

    if 5.00000000000000041e-6 < y

    1. Initial program 79.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 i around 0 84.3%

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

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

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

Alternative 7: 84.8% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.25e92 or 6.4999999999999997e-72 < t

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.25e92 < t < 6.4999999999999997e-72

    1. Initial program 86.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified90.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 89.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.2%

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

Alternative 8: 54.4% accurate, 1.1× speedup?

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

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

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


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

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

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

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

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

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

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

    if -9.99999999999999953e67 < (*.f64 (*.f64 j 27) k) < 5.0000000000000001e94

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

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

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

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

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

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

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

    if 5.0000000000000001e94 < (*.f64 (*.f64 j 27) k)

    1. Initial program 82.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 -inf 76.6%

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

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

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

Alternative 9: 67.1% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 78.2%

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

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

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

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

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

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

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

    if -9.99999999999999983e76 < (*.f64 (*.f64 j 27) k) < 5.0000000000000001e29

    1. Initial program 88.5%

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

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

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

    if 5.0000000000000001e29 < (*.f64 (*.f64 j 27) k)

    1. Initial program 84.9%

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

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

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

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

Alternative 10: 64.9% accurate, 1.2× speedup?

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

\mathbf{elif}\;t \leq -1.85 \cdot 10^{-65}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 1.34 \cdot 10^{+101} \lor \neg \left(t \leq 2.3 \cdot 10^{+216}\right):\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.7999999999999999e232 or 1.1199999999999999e-142 < t < 1.3399999999999999e101 or 2.29999999999999996e216 < t

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

    if -8.7999999999999999e232 < t < -1.85e-65 or 1.3399999999999999e101 < t < 2.29999999999999996e216

    1. Initial program 86.4%

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

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

    if -1.85e-65 < t < 1.1199999999999999e-142

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.8 \cdot 10^{+232}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-65}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-142}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 1.34 \cdot 10^{+101} \lor \neg \left(t \leq 2.3 \cdot 10^{+216}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

Alternative 11: 53.2% accurate, 1.2× speedup?

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

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

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


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

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

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

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

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

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

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

    if -9.99999999999999953e67 < (*.f64 (*.f64 j 27) k) < 1.00000000000000005e236

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e236 < (*.f64 (*.f64 j 27) k)

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right) - j \cdot \left(27 \cdot k\right)} \]
      2. distribute-lft-neg-in88.4%

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

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

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

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) - \color{blue}{k \cdot \left(j \cdot 27\right)} \]
    9. Applied egg-rr88.4%

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

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

Alternative 12: 76.9% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.9999999999999998e102

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999998e102 < t < 7.1999999999999998e-134

    1. Initial program 88.1%

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

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

    if 7.1999999999999998e-134 < t

    1. Initial program 79.3%

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

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

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

Alternative 13: 45.4% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-89}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+109}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -2.49999999999999988e246

    1. Initial program 70.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-neg70.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-70.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-neg70.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-neg70.0%

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

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

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

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

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

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

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

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

    if -2.49999999999999988e246 < t < -1.74999999999999992e109

    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. Taylor expanded in y around 0 85.1%

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

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

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

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

    if -1.74999999999999992e109 < t < 1.1199999999999999e-142 or 5.79999999999999984e-89 < t < 2.15e8

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1199999999999999e-142 < t < 5.79999999999999984e-89 or 2.15e8 < t < 4.2000000000000003e109

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000003e109 < t < 5.1000000000000002e188

    1. Initial program 76.5%

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

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

    if 5.1000000000000002e188 < t

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+246}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{+109}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-142}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-89}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 215000000:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+109}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{+188}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 14: 62.0% accurate, 1.3× speedup?

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

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 6 \cdot 10^{+197}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.00000000000000006e56

    1. Initial program 76.3%

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

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

    if -3.00000000000000006e56 < z < 1.95e49 or 9.0000000000000003e129 < z < 6.0000000000000004e197

    1. Initial program 89.4%

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

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

    if 1.95e49 < z < 9.0000000000000003e129

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

    if 6.0000000000000004e197 < z

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\left(\left(z \cdot x\right) \cdot \left(y \cdot -18\right)\right) \cdot t\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. mul-1-neg73.1%

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

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

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

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

      \[\leadsto \color{blue}{\left(-t \cdot \left(z \cdot \left(x \cdot \left(y \cdot -18\right)\right)\right)\right) + \left(-j \cdot \left(27 \cdot k\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative73.2%

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

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

        \[\leadsto \left(-\color{blue}{\left(j \cdot 27\right) \cdot k}\right) - t \cdot \left(z \cdot \left(x \cdot \left(y \cdot -18\right)\right)\right) \]
      4. distribute-lft-neg-out73.2%

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

        \[\leadsto \color{blue}{k \cdot \left(-j \cdot 27\right)} - t \cdot \left(z \cdot \left(x \cdot \left(y \cdot -18\right)\right)\right) \]
      6. distribute-rgt-neg-in73.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+56}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+49}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+129}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+197}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) - y \cdot \left(-18 \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 15: 71.9% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.50000000000000009e-69 or 6.2000000000000001e-164 < t

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

    if -4.50000000000000009e-69 < t < 6.2000000000000001e-164

    1. Initial program 88.1%

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

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

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

Alternative 16: 71.9% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.72e-69

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.72e-69 < t < 6.2000000000000001e-164

    1. Initial program 88.1%

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

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

    if 6.2000000000000001e-164 < t

    1. Initial program 79.8%

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

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

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

Alternative 17: 46.6% accurate, 1.5× speedup?

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-143}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-59}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 8.4 \cdot 10^{+217}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.70000000000000024e-75 or 3.5000000000000001e-59 < t < 8.4000000000000003e217

    1. Initial program 84.7%

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

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

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

    if -3.70000000000000024e-75 < t < 7.5000000000000003e-143 or 5.50000000000000012e-89 < t < 3.5000000000000001e-59

    1. Initial program 84.9%

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

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

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

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

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

    if 7.5000000000000003e-143 < t < 5.50000000000000012e-89

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

    if 8.4000000000000003e217 < t

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-75}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-143}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-89}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-59}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 8.4 \cdot 10^{+217}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 18: 46.5% accurate, 1.5× speedup?

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-142}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{-59}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+217}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.54999999999999996e-83 or 4.0000000000000001e-59 < t < 7.79999999999999986e217

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right) - j \cdot \left(27 \cdot k\right)} \]
      2. distribute-lft-neg-in57.1%

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

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

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

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

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

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

    if -1.54999999999999996e-83 < t < 1.1199999999999999e-142 or 5.50000000000000012e-89 < t < 4.0000000000000001e-59

    1. Initial program 84.9%

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

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

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

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

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

    if 1.1199999999999999e-142 < t < 5.50000000000000012e-89

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

    if 7.79999999999999986e217 < t

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{-83}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-142}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-89}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-59}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+217}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 19: 46.7% accurate, 1.5× speedup?

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

\mathbf{elif}\;y \leq -7.2 \cdot 10^{-28}:\\
\;\;\;\;b \cdot c - t_2\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-290}:\\
\;\;\;\;t_1 - \left(j \cdot 27\right) \cdot k\\

\mathbf{elif}\;y \leq 2.1 \cdot 10^{-44}:\\
\;\;\;\;27 \cdot \left(-j \cdot k\right) - 4 \cdot \left(x \cdot i\right)\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-6}:\\
\;\;\;\;t_1 - t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -6.9999999999999999e171

    1. Initial program 64.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-neg64.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-64.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-neg64.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-neg64.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--73.2%

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

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

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

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

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

    if -6.9999999999999999e171 < y < -7.1999999999999997e-28

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.1999999999999997e-28 < y < -1.2e-290

    1. Initial program 92.8%

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

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

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

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

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

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

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot 4\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. sub-neg64.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right) + \left(-j \cdot \left(27 \cdot k\right)\right)} \]
    8. Step-by-step derivation
      1. unsub-neg64.2%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right) - j \cdot \left(27 \cdot k\right)} \]
      2. distribute-lft-neg-in64.2%

        \[\leadsto \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)} - j \cdot \left(27 \cdot k\right) \]
      3. metadata-eval64.2%

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

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

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) - \color{blue}{k \cdot \left(j \cdot 27\right)} \]
    9. Applied egg-rr64.2%

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

    if -1.2e-290 < y < 2.10000000000000001e-44

    1. Initial program 92.9%

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

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

    if 2.10000000000000001e-44 < y < 3.0000000000000001e-6

    1. Initial program 77.8%

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

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

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

    if 3.0000000000000001e-6 < y

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-28}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-290}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-44}:\\ \;\;\;\;27 \cdot \left(-j \cdot k\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-6}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 20: 40.4% accurate, 1.6× speedup?

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

\mathbf{elif}\;j \leq -1.26 \cdot 10^{+33}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;j \leq -4 \cdot 10^{-26}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq -8.5 \cdot 10^{-241}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;j \leq -3 \cdot 10^{-295}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq 2.8 \cdot 10^{-276}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\

\mathbf{elif}\;j \leq 3.1 \cdot 10^{-37}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.18e170 < j < -1.26e33 or -4.0000000000000002e-26 < j < -8.49999999999999974e-241

    1. Initial program 89.1%

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

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

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

    if -1.26e33 < j < -4.0000000000000002e-26 or -8.49999999999999974e-241 < j < -2.99999999999999996e-295 or 2.79999999999999986e-276 < j < 3.09999999999999993e-37

    1. Initial program 87.8%

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

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

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

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

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

    if -2.99999999999999996e-295 < j < 2.79999999999999986e-276

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.09999999999999993e-37 < j

    1. Initial program 81.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.18 \cdot 10^{+170}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;j \leq -1.26 \cdot 10^{+33}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq -4 \cdot 10^{-26}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq -8.5 \cdot 10^{-241}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq -3 \cdot 10^{-295}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 2.8 \cdot 10^{-276}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 3.1 \cdot 10^{-37}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 21: 31.4% accurate, 1.6× speedup?

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

\mathbf{elif}\;t \leq -4 \cdot 10^{+92}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 1.75 \cdot 10^{+182}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.80000000000000026e236 or 1.75000000000000011e182 < t

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

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

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

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

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

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

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

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

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

    if -4.80000000000000026e236 < t < -4.0000000000000002e92 or 3.20000000000000012e122 < t < 1.75000000000000011e182

    1. Initial program 89.8%

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

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

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

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

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

    if -4.0000000000000002e92 < t < 7.5000000000000003e-143

    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. Step-by-step derivation
      1. sub-neg87.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. +-commutative87.5%

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

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

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def88.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. *-commutative88.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-in88.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-eval88.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-neg88.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. +-commutative88.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*88.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-in88.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. Simplified88.4%

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

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

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

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

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

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

    if 7.5000000000000003e-143 < t < 3.20000000000000012e122

    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. associate-+l-81.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-neg81.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-neg81.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--81.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*79.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+236}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+92}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-143}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+122}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+182}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 22: 31.3% accurate, 1.6× speedup?

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

\mathbf{elif}\;t \leq -3.8 \cdot 10^{+93}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 1.85 \cdot 10^{+183}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.5999999999999997e250

    1. Initial program 70.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-neg70.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-70.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-neg70.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-neg70.0%

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

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

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

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

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

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

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

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

    if -3.5999999999999997e250 < t < -3.7999999999999998e93 or 2.54999999999999986e123 < t < 1.8500000000000001e183

    1. Initial program 89.8%

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

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

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

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

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

    if -3.7999999999999998e93 < t < 5.2000000000000002e-144

    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. Step-by-step derivation
      1. sub-neg87.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. +-commutative87.5%

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

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

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def88.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. *-commutative88.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-in88.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-eval88.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-neg88.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. +-commutative88.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*88.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-in88.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. Simplified88.4%

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

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

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

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

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

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

    if 5.2000000000000002e-144 < t < 2.54999999999999986e123

    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. associate-+l-81.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-neg81.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-neg81.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--81.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*79.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.8500000000000001e183 < t

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+250}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{+93}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-144}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+123}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+183}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 23: 31.5% accurate, 1.8× speedup?

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

\mathbf{elif}\;j \leq -6.2 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;j \leq -3.1 \cdot 10^{+33}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;j \leq -1 \cdot 10^{-297}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq 6.2 \cdot 10^{-277}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\

\mathbf{elif}\;j \leq 2 \cdot 10^{-37}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 82.9%

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

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

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

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

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

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

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

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

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

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

    if -1.74999999999999989e127 < j < -6.1999999999999999e73

    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. Taylor expanded in y around 0 84.3%

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

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

    if -6.1999999999999999e73 < j < -3.1e33 or 2.00000000000000013e-37 < j

    1. Initial program 83.0%

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

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

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

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

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def84.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. *-commutative84.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-in84.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-eval84.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-neg84.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. +-commutative84.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*84.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-in84.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. Simplified85.2%

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

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

    if -3.1e33 < j < -1.00000000000000004e-297 or 6.19999999999999958e-277 < j < 2.00000000000000013e-37

    1. Initial program 88.1%

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

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

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

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

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

    if -1.00000000000000004e-297 < j < 6.19999999999999958e-277

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.75 \cdot 10^{+127}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;j \leq -6.2 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;j \leq -3.1 \cdot 10^{+33}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -1 \cdot 10^{-297}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;j \leq 6.2 \cdot 10^{-277}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;j \leq 2 \cdot 10^{-37}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 24: 31.1% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+123} \lor \neg \left(t \leq 5 \cdot 10^{+183}\right):\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.59999999999999999e96 or 3.59999999999999998e123 < t < 5.00000000000000009e183

    1. Initial program 86.4%

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

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

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

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

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

    if -5.59999999999999999e96 < t < 6.4999999999999999e-143

    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. Step-by-step derivation
      1. sub-neg87.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. +-commutative87.5%

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

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

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def88.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. *-commutative88.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-in88.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-eval88.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-neg88.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. +-commutative88.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*88.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-in88.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. Simplified88.4%

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

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

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

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

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

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

    if 6.4999999999999999e-143 < t < 3.59999999999999998e123 or 5.00000000000000009e183 < t

    1. Initial program 80.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-neg80.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-80.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-neg80.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-neg80.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--82.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*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*80.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. Simplified80.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 58.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+96}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-143}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+123} \lor \neg \left(t \leq 5 \cdot 10^{+183}\right):\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \end{array} \]

Alternative 25: 33.2% accurate, 3.4× speedup?

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

\mathbf{elif}\;c \leq 3.5 \cdot 10^{+71}:\\
\;\;\;\;-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 c < -3.5000000000000002e24 or 3.4999999999999999e71 < c

    1. Initial program 77.8%

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

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

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

    if -3.5000000000000002e24 < c < 3.4999999999999999e71

    1. Initial program 89.7%

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

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

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

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def90.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. *-commutative90.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-in90.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-eval90.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-neg90.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. +-commutative90.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*90.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-in90.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. Simplified93.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 35.5%

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

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

Alternative 26: 33.2% accurate, 3.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -3.4999999999999999e26 or 1.6499999999999999e71 < c

    1. Initial program 77.8%

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

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

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

    if -3.4999999999999999e26 < c < 1.6499999999999999e71

    1. Initial program 89.7%

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

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

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

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. fma-def90.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. *-commutative90.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-in90.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-eval90.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-neg90.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. +-commutative90.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*90.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-in90.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. Simplified93.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 35.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.5 \cdot 10^{+26}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 1.65 \cdot 10^{+71}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 27: 24.3% accurate, 10.3× speedup?

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

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

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

    \[\leadsto \color{blue}{c \cdot b} \]
  4. Final simplification20.0%

    \[\leadsto b \cdot c \]

Developer target: 88.8% 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 2023214 
(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)))