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

Percentage Accurate: 85.1% → 90.3%
Time: 39.7s
Alternatives: 22
Speedup: 1.0×

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 22 alternatives:

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

Initial Program: 85.1% accurate, 1.0× speedup?

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

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

Alternative 1: 90.3% accurate, 0.0× speedup?

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

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

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


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

    1. Initial program 72.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 a around 0 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e62 < x < 3.8000000000000001e-97

    1. Initial program 90.6%

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative88.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*92.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative92.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*92.1%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified92.1%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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) \]
    6. Step-by-step derivation
      1. add-cube-cbrt91.6%

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

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

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

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

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

    if 3.8000000000000001e-97 < x

    1. Initial program 84.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{+62}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, \left(y \cdot z\right) \cdot t, i \cdot -4\right), b \cdot c\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-97}:\\ \;\;\;\;\sqrt[3]{\mathsf{fma}\left(t, z \cdot \left(x \cdot \left(18 \cdot y\right)\right) - a \cdot 4, b \cdot c\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(t, z \cdot \left(x \cdot \left(18 \cdot y\right)\right) - a \cdot 4, b \cdot c\right)} \cdot \sqrt[3]{\mathsf{fma}\left(t, z \cdot \left(x \cdot \left(18 \cdot y\right)\right) - a \cdot 4, b \cdot c\right)}\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

Alternative 2: 90.4% 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(y \cdot z\right) \cdot t\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;x \leq -9 \cdot 10^{+61}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t_1, i \cdot -4\right), b \cdot c\right) - t_2\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-97}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(z \cdot \left(x \cdot \left(18 \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot t_1 - i \cdot 4\right)\right) - 4 \cdot \left(t \cdot a\right)\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 z) t)) (t_2 (* (* j 27.0) k)))
   (if (<= x -9e+61)
     (- (fma x (fma 18.0 t_1 (* i -4.0)) (* b c)) t_2)
     (if (<= x 3.5e-97)
       (-
        (+ (* b c) (* t (- (* z (* x (* 18.0 y))) (* a 4.0))))
        (+ (* x (* i 4.0)) (* j (* 27.0 k))))
       (-
        (- (+ (* b c) (* x (- (* 18.0 t_1) (* i 4.0)))) (* 4.0 (* t a)))
        t_2)))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (y * z) * t;
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (x <= -9e+61) {
		tmp = fma(x, fma(18.0, t_1, (i * -4.0)), (b * c)) - t_2;
	} else if (x <= 3.5e-97) {
		tmp = ((b * c) + (t * ((z * (x * (18.0 * y))) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (27.0 * k)));
	} else {
		tmp = (((b * c) + (x * ((18.0 * t_1) - (i * 4.0)))) - (4.0 * (t * a))) - 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(y * z) * t)
	t_2 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (x <= -9e+61)
		tmp = Float64(fma(x, fma(18.0, t_1, Float64(i * -4.0)), Float64(b * c)) - t_2);
	elseif (x <= 3.5e-97)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(x * Float64(18.0 * y))) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(27.0 * k))));
	else
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * t_1) - Float64(i * 4.0)))) - Float64(4.0 * Float64(t * a))) - t_2);
	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[(y * z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[x, -9e+61], N[(N[(x * N[(18.0 * t$95$1 + N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[x, 3.5e-97], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $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 := \left(y \cdot z\right) \cdot t\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;x \leq -9 \cdot 10^{+61}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t_1, i \cdot -4\right), b \cdot c\right) - t_2\\

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

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


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

    1. Initial program 72.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 a around 0 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9e61 < x < 3.50000000000000019e-97

    1. Initial program 90.6%

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative88.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*92.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative92.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*92.1%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified92.1%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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 3.50000000000000019e-97 < x

    1. Initial program 84.3%

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

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

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

Alternative 3: 51.1% accurate, 0.6× 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 -2 \cdot 10^{+298}:\\ \;\;\;\;4 \cdot \left(x \cdot \left(-i\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t_1 \leq -4 \cdot 10^{+16}:\\ \;\;\;\;b \cdot c - t_1\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{-227}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{-120}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+15}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+80}:\\ \;\;\;\;t \cdot \left(-4 \cdot a\right) - t_1\\ \mathbf{elif}\;t_1 \leq 10^{+124}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\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 -2e+298)
     (- (* 4.0 (* x (- i))) (* 27.0 (* j k)))
     (if (<= t_1 -4e+16)
       (- (* b c) t_1)
       (if (<= t_1 2e-227)
         (* x (- (* i (- 4.0)) (* -18.0 (* z (* y t)))))
         (if (<= t_1 2e-120)
           (* b c)
           (if (<= t_1 5e+15)
             (* x (- (* 18.0 (* (* y z) t)) (* i 4.0)))
             (if (<= t_1 2e+80)
               (- (* t (* -4.0 a)) t_1)
               (if (<= t_1 1e+124)
                 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
                 (- (* -4.0 (* x i)) 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 <= -2e+298) {
		tmp = (4.0 * (x * -i)) - (27.0 * (j * k));
	} else if (t_1 <= -4e+16) {
		tmp = (b * c) - t_1;
	} else if (t_1 <= 2e-227) {
		tmp = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	} else if (t_1 <= 2e-120) {
		tmp = b * c;
	} else if (t_1 <= 5e+15) {
		tmp = x * ((18.0 * ((y * z) * t)) - (i * 4.0));
	} else if (t_1 <= 2e+80) {
		tmp = (t * (-4.0 * a)) - t_1;
	} else if (t_1 <= 1e+124) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else {
		tmp = (-4.0 * (x * i)) - 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 <= (-2d+298)) then
        tmp = (4.0d0 * (x * -i)) - (27.0d0 * (j * k))
    else if (t_1 <= (-4d+16)) then
        tmp = (b * c) - t_1
    else if (t_1 <= 2d-227) then
        tmp = x * ((i * -4.0d0) - ((-18.0d0) * (z * (y * t))))
    else if (t_1 <= 2d-120) then
        tmp = b * c
    else if (t_1 <= 5d+15) then
        tmp = x * ((18.0d0 * ((y * z) * t)) - (i * 4.0d0))
    else if (t_1 <= 2d+80) then
        tmp = (t * ((-4.0d0) * a)) - t_1
    else if (t_1 <= 1d+124) then
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    else
        tmp = ((-4.0d0) * (x * i)) - 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 <= -2e+298) {
		tmp = (4.0 * (x * -i)) - (27.0 * (j * k));
	} else if (t_1 <= -4e+16) {
		tmp = (b * c) - t_1;
	} else if (t_1 <= 2e-227) {
		tmp = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	} else if (t_1 <= 2e-120) {
		tmp = b * c;
	} else if (t_1 <= 5e+15) {
		tmp = x * ((18.0 * ((y * z) * t)) - (i * 4.0));
	} else if (t_1 <= 2e+80) {
		tmp = (t * (-4.0 * a)) - t_1;
	} else if (t_1 <= 1e+124) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else {
		tmp = (-4.0 * (x * i)) - 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 <= -2e+298:
		tmp = (4.0 * (x * -i)) - (27.0 * (j * k))
	elif t_1 <= -4e+16:
		tmp = (b * c) - t_1
	elif t_1 <= 2e-227:
		tmp = x * ((i * -4.0) - (-18.0 * (z * (y * t))))
	elif t_1 <= 2e-120:
		tmp = b * c
	elif t_1 <= 5e+15:
		tmp = x * ((18.0 * ((y * z) * t)) - (i * 4.0))
	elif t_1 <= 2e+80:
		tmp = (t * (-4.0 * a)) - t_1
	elif t_1 <= 1e+124:
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	else:
		tmp = (-4.0 * (x * i)) - 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 <= -2e+298)
		tmp = Float64(Float64(4.0 * Float64(x * Float64(-i))) - Float64(27.0 * Float64(j * k)));
	elseif (t_1 <= -4e+16)
		tmp = Float64(Float64(b * c) - t_1);
	elseif (t_1 <= 2e-227)
		tmp = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(-18.0 * Float64(z * Float64(y * t)))));
	elseif (t_1 <= 2e-120)
		tmp = Float64(b * c);
	elseif (t_1 <= 5e+15)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(Float64(y * z) * t)) - Float64(i * 4.0)));
	elseif (t_1 <= 2e+80)
		tmp = Float64(Float64(t * Float64(-4.0 * a)) - t_1);
	elseif (t_1 <= 1e+124)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	else
		tmp = Float64(Float64(-4.0 * Float64(x * i)) - 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 <= -2e+298)
		tmp = (4.0 * (x * -i)) - (27.0 * (j * k));
	elseif (t_1 <= -4e+16)
		tmp = (b * c) - t_1;
	elseif (t_1 <= 2e-227)
		tmp = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	elseif (t_1 <= 2e-120)
		tmp = b * c;
	elseif (t_1 <= 5e+15)
		tmp = x * ((18.0 * ((y * z) * t)) - (i * 4.0));
	elseif (t_1 <= 2e+80)
		tmp = (t * (-4.0 * a)) - t_1;
	elseif (t_1 <= 1e+124)
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	else
		tmp = (-4.0 * (x * i)) - 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, -2e+298], N[(N[(4.0 * N[(x * (-i)), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+16], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 2e-227], N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(-18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-120], N[(b * c), $MachinePrecision], If[LessEqual[t$95$1, 5e+15], N[(x * N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+80], N[(N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e+124], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(x * i), $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 -2 \cdot 10^{+298}:\\
\;\;\;\;4 \cdot \left(x \cdot \left(-i\right)\right) - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;t_1 \leq -4 \cdot 10^{+16}:\\
\;\;\;\;b \cdot c - t_1\\

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if (*.f64 (*.f64 j 27) k) < -1.9999999999999999e298

    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. Taylor expanded in b around 0 70.0%

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

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

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

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

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

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

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

    if -1.9999999999999999e298 < (*.f64 (*.f64 j 27) k) < -4e16

    1. Initial program 95.3%

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

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

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

    if -4e16 < (*.f64 (*.f64 j 27) k) < 1.99999999999999989e-227

    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. Simplified87.2%

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative87.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*86.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative86.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*86.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified86.0%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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) \]
    6. Taylor expanded in x around -inf 55.3%

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

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

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

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

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

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

    if 1.99999999999999989e-227 < (*.f64 (*.f64 j 27) k) < 1.99999999999999996e-120

    1. Initial program 77.1%

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

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

    if 1.99999999999999996e-120 < (*.f64 (*.f64 j 27) k) < 5e15

    1. Initial program 91.0%

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

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

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

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

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

    if 9.99999999999999948e123 < (*.f64 (*.f64 j 27) k)

    1. Initial program 88.2%

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

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

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

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

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

Alternative 4: 71.9% accurate, 0.9× 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 := x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right) - t_1\\ t_3 := -4 \cdot \left(t \cdot a\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{if}\;x \leq -6.5 \cdot 10^{+148}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.4 \cdot 10^{+130}:\\ \;\;\;\;b \cdot c - t_1\\ \mathbf{elif}\;x \leq -2.05 \cdot 10^{+105}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{+52}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-92}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.38 \cdot 10^{+82}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+151}:\\ \;\;\;\;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 (- (* x (- (* 18.0 (* (* y z) t)) (* i 4.0))) t_1))
        (t_3 (+ (* -4.0 (* t a)) (- (* b c) (* j (* 27.0 k))))))
   (if (<= x -6.5e+148)
     t_2
     (if (<= x -8.4e+130)
       (- (* b c) t_1)
       (if (<= x -2.05e+105)
         (- (* 18.0 (* t (* x (* y z)))) (* 4.0 (+ (* t a) (* x i))))
         (if (<= x -5.6e+52)
           (- (- (* b c) (* 4.0 (* x i))) t_1)
           (if (<= x -4.9e-92)
             t_2
             (if (<= x 1.38e+82)
               t_3
               (if (<= x 3.8e+111)
                 (* x (- (* i (- 4.0)) (* -18.0 (* z (* y t)))))
                 (if (<= x 3.8e+151) 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 = (x * ((18.0 * ((y * z) * t)) - (i * 4.0))) - t_1;
	double t_3 = (-4.0 * (t * a)) + ((b * c) - (j * (27.0 * k)));
	double tmp;
	if (x <= -6.5e+148) {
		tmp = t_2;
	} else if (x <= -8.4e+130) {
		tmp = (b * c) - t_1;
	} else if (x <= -2.05e+105) {
		tmp = (18.0 * (t * (x * (y * z)))) - (4.0 * ((t * a) + (x * i)));
	} else if (x <= -5.6e+52) {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	} else if (x <= -4.9e-92) {
		tmp = t_2;
	} else if (x <= 1.38e+82) {
		tmp = t_3;
	} else if (x <= 3.8e+111) {
		tmp = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	} else if (x <= 3.8e+151) {
		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 = (x * ((18.0d0 * ((y * z) * t)) - (i * 4.0d0))) - t_1
    t_3 = ((-4.0d0) * (t * a)) + ((b * c) - (j * (27.0d0 * k)))
    if (x <= (-6.5d+148)) then
        tmp = t_2
    else if (x <= (-8.4d+130)) then
        tmp = (b * c) - t_1
    else if (x <= (-2.05d+105)) then
        tmp = (18.0d0 * (t * (x * (y * z)))) - (4.0d0 * ((t * a) + (x * i)))
    else if (x <= (-5.6d+52)) then
        tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
    else if (x <= (-4.9d-92)) then
        tmp = t_2
    else if (x <= 1.38d+82) then
        tmp = t_3
    else if (x <= 3.8d+111) then
        tmp = x * ((i * -4.0d0) - ((-18.0d0) * (z * (y * t))))
    else if (x <= 3.8d+151) 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 = (x * ((18.0 * ((y * z) * t)) - (i * 4.0))) - t_1;
	double t_3 = (-4.0 * (t * a)) + ((b * c) - (j * (27.0 * k)));
	double tmp;
	if (x <= -6.5e+148) {
		tmp = t_2;
	} else if (x <= -8.4e+130) {
		tmp = (b * c) - t_1;
	} else if (x <= -2.05e+105) {
		tmp = (18.0 * (t * (x * (y * z)))) - (4.0 * ((t * a) + (x * i)));
	} else if (x <= -5.6e+52) {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	} else if (x <= -4.9e-92) {
		tmp = t_2;
	} else if (x <= 1.38e+82) {
		tmp = t_3;
	} else if (x <= 3.8e+111) {
		tmp = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	} else if (x <= 3.8e+151) {
		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 = (x * ((18.0 * ((y * z) * t)) - (i * 4.0))) - t_1
	t_3 = (-4.0 * (t * a)) + ((b * c) - (j * (27.0 * k)))
	tmp = 0
	if x <= -6.5e+148:
		tmp = t_2
	elif x <= -8.4e+130:
		tmp = (b * c) - t_1
	elif x <= -2.05e+105:
		tmp = (18.0 * (t * (x * (y * z)))) - (4.0 * ((t * a) + (x * i)))
	elif x <= -5.6e+52:
		tmp = ((b * c) - (4.0 * (x * i))) - t_1
	elif x <= -4.9e-92:
		tmp = t_2
	elif x <= 1.38e+82:
		tmp = t_3
	elif x <= 3.8e+111:
		tmp = x * ((i * -4.0) - (-18.0 * (z * (y * t))))
	elif x <= 3.8e+151:
		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(x * Float64(Float64(18.0 * Float64(Float64(y * z) * t)) - Float64(i * 4.0))) - t_1)
	t_3 = Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(b * c) - Float64(j * Float64(27.0 * k))))
	tmp = 0.0
	if (x <= -6.5e+148)
		tmp = t_2;
	elseif (x <= -8.4e+130)
		tmp = Float64(Float64(b * c) - t_1);
	elseif (x <= -2.05e+105)
		tmp = Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i))));
	elseif (x <= -5.6e+52)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1);
	elseif (x <= -4.9e-92)
		tmp = t_2;
	elseif (x <= 1.38e+82)
		tmp = t_3;
	elseif (x <= 3.8e+111)
		tmp = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(-18.0 * Float64(z * Float64(y * t)))));
	elseif (x <= 3.8e+151)
		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 = (x * ((18.0 * ((y * z) * t)) - (i * 4.0))) - t_1;
	t_3 = (-4.0 * (t * a)) + ((b * c) - (j * (27.0 * k)));
	tmp = 0.0;
	if (x <= -6.5e+148)
		tmp = t_2;
	elseif (x <= -8.4e+130)
		tmp = (b * c) - t_1;
	elseif (x <= -2.05e+105)
		tmp = (18.0 * (t * (x * (y * z)))) - (4.0 * ((t * a) + (x * i)));
	elseif (x <= -5.6e+52)
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	elseif (x <= -4.9e-92)
		tmp = t_2;
	elseif (x <= 1.38e+82)
		tmp = t_3;
	elseif (x <= 3.8e+111)
		tmp = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	elseif (x <= 3.8e+151)
		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[(x * N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.5e+148], t$95$2, If[LessEqual[x, -8.4e+130], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, -2.05e+105], N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.6e+52], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, -4.9e-92], t$95$2, If[LessEqual[x, 1.38e+82], t$95$3, If[LessEqual[x, 3.8e+111], N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(-18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+151], 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 := x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right) - t_1\\
t_3 := -4 \cdot \left(t \cdot a\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{if}\;x \leq -6.5 \cdot 10^{+148}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -8.4 \cdot 10^{+130}:\\
\;\;\;\;b \cdot c - t_1\\

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

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

\mathbf{elif}\;x \leq -4.9 \cdot 10^{-92}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 1.38 \cdot 10^{+82}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;x \leq 3.8 \cdot 10^{+151}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -6.49999999999999947e148 or -5.6e52 < x < -4.9e-92 or 3.8e151 < x

    1. Initial program 80.1%

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

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

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

    if -6.49999999999999947e148 < x < -8.39999999999999962e130

    1. Initial program 34.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 66.4%

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

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

    if -8.39999999999999962e130 < x < -2.0500000000000001e105

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

    if -2.0500000000000001e105 < x < -5.6e52

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

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

    if -4.9e-92 < x < 1.3799999999999999e82 or 3.79999999999999976e111 < x < 3.8e151

    1. Initial program 92.2%

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+81.5%

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

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

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

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

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

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

    if 1.3799999999999999e82 < x < 3.79999999999999976e111

    1. Initial program 43.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. Simplified62.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)} \]
    3. Taylor expanded in x around 0 62.6%

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative62.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*43.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative43.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*43.5%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified43.5%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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) \]
    6. Taylor expanded in x around -inf 81.0%

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv81.0%

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

        \[\leadsto -x \cdot \left(-18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(--4\right) \cdot i\right) \]
      4. metadata-eval99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq -8.4 \cdot 10^{+130}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq -2.05 \cdot 10^{+105}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{+52}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 1.38 \cdot 10^{+82}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+151}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

