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

Percentage Accurate: 85.3% → 91.3%
Time: 30.7s
Alternatives: 22
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 91.3% accurate, 0.5× speedup?

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

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


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

    1. Initial program 95.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. Simplified94.1%

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

\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) - 4 \cdot \left(x \cdot i\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j 27) k) < -4.99999999999999997e88 or 2e24 < (*.f64 (*.f64 j 27) k)

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

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

      \[\leadsto \left(\color{blue}{-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) \]
    4. Step-by-step derivation
      1. *-commutative85.2%

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(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. Simplified85.2%

      \[\leadsto \left(\color{blue}{t \cdot \left(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 -4.99999999999999997e88 < (*.f64 (*.f64 j 27) k) < 2e24

    1. Initial program 88.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -5 \cdot 10^{+88} \lor \neg \left(\left(j \cdot 27\right) \cdot k \leq 2 \cdot 10^{+24}\right):\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \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) - 4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 3: 82.5% 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 + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+88}:\\ \;\;\;\;t_1 - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+24}:\\ \;\;\;\;t_1 - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - \left(x \cdot \left(4 \cdot i\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
 (let* ((t_1 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
        (t_2 (* (* j 27.0) k)))
   (if (<= t_2 -5e+88)
     (- t_1 (* 27.0 (* j k)))
     (if (<= t_2 2e+24)
       (- t_1 (* 4.0 (* x i)))
       (-
        (+ (* b c) (* t (* a -4.0)))
        (+ (* x (* 4.0 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 t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -5e+88) {
		tmp = t_1 - (27.0 * (j * k));
	} else if (t_2 <= 2e+24) {
		tmp = t_1 - (4.0 * (x * i));
	} else {
		tmp = ((b * c) + (t * (a * -4.0))) - ((x * (4.0 * 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
    t_2 = (j * 27.0d0) * k
    if (t_2 <= (-5d+88)) then
        tmp = t_1 - (27.0d0 * (j * k))
    else if (t_2 <= 2d+24) then
        tmp = t_1 - (4.0d0 * (x * i))
    else
        tmp = ((b * c) + (t * (a * (-4.0d0)))) - ((x * (4.0d0 * 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 t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -5e+88) {
		tmp = t_1 - (27.0 * (j * k));
	} else if (t_2 <= 2e+24) {
		tmp = t_1 - (4.0 * (x * i));
	} else {
		tmp = ((b * c) + (t * (a * -4.0))) - ((x * (4.0 * 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):
	t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))
	t_2 = (j * 27.0) * k
	tmp = 0
	if t_2 <= -5e+88:
		tmp = t_1 - (27.0 * (j * k))
	elif t_2 <= 2e+24:
		tmp = t_1 - (4.0 * (x * i))
	else:
		tmp = ((b * c) + (t * (a * -4.0))) - ((x * (4.0 * 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)
	t_1 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))))
	t_2 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t_2 <= -5e+88)
		tmp = Float64(t_1 - Float64(27.0 * Float64(j * k)));
	elseif (t_2 <= 2e+24)
		tmp = Float64(t_1 - Float64(4.0 * Float64(x * i)));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(a * -4.0))) - Float64(Float64(x * Float64(4.0 * i)) + 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)
	t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	t_2 = (j * 27.0) * k;
	tmp = 0.0;
	if (t_2 <= -5e+88)
		tmp = t_1 - (27.0 * (j * k));
	elseif (t_2 <= 2e+24)
		tmp = t_1 - (4.0 * (x * i));
	else
		tmp = ((b * c) + (t * (a * -4.0))) - ((x * (4.0 * 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_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+88], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+24], N[(t$95$1 - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $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}
t_1 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+88}:\\
\;\;\;\;t_1 - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+24}:\\
\;\;\;\;t_1 - 4 \cdot \left(x \cdot i\right)\\

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


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

    1. Initial program 88.8%

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

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

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

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

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

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

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

      \[\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)} \]

    if -4.99999999999999997e88 < (*.f64 (*.f64 j 27) k) < 2e24

    1. Initial program 88.1%

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

    if 2e24 < (*.f64 (*.f64 j 27) k)

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

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

      \[\leadsto \left(\color{blue}{-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) \]
    4. Step-by-step derivation
      1. *-commutative85.8%

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(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. Simplified85.8%

      \[\leadsto \left(\color{blue}{t \cdot \left(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 3 regimes into one program.
  4. Final simplification87.8%

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

Alternative 4: 89.1% accurate, 0.9× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\ \mathbf{if}\;t \leq -2.2 \cdot 10^{-113} \lor \neg \left(t \leq 1.22 \cdot 10^{-166}\right):\\ \;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - \left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + 18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\right) - t_1\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
   (if (or (<= t -2.2e-113) (not (<= t 1.22e-166)))
     (- (- (* b c) (* t (- (* a 4.0) (* (* x 18.0) (* y z))))) t_1)
     (- (+ (* b c) (* 18.0 (* x (* y (* z t))))) t_1))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
	double tmp;
	if ((t <= -2.2e-113) || !(t <= 1.22e-166)) {
		tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - t_1;
	} else {
		tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - t_1;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
    if ((t <= (-2.2d-113)) .or. (.not. (t <= 1.22d-166))) then
        tmp = ((b * c) - (t * ((a * 4.0d0) - ((x * 18.0d0) * (y * z))))) - t_1
    else
        tmp = ((b * c) + (18.0d0 * (x * (y * (z * t))))) - t_1
    end if
    code = tmp
end function
assert y < z;
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
	double tmp;
	if ((t <= -2.2e-113) || !(t <= 1.22e-166)) {
		tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - t_1;
	} else {
		tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - t_1;
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (x * (4.0 * i)) + (j * (27.0 * k))
	tmp = 0
	if (t <= -2.2e-113) or not (t <= 1.22e-166):
		tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - t_1
	else:
		tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - 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(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))
	tmp = 0.0
	if ((t <= -2.2e-113) || !(t <= 1.22e-166))
		tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(Float64(x * 18.0) * Float64(y * z))))) - t_1);
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(x * Float64(y * Float64(z * t))))) - t_1);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
	tmp = 0.0;
	if ((t <= -2.2e-113) || ~((t <= 1.22e-166)))
		tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - t_1;
	else
		tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - 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[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -2.2e-113], N[Not[LessEqual[t, 1.22e-166]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{-113} \lor \neg \left(t \leq 1.22 \cdot 10^{-166}\right):\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - \left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.20000000000000004e-113 or 1.22e-166 < t

    1. Initial program 89.1%

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

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

    if -2.20000000000000004e-113 < t < 1.22e-166

    1. Initial program 78.0%

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

      \[\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. *-commutative76.5%

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;b \cdot c \leq -3.7 \cdot 10^{-131}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -3.6 \cdot 10^{-188}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

\mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+135}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -6.39999999999999987e180

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in x around 0 82.2%

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

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

    if -6.39999999999999987e180 < (*.f64 b c) < -3.7000000000000002e-131 or -3.5999999999999997e-188 < (*.f64 b c) < 2.39999999999999997e135

    1. Initial program 87.2%

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

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

        \[\leadsto \left(\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 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative89.0%

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

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

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

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

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

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

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

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

    if -3.7000000000000002e-131 < (*.f64 b c) < -3.5999999999999997e-188

    1. Initial program 83.8%

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

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

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

    if 2.39999999999999997e135 < (*.f64 b c)

    1. Initial program 89.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in i around 0 76.2%

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

        \[\leadsto 18 \cdot \color{blue}{{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}^{1}} + b \cdot c \]
    9. Applied egg-rr76.2%

      \[\leadsto 18 \cdot \color{blue}{{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}^{1}} + b \cdot c \]
    10. Step-by-step derivation
      1. unpow176.2%

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot \left(t \cdot x\right)\right)} + b \cdot c \]
    11. Simplified78.6%

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

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

Alternative 6: 82.9% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\ \mathbf{if}\;x \leq -5 \cdot 10^{+28} \lor \neg \left(x \leq 9.6 \cdot 10^{-5}\right):\\ \;\;\;\;\left(b \cdot c + 18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - t_1\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
   (if (or (<= x -5e+28) (not (<= x 9.6e-5)))
     (- (+ (* b c) (* 18.0 (* x (* y (* z t))))) t_1)
     (- (+ (* b c) (* t (* a -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 = (x * (4.0 * i)) + (j * (27.0 * k));
	double tmp;
	if ((x <= -5e+28) || !(x <= 9.6e-5)) {
		tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - t_1;
	} else {
		tmp = ((b * c) + (t * (a * -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 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
    if ((x <= (-5d+28)) .or. (.not. (x <= 9.6d-5))) then
        tmp = ((b * c) + (18.0d0 * (x * (y * (z * t))))) - t_1
    else
        tmp = ((b * c) + (t * (a * (-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 = (x * (4.0 * i)) + (j * (27.0 * k));
	double tmp;
	if ((x <= -5e+28) || !(x <= 9.6e-5)) {
		tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - t_1;
	} else {
		tmp = ((b * c) + (t * (a * -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 = (x * (4.0 * i)) + (j * (27.0 * k))
	tmp = 0
	if (x <= -5e+28) or not (x <= 9.6e-5):
		tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - t_1
	else:
		tmp = ((b * c) + (t * (a * -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(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))
	tmp = 0.0
	if ((x <= -5e+28) || !(x <= 9.6e-5))
		tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(x * Float64(y * Float64(z * t))))) - t_1);
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(a * -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 = (x * (4.0 * i)) + (j * (27.0 * k));
	tmp = 0.0;
	if ((x <= -5e+28) || ~((x <= 9.6e-5)))
		tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - t_1;
	else
		tmp = ((b * c) + (t * (a * -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[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -5e+28], N[Not[LessEqual[x, 9.6e-5]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(a * -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 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;x \leq -5 \cdot 10^{+28} \lor \neg \left(x \leq 9.6 \cdot 10^{-5}\right):\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.99999999999999957e28 or 9.6000000000000002e-5 < x

    1. Initial program 77.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. Simplified85.1%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999957e28 < x < 9.6000000000000002e-5

    1. Initial program 94.5%

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

      \[\leadsto \left(\color{blue}{-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) \]
    4. Step-by-step derivation
      1. *-commutative90.7%

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(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. Simplified90.7%

      \[\leadsto \left(\color{blue}{t \cdot \left(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.8%

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

Alternative 7: 52.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+149}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j 27) k) < -1.99999999999999992e88 or 2.0000000000000001e149 < (*.f64 (*.f64 j 27) k)

    1. Initial program 83.4%

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

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

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

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

    if -1.99999999999999992e88 < (*.f64 (*.f64 j 27) k) < -2.0000000000000001e-84

    1. Initial program 85.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.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 89.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. *-commutative89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\color{blue}{\left(t \cdot 18\right)} \cdot y\right) \cdot z\right) \]
    11. Simplified54.9%

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

    if -2.0000000000000001e-84 < (*.f64 (*.f64 j 27) k) < 2.0000000000000001e149

    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. 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 inf 73.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in x around 0 73.2%

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

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

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

Alternative 8: 51.4% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+149}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j 27) k) < -1.99999999999999992e88

    1. Initial program 89.1%

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

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

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

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

    if -1.99999999999999992e88 < (*.f64 (*.f64 j 27) k) < -2.0000000000000001e-84

    1. Initial program 85.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.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 89.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. *-commutative89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(\color{blue}{\left(t \cdot 18\right)} \cdot y\right) \cdot z\right) \]
    11. Simplified54.9%

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

    if -2.0000000000000001e-84 < (*.f64 (*.f64 j 27) k) < 2.0000000000000001e149

    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. 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 inf 73.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in x around 0 73.2%

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

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

    if 2.0000000000000001e149 < (*.f64 (*.f64 j 27) k)

    1. Initial program 76.8%

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

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

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

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

Alternative 9: 53.8% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+149}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j 27) k) < -1.99999999999999992e88

    1. Initial program 89.1%

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

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

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

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

    if -1.99999999999999992e88 < (*.f64 (*.f64 j 27) k) < -2.0000000000000001e-84

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

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

    if -2.0000000000000001e-84 < (*.f64 (*.f64 j 27) k) < 2.0000000000000001e149

    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. 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 inf 73.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in x around 0 73.2%

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

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

    if 2.0000000000000001e149 < (*.f64 (*.f64 j 27) k)

    1. Initial program 76.8%

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

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

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

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

Alternative 10: 84.3% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.20000000000000006e38 or 0.0519999999999999976 < x

    1. Initial program 77.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. Simplified85.1%

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

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

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

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

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

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

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

      \[\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) - 27 \cdot \left(j \cdot k\right)} \]

    if -2.20000000000000006e38 < x < 0.0519999999999999976

    1. Initial program 94.5%

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

      \[\leadsto \left(\color{blue}{-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) \]
    4. Step-by-step derivation
      1. *-commutative90.7%

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(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. Simplified90.7%

      \[\leadsto \left(\color{blue}{t \cdot \left(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 simplification88.3%

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

Alternative 11: 74.9% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.5500000000000001e25 or 2.2e18 < x

    1. Initial program 77.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in x around 0 79.1%

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

    if -3.5500000000000001e25 < x < -3.3000000000000001e-45

    1. Initial program 99.9%

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

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

        \[\leadsto \left(\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 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative99.9%

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

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

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

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

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

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

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

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

    if -3.3000000000000001e-45 < x < -3.09999999999999976e-104

    1. Initial program 93.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. Simplified88.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in i around 0 76.7%

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

    if -3.09999999999999976e-104 < x < 2.2e18

    1. Initial program 94.1%

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

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

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

Alternative 12: 75.1% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.7499999999999998e26 or 1.22e16 < x

    1. Initial program 77.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in x around 0 79.1%

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

    if -2.7499999999999998e26 < x < -7.5000000000000004e-37

    1. Initial program 99.9%

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

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

        \[\leadsto \left(\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 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative99.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + \left(-4\right) \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      2. metadata-eval94.9%

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

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

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

    if -7.5000000000000004e-37 < x < -3.09999999999999976e-104

    1. Initial program 94.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]

    if -3.09999999999999976e-104 < x < 1.22e16

    1. Initial program 94.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.75 \cdot 10^{+26}:\\ \;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-37}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-104}:\\ \;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq 1.22 \cdot 10^{+16}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \]

Alternative 13: 80.8% accurate, 1.2× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.19999999999999991e44 or 9.5000000000000004e116 < x

    1. Initial program 73.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. Simplified81.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in x around 0 82.5%

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

    if -6.19999999999999991e44 < x < 9.5000000000000004e116

    1. Initial program 94.3%

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

      \[\leadsto \left(\color{blue}{-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) \]
    4. Step-by-step derivation
      1. *-commutative88.8%

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

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

        \[\leadsto \left(\color{blue}{t \cdot \left(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. Simplified88.8%

      \[\leadsto \left(\color{blue}{t \cdot \left(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 simplification86.4%

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

Alternative 14: 37.1% accurate, 1.5× speedup?

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

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

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

\mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{+135}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -8.50000000000000026e120 or 1.70000000000000005e135 < (*.f64 b c)

    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. Simplified88.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 b around inf 57.5%

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

    if -8.50000000000000026e120 < (*.f64 b c) < -1.12e58 or -2.60000000000000006e-182 < (*.f64 b c) < 1.70000000000000005e135

    1. Initial program 83.8%

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

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

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

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

    if -1.12e58 < (*.f64 b c) < -2.60000000000000006e-182

    1. Initial program 92.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.5 \cdot 10^{+120}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.12 \cdot 10^{+58}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -2.6 \cdot 10^{-182}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{+135}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 15: 37.1% accurate, 1.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -9.60000000000000004e120 or 1.5e135 < (*.f64 b c)

    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. Simplified88.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 b around inf 57.5%

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

    if -9.60000000000000004e120 < (*.f64 b c) < -1.0799999999999999e58

    1. Initial program 84.6%

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

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

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

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

    if -1.0799999999999999e58 < (*.f64 b c) < -3.0999999999999999e-180

    1. Initial program 92.1%

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

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

    if -3.0999999999999999e-180 < (*.f64 b c) < 1.5e135

    1. Initial program 83.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -9.6 \cdot 10^{+120}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.08 \cdot 10^{+58}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq -3.1 \cdot 10^{-180}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.5 \cdot 10^{+135}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 16: 62.0% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1e-172 or 2.9e174 < c

    1. Initial program 85.2%

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

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

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

    if -1e-172 < c < 8.60000000000000067e-6

    1. Initial program 88.4%

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

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

        \[\leadsto \left(\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 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative86.3%

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

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

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

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

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

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

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

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

    if 8.60000000000000067e-6 < c < 2.9e174

    1. Initial program 85.5%

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

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

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

Alternative 17: 72.4% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.9999999999999999e87

    1. Initial program 71.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. Simplified80.8%

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

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

    if -2.9999999999999999e87 < x < -1.2500000000000001e-44

    1. Initial program 92.7%

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

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

        \[\leadsto \left(\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 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative92.7%

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

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

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

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

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

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

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

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

    if -1.2500000000000001e-44 < x < 5.2000000000000003e134

    1. Initial program 93.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.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 77.9%

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

    if 5.2000000000000003e134 < x

    1. Initial program 72.1%

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

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

        \[\leadsto \left(\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 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. *-commutative82.4%

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

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

      \[\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)} \]
    5. Step-by-step derivation
      1. mul-1-neg77.6%

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

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

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

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

Alternative 18: 32.1% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.3599999999999999e-82 or 1.08e175 < c

    1. Initial program 85.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. Simplified91.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 b around inf 43.1%

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

    if -2.3599999999999999e-82 < c < 2.59999999999999995e-49

    1. Initial program 87.0%

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

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

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

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

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

    if 2.59999999999999995e-49 < c < 1.08e175

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.36 \cdot 10^{-82}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{-49}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;c \leq 1.08 \cdot 10^{+175}:\\ \;\;\;\;x \cdot \left(t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 19: 32.7% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.1799999999999999e-82 or 2.5999999999999999e174 < c

    1. Initial program 85.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. Simplified91.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 b around inf 43.1%

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

    if -1.1799999999999999e-82 < c < 5.1999999999999999e-142

    1. Initial program 86.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. Simplified82.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 j around inf 32.6%

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

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

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

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

    if 5.1999999999999999e-142 < c < 2.5999999999999999e174

    1. Initial program 87.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. Simplified91.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 0 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.18 \cdot 10^{-82}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 5.2 \cdot 10^{-142}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{+174}:\\ \;\;\;\;x \cdot \left(z \cdot \left(y \cdot \left(18 \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 20: 47.3% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.09999999999999987e149 or 8.2e14 < y

    1. Initial program 78.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. Simplified77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.09999999999999987e149 < y < 8.2e14

    1. Initial program 90.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. Simplified93.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 x around inf 77.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    7. Taylor expanded in x around 0 58.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+149} \lor \neg \left(y \leq 8.2 \cdot 10^{+14}\right):\\ \;\;\;\;x \cdot \left(z \cdot \left(y \cdot \left(18 \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 21: 37.7% 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 -1.9 \cdot 10^{+122}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 2.05 \cdot 10^{+135}:\\ \;\;\;\;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) -1.9e+122)
   (* b c)
   (if (<= (* b c) 2.05e+135) (* 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) <= -1.9e+122) {
		tmp = b * c;
	} else if ((b * c) <= 2.05e+135) {
		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) <= (-1.9d+122)) then
        tmp = b * c
    else if ((b * c) <= 2.05d+135) 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) <= -1.9e+122) {
		tmp = b * c;
	} else if ((b * c) <= 2.05e+135) {
		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) <= -1.9e+122:
		tmp = b * c
	elif (b * c) <= 2.05e+135:
		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) <= -1.9e+122)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= 2.05e+135)
		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) <= -1.9e+122)
		tmp = b * c;
	elseif ((b * c) <= 2.05e+135)
		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], -1.9e+122], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.05e+135], 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 -1.9 \cdot 10^{+122}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \cdot c \leq 2.05 \cdot 10^{+135}:\\
\;\;\;\;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) < -1.8999999999999999e122 or 2.05e135 < (*.f64 b c)

    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. Simplified88.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 b around inf 57.5%

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

    if -1.8999999999999999e122 < (*.f64 b c) < 2.05e135

    1. Initial program 86.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.9 \cdot 10^{+122}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 2.05 \cdot 10^{+135}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 22: 24.2% accurate, 10.3× speedup?

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

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

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

    \[\leadsto b \cdot c \]

Developer target: 89.5% 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 2023285 
(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)))