Alternative 5: 90.2% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 62.3%

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

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

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

    if -5.2e132 < x < 1.00000000000000004e-97

    1. Initial program 90.5%

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative88.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*91.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative91.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*91.8%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified91.8%

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

    if 1.00000000000000004e-97 < x

    1. Initial program 84.3%

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

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

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

Alternative 6: 88.6% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.69999999999999995e131

    1. Initial program 62.3%

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

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

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

    if -3.69999999999999995e131 < x

    1. Initial program 88.4%

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative89.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*89.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative89.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*89.8%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified89.8%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.5%

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

Alternative 7: 68.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 := -4 \cdot \left(t \cdot a\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ t_2 := x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ t_3 := x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right)\\ \mathbf{if}\;x \leq -9.5 \cdot 10^{+187}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+133}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{+91}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -5.9 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-80}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+82}:\\ \;\;\;\;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)) (- (* b c) (* j (* 27.0 k)))))
        (t_2 (* x (- (* i (- 4.0)) (* -18.0 (* z (* y t))))))
        (t_3 (* x (- (* 18.0 (* (* y z) t)) (* i 4.0)))))
   (if (<= x -9.5e+187)
     t_3
     (if (<= x -1.9e+133)
       (- (* b c) (* (* j 27.0) k))
       (if (<= x -3.1e+91)
         t_2
         (if (<= x -5.9e+26)
           t_1
           (if (<= x -2.1e-80) t_3 (if (<= x 2.2e+82) 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)) + ((b * c) - (j * (27.0 * k)));
	double t_2 = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	double t_3 = x * ((18.0 * ((y * z) * t)) - (i * 4.0));
	double tmp;
	if (x <= -9.5e+187) {
		tmp = t_3;
	} else if (x <= -1.9e+133) {
		tmp = (b * c) - ((j * 27.0) * k);
	} else if (x <= -3.1e+91) {
		tmp = t_2;
	} else if (x <= -5.9e+26) {
		tmp = t_1;
	} else if (x <= -2.1e-80) {
		tmp = t_3;
	} else if (x <= 2.2e+82) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = ((-4.0d0) * (t * a)) + ((b * c) - (j * (27.0d0 * k)))
    t_2 = x * ((i * -4.0d0) - ((-18.0d0) * (z * (y * t))))
    t_3 = x * ((18.0d0 * ((y * z) * t)) - (i * 4.0d0))
    if (x <= (-9.5d+187)) then
        tmp = t_3
    else if (x <= (-1.9d+133)) then
        tmp = (b * c) - ((j * 27.0d0) * k)
    else if (x <= (-3.1d+91)) then
        tmp = t_2
    else if (x <= (-5.9d+26)) then
        tmp = t_1
    else if (x <= (-2.1d-80)) then
        tmp = t_3
    else if (x <= 2.2d+82) 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)) + ((b * c) - (j * (27.0 * k)));
	double t_2 = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	double t_3 = x * ((18.0 * ((y * z) * t)) - (i * 4.0));
	double tmp;
	if (x <= -9.5e+187) {
		tmp = t_3;
	} else if (x <= -1.9e+133) {
		tmp = (b * c) - ((j * 27.0) * k);
	} else if (x <= -3.1e+91) {
		tmp = t_2;
	} else if (x <= -5.9e+26) {
		tmp = t_1;
	} else if (x <= -2.1e-80) {
		tmp = t_3;
	} else if (x <= 2.2e+82) {
		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)) + ((b * c) - (j * (27.0 * k)))
	t_2 = x * ((i * -4.0) - (-18.0 * (z * (y * t))))
	t_3 = x * ((18.0 * ((y * z) * t)) - (i * 4.0))
	tmp = 0
	if x <= -9.5e+187:
		tmp = t_3
	elif x <= -1.9e+133:
		tmp = (b * c) - ((j * 27.0) * k)
	elif x <= -3.1e+91:
		tmp = t_2
	elif x <= -5.9e+26:
		tmp = t_1
	elif x <= -2.1e-80:
		tmp = t_3
	elif x <= 2.2e+82:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(b * c) - Float64(j * Float64(27.0 * k))))
	t_2 = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(-18.0 * Float64(z * Float64(y * t)))))
	t_3 = Float64(x * Float64(Float64(18.0 * Float64(Float64(y * z) * t)) - Float64(i * 4.0)))
	tmp = 0.0
	if (x <= -9.5e+187)
		tmp = t_3;
	elseif (x <= -1.9e+133)
		tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k));
	elseif (x <= -3.1e+91)
		tmp = t_2;
	elseif (x <= -5.9e+26)
		tmp = t_1;
	elseif (x <= -2.1e-80)
		tmp = t_3;
	elseif (x <= 2.2e+82)
		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)) + ((b * c) - (j * (27.0 * k)));
	t_2 = x * ((i * -4.0) - (-18.0 * (z * (y * t))));
	t_3 = x * ((18.0 * ((y * z) * t)) - (i * 4.0));
	tmp = 0.0;
	if (x <= -9.5e+187)
		tmp = t_3;
	elseif (x <= -1.9e+133)
		tmp = (b * c) - ((j * 27.0) * k);
	elseif (x <= -3.1e+91)
		tmp = t_2;
	elseif (x <= -5.9e+26)
		tmp = t_1;
	elseif (x <= -2.1e-80)
		tmp = t_3;
	elseif (x <= 2.2e+82)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(-18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.5e+187], t$95$3, If[LessEqual[x, -1.9e+133], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.1e+91], t$95$2, If[LessEqual[x, -5.9e+26], t$95$1, If[LessEqual[x, -2.1e-80], t$95$3, If[LessEqual[x, 2.2e+82], 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) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\
t_2 := x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
t_3 := x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+187}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;x \leq -3.1 \cdot 10^{+91}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -5.9 \cdot 10^{+26}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -2.1 \cdot 10^{-80}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{+82}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -9.4999999999999996e187 or -5.9000000000000003e26 < x < -2.10000000000000001e-80

    1. Initial program 74.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. Simplified77.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)} \]
    3. Taylor expanded in x around inf 69.3%

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

    if -9.4999999999999996e187 < x < -1.9000000000000001e133

    1. Initial program 64.2%

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

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

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

    if -1.9000000000000001e133 < x < -3.09999999999999998e91 or 2.2000000000000001e82 < x

    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. Simplified86.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)} \]
    3. Taylor expanded in x around 0 86.7%

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative86.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*80.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative80.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*80.5%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified80.5%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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) \]
    6. Taylor expanded in x around -inf 71.4%

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv71.4%

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

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

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

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

    if -3.09999999999999998e91 < x < -5.9000000000000003e26 or -2.10000000000000001e-80 < x < 2.2000000000000001e82

    1. Initial program 91.2%

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+79.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+187}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+133}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;x \leq -5.9 \cdot 10^{+26}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-80}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+82}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 8: 82.2% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -6.80000000000000042e-73 or 2.45000000000000014e70 < i

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

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

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

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

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

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

    if -6.80000000000000042e-73 < i < 2.45000000000000014e70

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

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

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

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

Alternative 9: 36.5% accurate, 1.2× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -5.19999999999999945e61 or 2.4e53 < (*.f64 b c)

    1. Initial program 80.8%

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

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

    if -5.19999999999999945e61 < (*.f64 b c) < -3.50000000000000009e-223

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

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

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

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

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

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

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

    if -3.50000000000000009e-223 < (*.f64 b c) < 4.2999999999999998e-137

    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. Simplified86.6%

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

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

    if 4.2999999999999998e-137 < (*.f64 b c) < 1.1000000000000001e-7

    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. Simplified87.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)} \]
    3. Taylor expanded in i around inf 40.7%

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

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

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

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

    if 1.1000000000000001e-7 < (*.f64 b c) < 2.4e53

    1. Initial program 82.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.2 \cdot 10^{+61}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -3.5 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \left(-4 \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{-137}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 1.1 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+53}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 10: 37.6% accurate, 1.2× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -1.2999999999999999e144 or 9.49999999999999994e52 < (*.f64 b c)

    1. Initial program 81.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. 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)} \]
    3. Taylor expanded in b around inf 54.5%

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

    if -1.2999999999999999e144 < (*.f64 b c) < -1.65e-189

    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. Simplified91.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)} \]
    3. Taylor expanded in y around inf 33.1%

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

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

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

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

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

    if -1.65e-189 < (*.f64 b c) < 6.79999999999999998e-139

    1. Initial program 90.2%

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

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

    if 6.79999999999999998e-139 < (*.f64 b c) < 1.79999999999999997e-7

    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. Simplified87.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)} \]
    3. Taylor expanded in i around inf 40.7%

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

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

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

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

    if 1.79999999999999997e-7 < (*.f64 b c) < 9.49999999999999994e52

    1. Initial program 82.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.3 \cdot 10^{+144}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.65 \cdot 10^{-189}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 6.8 \cdot 10^{-139}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 9.5 \cdot 10^{+52}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 11: 78.6% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.14999999999999995e100

    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. Simplified84.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)} \]
    3. Taylor expanded in x around 0 84.6%

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative84.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*91.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative91.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*91.0%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified91.0%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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) \]
    6. Taylor expanded in z around inf 42.8%

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

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

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

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

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

    if -1.14999999999999995e100 < z < 1.50000000000000007e222

    1. Initial program 84.8%

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

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

    if 1.50000000000000007e222 < z

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

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

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

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

Alternative 12: 78.8% 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(j \cdot 27\right) \cdot k\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+53}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+220}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(\left(y \cdot z\right) \cdot t\right) - i \cdot 4\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 (<= z -1.45e+53)
     (* 18.0 (* t (* y (* x z))))
     (if (<= z 2.3e+220)
       (- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1)
       (- (* x (- (* 18.0 (* (* y z) t)) (* i 4.0))) 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 (z <= -1.45e+53) {
		tmp = 18.0 * (t * (y * (x * z)));
	} else if (z <= 2.3e+220) {
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
	} else {
		tmp = (x * ((18.0 * ((y * z) * t)) - (i * 4.0))) - 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 (z <= (-1.45d+53)) then
        tmp = 18.0d0 * (t * (y * (x * z)))
    else if (z <= 2.3d+220) then
        tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - t_1
    else
        tmp = (x * ((18.0d0 * ((y * z) * t)) - (i * 4.0d0))) - 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 (z <= -1.45e+53) {
		tmp = 18.0 * (t * (y * (x * z)));
	} else if (z <= 2.3e+220) {
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
	} else {
		tmp = (x * ((18.0 * ((y * z) * t)) - (i * 4.0))) - 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 z <= -1.45e+53:
		tmp = 18.0 * (t * (y * (x * z)))
	elif z <= 2.3e+220:
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1
	else:
		tmp = (x * ((18.0 * ((y * z) * t)) - (i * 4.0))) - 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 (z <= -1.45e+53)
		tmp = Float64(18.0 * Float64(t * Float64(y * Float64(x * z))));
	elseif (z <= 2.3e+220)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - t_1);
	else
		tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(Float64(y * z) * t)) - Float64(i * 4.0))) - 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 (z <= -1.45e+53)
		tmp = 18.0 * (t * (y * (x * z)));
	elseif (z <= 2.3e+220)
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
	else
		tmp = (x * ((18.0 * ((y * z) * t)) - (i * 4.0))) - 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[z, -1.45e+53], N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+220], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(x * N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $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 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+53}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4500000000000001e53

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative84.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*89.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative89.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*89.5%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified89.5%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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) \]
    6. Taylor expanded in z around inf 41.2%

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

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

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

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

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

    if -1.4500000000000001e53 < z < 2.29999999999999997e220

    1. Initial program 84.3%

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

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

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

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

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

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

    if 2.29999999999999997e220 < z

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

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

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

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

Alternative 13: 67.3% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -4400 or 9.6000000000000007e65 < c

    1. Initial program 79.6%

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+64.9%

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

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

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

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

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

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

    if -4400 < c < 9.6000000000000007e65

    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 b around 0 82.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4400 \lor \neg \left(c \leq 9.6 \cdot 10^{+65}\right):\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

Alternative 14: 70.3% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.29999999999999999e-95

    1. Initial program 78.3%

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

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

    if -2.29999999999999999e-95 < x < 4.00000000000000012e83

    1. Initial program 91.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. Simplified90.5%

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate--l+81.2%

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

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

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

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

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

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

    if 4.00000000000000012e83 < x

    1. Initial program 78.6%

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

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

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(18 \cdot x\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) \]
      2. *-commutative86.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(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*r*78.6%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - 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. *-commutative78.6%

        \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\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) \]
      5. associate-*l*78.6%

        \[\leadsto \left(t \cdot \left(z \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\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) \]
    5. Simplified78.6%

      \[\leadsto \left(t \cdot \left(\color{blue}{z \cdot \left(x \cdot \left(18 \cdot y\right)\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) \]
    6. Taylor expanded in x around -inf 69.9%

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

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

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

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

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

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

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

Alternative 15: 47.0% accurate, 1.8× speedup?

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

\mathbf{elif}\;y \leq -4.2 \cdot 10^{+137}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -8.5 \cdot 10^{+108}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 9.8 \cdot 10^{+95}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.9000000000000001e212 or -4.1999999999999998e137 < y < -8.50000000000000016e108

    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. Simplified70.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)} \]
    3. Taylor expanded in y around inf 48.8%

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

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

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

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

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

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

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

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

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

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

    if -3.9000000000000001e212 < y < -4.1999999999999998e137 or -8.50000000000000016e108 < y < 9.7999999999999998e95

    1. Initial program 88.9%

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

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

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

    if 9.7999999999999998e95 < y

    1. Initial program 78.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. 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)} \]
    3. Taylor expanded in y around inf 48.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+212}:\\ \;\;\;\;x \cdot \left(z \cdot \left(y \cdot \left(18 \cdot t\right)\right)\right)\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{+137}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{+108}:\\ \;\;\;\;x \cdot \left(z \cdot \left(y \cdot \left(18 \cdot t\right)\right)\right)\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{+95}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 16: 36.7% accurate, 1.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -8.4999999999999997e62 or 5.70000000000000017e53 < (*.f64 b c)

    1. Initial program 80.8%

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

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

    if -8.4999999999999997e62 < (*.f64 b c) < -3.6000000000000004e-223

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

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

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

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

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

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

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

    if -3.6000000000000004e-223 < (*.f64 b c) < 5.70000000000000017e53

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.5 \cdot 10^{+62}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -3.6 \cdot 10^{-223}:\\ \;\;\;\;t \cdot \left(-4 \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 5.7 \cdot 10^{+53}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 17: 51.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 := \left(j \cdot 27\right) \cdot k\\ t_2 := b \cdot c - t_1\\ \mathbf{if}\;c \leq -4800:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -5.4 \cdot 10^{-216}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;c \leq 6 \cdot 10^{+71}:\\ \;\;\;\;t \cdot \left(-4 \cdot a\right) - 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 (* (* j 27.0) k)) (t_2 (- (* b c) t_1)))
   (if (<= c -4800.0)
     t_2
     (if (<= c -5.4e-216)
       (+ (* -4.0 (* x i)) (* j (* k -27.0)))
       (if (<= c 6e+71) (- (* t (* -4.0 a)) 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 = (j * 27.0) * k;
	double t_2 = (b * c) - t_1;
	double tmp;
	if (c <= -4800.0) {
		tmp = t_2;
	} else if (c <= -5.4e-216) {
		tmp = (-4.0 * (x * i)) + (j * (k * -27.0));
	} else if (c <= 6e+71) {
		tmp = (t * (-4.0 * a)) - 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 = (j * 27.0d0) * k
    t_2 = (b * c) - t_1
    if (c <= (-4800.0d0)) then
        tmp = t_2
    else if (c <= (-5.4d-216)) then
        tmp = ((-4.0d0) * (x * i)) + (j * (k * (-27.0d0)))
    else if (c <= 6d+71) then
        tmp = (t * ((-4.0d0) * a)) - 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 = (j * 27.0) * k;
	double t_2 = (b * c) - t_1;
	double tmp;
	if (c <= -4800.0) {
		tmp = t_2;
	} else if (c <= -5.4e-216) {
		tmp = (-4.0 * (x * i)) + (j * (k * -27.0));
	} else if (c <= 6e+71) {
		tmp = (t * (-4.0 * a)) - 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 = (j * 27.0) * k
	t_2 = (b * c) - t_1
	tmp = 0
	if c <= -4800.0:
		tmp = t_2
	elif c <= -5.4e-216:
		tmp = (-4.0 * (x * i)) + (j * (k * -27.0))
	elif c <= 6e+71:
		tmp = (t * (-4.0 * a)) - t_1
	else:
		tmp = t_2
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	t_2 = Float64(Float64(b * c) - t_1)
	tmp = 0.0
	if (c <= -4800.0)
		tmp = t_2;
	elseif (c <= -5.4e-216)
		tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(j * Float64(k * -27.0)));
	elseif (c <= 6e+71)
		tmp = Float64(Float64(t * Float64(-4.0 * a)) - 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 = (j * 27.0) * k;
	t_2 = (b * c) - t_1;
	tmp = 0.0;
	if (c <= -4800.0)
		tmp = t_2;
	elseif (c <= -5.4e-216)
		tmp = (-4.0 * (x * i)) + (j * (k * -27.0));
	elseif (c <= 6e+71)
		tmp = (t * (-4.0 * a)) - t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[c, -4800.0], t$95$2, If[LessEqual[c, -5.4e-216], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6e+71], N[(N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $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 := b \cdot c - t_1\\
\mathbf{if}\;c \leq -4800:\\
\;\;\;\;t_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -4800 or 6.00000000000000025e71 < c

    1. Initial program 79.6%

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

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

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

    if -4800 < c < -5.3999999999999998e-216

    1. Initial program 93.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 b around 0 86.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(4 \cdot \left(i \cdot x\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
      5. distribute-neg-in59.7%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right) + \left(-j \cdot \left(27 \cdot k\right)\right)} \]
      6. distribute-lft-neg-in59.7%

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

        \[\leadsto \color{blue}{-4} \cdot \left(i \cdot x\right) + \left(-j \cdot \left(27 \cdot k\right)\right) \]
      8. distribute-rgt-neg-in59.7%

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

        \[\leadsto -4 \cdot \left(i \cdot x\right) + j \cdot \left(-\color{blue}{k \cdot 27}\right) \]
      10. distribute-rgt-neg-in59.7%

        \[\leadsto -4 \cdot \left(i \cdot x\right) + j \cdot \color{blue}{\left(k \cdot \left(-27\right)\right)} \]
      11. metadata-eval59.7%

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

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

    if -5.3999999999999998e-216 < c < 6.00000000000000025e71

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

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

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

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

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

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

Alternative 18: 51.6% accurate, 2.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -1.05000000000000005e105 or 9.60000000000000074e108 < i

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(4 \cdot \left(i \cdot x\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
      5. distribute-neg-in64.5%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right) + \left(-j \cdot \left(27 \cdot k\right)\right)} \]
      6. distribute-lft-neg-in64.5%

        \[\leadsto \color{blue}{\left(-4\right) \cdot \left(i \cdot x\right)} + \left(-j \cdot \left(27 \cdot k\right)\right) \]
      7. metadata-eval64.5%

        \[\leadsto \color{blue}{-4} \cdot \left(i \cdot x\right) + \left(-j \cdot \left(27 \cdot k\right)\right) \]
      8. distribute-rgt-neg-in64.5%

        \[\leadsto -4 \cdot \left(i \cdot x\right) + \color{blue}{j \cdot \left(-27 \cdot k\right)} \]
      9. *-commutative64.5%

        \[\leadsto -4 \cdot \left(i \cdot x\right) + j \cdot \left(-\color{blue}{k \cdot 27}\right) \]
      10. distribute-rgt-neg-in64.5%

        \[\leadsto -4 \cdot \left(i \cdot x\right) + j \cdot \color{blue}{\left(k \cdot \left(-27\right)\right)} \]
      11. metadata-eval64.5%

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

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

    if -1.05000000000000005e105 < i < 9.60000000000000074e108

    1. Initial program 85.3%

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

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

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

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

Alternative 19: 51.6% accurate, 2.0× speedup?

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

\mathbf{elif}\;i \leq 2.02 \cdot 10^{+108}:\\
\;\;\;\;b \cdot c - t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -9.2000000000000005e101

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(4 \cdot \left(i \cdot x\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
      5. distribute-neg-in72.4%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right) + \left(-j \cdot \left(27 \cdot k\right)\right)} \]
      6. distribute-lft-neg-in72.4%

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

        \[\leadsto \color{blue}{-4} \cdot \left(i \cdot x\right) + \left(-j \cdot \left(27 \cdot k\right)\right) \]
      8. distribute-rgt-neg-in72.4%

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

        \[\leadsto -4 \cdot \left(i \cdot x\right) + j \cdot \left(-\color{blue}{k \cdot 27}\right) \]
      10. distribute-rgt-neg-in72.4%

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

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

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

    if -9.2000000000000005e101 < i < 2.02000000000000007e108

    1. Initial program 85.3%

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

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

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

    if 2.02000000000000007e108 < i

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

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

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

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

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

Alternative 20: 37.1% accurate, 2.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -8.1999999999999999e33 or 2.99999999999999998e53 < (*.f64 b c)

    1. Initial program 81.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. Simplified82.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)} \]
    3. Taylor expanded in b around inf 49.7%

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

    if -8.1999999999999999e33 < (*.f64 b c) < 2.99999999999999998e53

    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. Simplified89.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)} \]
    3. Taylor expanded in j around inf 35.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.2 \cdot 10^{+33}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+53}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 21: 37.1% accurate, 2.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.2 \cdot 10^{+33}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 5.4 \cdot 10^{+51}:\\ \;\;\;\;j \cdot \left(k \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 (<= (* b c) -8.2e+33)
   (* b c)
   (if (<= (* b c) 5.4e+51) (* j (* k -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 ((b * c) <= -8.2e+33) {
		tmp = b * c;
	} else if ((b * c) <= 5.4e+51) {
		tmp = j * (k * -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 ((b * c) <= (-8.2d+33)) then
        tmp = b * c
    else if ((b * c) <= 5.4d+51) then
        tmp = j * (k * (-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 ((b * c) <= -8.2e+33) {
		tmp = b * c;
	} else if ((b * c) <= 5.4e+51) {
		tmp = j * (k * -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 (b * c) <= -8.2e+33:
		tmp = b * c
	elif (b * c) <= 5.4e+51:
		tmp = j * (k * -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 (Float64(b * c) <= -8.2e+33)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= 5.4e+51)
		tmp = Float64(j * Float64(k * -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 ((b * c) <= -8.2e+33)
		tmp = b * c;
	elseif ((b * c) <= 5.4e+51)
		tmp = j * (k * -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[N[(b * c), $MachinePrecision], -8.2e+33], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.4e+51], N[(j * N[(k * -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}\;b \cdot c \leq -8.2 \cdot 10^{+33}:\\
\;\;\;\;b \cdot c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -8.1999999999999999e33 or 5.39999999999999983e51 < (*.f64 b c)

    1. Initial program 81.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. Simplified82.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)} \]
    3. Taylor expanded in b around inf 49.7%

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

    if -8.1999999999999999e33 < (*.f64 b c) < 5.39999999999999983e51

    1. Initial program 87.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.2 \cdot 10^{+33}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 5.4 \cdot 10^{+51}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 22: 24.1% 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. Simplified86.2%

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

    \[\leadsto \color{blue}{b \cdot c} \]
  4. Final simplification24.3%

    \[\leadsto b \cdot c \]

Developer target: 89.2% 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 2023279 
(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)))