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

Percentage Accurate: 85.4% → 90.3%
Time: 39.3s
Alternatives: 25
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 90.3% accurate, 0.5× speedup?

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

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


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

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j 27) k) < 3.99999999999999994e307

    1. Initial program 85.8%

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

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

    if 3.99999999999999994e307 < (*.f64 (*.f64 j 27) k)

    1. Initial program 41.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. Simplified50.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 91.7%

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

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

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

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

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

Alternative 3: 87.4% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.54999999999999994e90

    1. Initial program 84.8%

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

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

    if 1.54999999999999994e90 < x

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

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

      \[\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)} \]
    4. Step-by-step derivation
      1. expm1-log1p-u79.8%

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

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

      \[\leadsto \left(b \cdot c + x \cdot \left(\color{blue}{\left(e^{\mathsf{log1p}\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} - 4 \cdot i\right)\right) - 27 \cdot \left(j \cdot k\right) \]
    6. Step-by-step derivation
      1. expm1-def79.8%

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

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

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

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

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

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

Alternative 4: 71.7% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+69} \lor \neg \left(t \leq 2 \cdot 10^{+129}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.0199999999999999e-50

    1. Initial program 85.3%

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

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

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

        \[\leadsto \color{blue}{\left(-t\right)} \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right) - \left(j \cdot 27\right) \cdot k \]
      3. cancel-sign-sub-inv81.5%

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

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

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

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

    if -1.0199999999999999e-50 < t < 5.2e5

    1. Initial program 85.7%

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

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

    if 5.2e5 < t < 1.85000000000000009e49

    1. Initial program 83.1%

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

      \[\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. *-commutative67.3%

        \[\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*67.3%

        \[\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.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*83.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. Simplified83.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 x around inf 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot c - \left(t \cdot -18\right) \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} \]
    14. Simplified100.0%

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

    if 1.85000000000000009e49 < t < 7.7999999999999998e69 or 2e129 < t

    1. Initial program 75.0%

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

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

    if 7.7999999999999998e69 < t < 2e129

    1. Initial program 81.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{-50}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(x \cdot \left(y \cdot z\right)\right) \cdot -18\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 520000:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+49}:\\ \;\;\;\;b \cdot c - \left(t \cdot -18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+69} \lor \neg \left(t \leq 2 \cdot 10^{+129}\right):\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

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

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

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

\mathbf{elif}\;x \leq 42000000:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -5.9999999999999999e-89 or 4.2e7 < x

    1. Initial program 76.5%

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

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

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

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

    if -5.9999999999999999e-89 < x < 9.99999999999999943e-158

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

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

    if 9.99999999999999943e-158 < x < 1.99999999999999999e-55

    1. Initial program 100.0%

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

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

    if 1.99999999999999999e-55 < x < 4.2e7

    1. Initial program 85.0%

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

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

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

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

Alternative 6: 71.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 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;x \leq -1.2 \cdot 10^{-88}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 10^{-157}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-53}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right)\right)\right) - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;x \leq 112000000000:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\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 (- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (* 27.0 (* j k)))))
   (if (<= x -1.2e-88)
     t_1
     (if (<= x 1e-157)
       (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
       (if (<= x 2.7e-53)
         (- (+ (* b c) (* t (* (* x y) (* 18.0 z)))) (* x (* 4.0 i)))
         (if (<= x 112000000000.0)
           (* t (- (* 18.0 (* x (* y z))) (* 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 * ((18.0 * (t * (y * z))) - (4.0 * i))) - (27.0 * (j * k));
	double tmp;
	if (x <= -1.2e-88) {
		tmp = t_1;
	} else if (x <= 1e-157) {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	} else if (x <= 2.7e-53) {
		tmp = ((b * c) + (t * ((x * y) * (18.0 * z)))) - (x * (4.0 * i));
	} else if (x <= 112000000000.0) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} 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 = (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))) - (27.0d0 * (j * k))
    if (x <= (-1.2d-88)) then
        tmp = t_1
    else if (x <= 1d-157) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
    else if (x <= 2.7d-53) then
        tmp = ((b * c) + (t * ((x * y) * (18.0d0 * z)))) - (x * (4.0d0 * i))
    else if (x <= 112000000000.0d0) then
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    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 = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (27.0 * (j * k));
	double tmp;
	if (x <= -1.2e-88) {
		tmp = t_1;
	} else if (x <= 1e-157) {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	} else if (x <= 2.7e-53) {
		tmp = ((b * c) + (t * ((x * y) * (18.0 * z)))) - (x * (4.0 * i));
	} else if (x <= 112000000000.0) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} 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 = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (27.0 * (j * k))
	tmp = 0
	if x <= -1.2e-88:
		tmp = t_1
	elif x <= 1e-157:
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k)
	elif x <= 2.7e-53:
		tmp = ((b * c) + (t * ((x * y) * (18.0 * z)))) - (x * (4.0 * i))
	elif x <= 112000000000.0:
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	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(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - Float64(27.0 * Float64(j * k)))
	tmp = 0.0
	if (x <= -1.2e-88)
		tmp = t_1;
	elseif (x <= 1e-157)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k));
	elseif (x <= 2.7e-53)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(x * y) * Float64(18.0 * z)))) - Float64(x * Float64(4.0 * i)));
	elseif (x <= 112000000000.0)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	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 = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (27.0 * (j * k));
	tmp = 0.0;
	if (x <= -1.2e-88)
		tmp = t_1;
	elseif (x <= 1e-157)
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	elseif (x <= 2.7e-53)
		tmp = ((b * c) + (t * ((x * y) * (18.0 * z)))) - (x * (4.0 * i));
	elseif (x <= 112000000000.0)
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e-88], t$95$1, If[LessEqual[x, 1e-157], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e-53], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(x * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 112000000000.0], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $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 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{-88}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;x \leq 112000000000:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.2e-88 or 1.12e11 < x

    1. Initial program 76.0%

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

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

      \[\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)} \]
    4. Taylor expanded in b around 0 72.7%

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

    if -1.2e-88 < x < 9.99999999999999943e-158

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

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

    if 9.99999999999999943e-158 < x < 2.6999999999999999e-53

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Taylor expanded in x around inf 93.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. *-commutative93.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*93.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*93.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*93.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. Simplified93.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 x around inf 80.9%

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

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

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

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

    if 2.6999999999999999e-53 < x < 1.12e11

    1. Initial program 89.4%

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

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

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

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

Alternative 7: 81.2% accurate, 1.1× speedup?

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2e-86 or 2.6e5 < t

    1. Initial program 83.0%

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

      \[\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.2e-86 < t < 2.6e5

    1. Initial program 84.7%

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

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

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

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

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

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


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

    1. Initial program 83.9%

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

      \[\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 -2.19999999999999987e-27 < t < 1.35e129

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

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

      \[\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 1.35e129 < t

    1. Initial program 75.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-27}:\\ \;\;\;\;\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}\;t \leq 1.35 \cdot 10^{+129}:\\ \;\;\;\;\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 - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

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

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

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


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

    1. Initial program 83.9%

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

      \[\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 -8.49999999999999925e-28 < t < 1.27999999999999994e129

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

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

      \[\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)} \]
    4. Step-by-step derivation
      1. expm1-log1p-u71.8%

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

        \[\leadsto \left(b \cdot c + x \cdot \left(\color{blue}{\left(e^{\mathsf{log1p}\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} - 4 \cdot i\right)\right) - 27 \cdot \left(j \cdot k\right) \]
    5. Applied egg-rr70.6%

      \[\leadsto \left(b \cdot c + x \cdot \left(\color{blue}{\left(e^{\mathsf{log1p}\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} - 1\right)} - 4 \cdot i\right)\right) - 27 \cdot \left(j \cdot k\right) \]
    6. Step-by-step derivation
      1. expm1-def71.8%

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

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

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

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

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

    if 1.27999999999999994e129 < t

    1. Initial program 75.0%

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

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

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

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

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-52}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -3.45 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

\mathbf{elif}\;z \leq 2 \cdot 10^{-246}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 10^{-190}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-15}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.08 \cdot 10^{+139}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -9.2e9

    1. Initial program 86.6%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 48.7%

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

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

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

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

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

    if -9.2e9 < z < -1.11999999999999994e-52 or 1.99999999999999991e-246 < z < 1e-190 or 4.39999999999999971e-15 < z < 6.00000000000000025e89

    1. Initial program 86.0%

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

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

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

    if -1.11999999999999994e-52 < z < -3.44999999999999987e-155

    1. Initial program 81.4%

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

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

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

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

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

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

    if -3.44999999999999987e-155 < z < 1.99999999999999991e-246 or 1e-190 < z < 4.39999999999999971e-15 or 6.00000000000000025e89 < z < 1.08000000000000004e139

    1. Initial program 86.9%

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

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

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

    if 1.08000000000000004e139 < z

    1. Initial program 71.6%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 58.4%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      7. distribute-rgt-neg-in60.3%

        \[\leadsto \color{blue}{x \cdot \left(--18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      8. distribute-lft-neg-in60.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9200000000:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-52}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-155}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-246}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;z \leq 10^{-190}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-15}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+89}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+139}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]

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

\mathbf{elif}\;z \leq -6.4 \cdot 10^{-56}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-246}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{-192}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - t_2\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+89}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 5.9 \cdot 10^{+138}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.8e10

    1. Initial program 86.6%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 48.7%

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

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

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

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

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

    if -3.8e10 < z < -6.39999999999999971e-56 or 2.9e-246 < z < 2.69999999999999991e-192 or 2.14999999999999983e-30 < z < 1.1e89

    1. Initial program 87.9%

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

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

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

    if -6.39999999999999971e-56 < z < -3.50000000000000015e-155

    1. Initial program 81.4%

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

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

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

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

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

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

    if -3.50000000000000015e-155 < z < 2.9e-246 or 1.1e89 < z < 5.8999999999999999e138

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

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

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

    if 2.69999999999999991e-192 < z < 2.14999999999999983e-30

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    if 5.8999999999999999e138 < z

    1. Initial program 71.6%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 58.4%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      7. distribute-rgt-neg-in60.3%

        \[\leadsto \color{blue}{x \cdot \left(--18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      8. distribute-lft-neg-in60.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -38000000000:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-56}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-155}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-246}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-192}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+89}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{+138}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 12: 47.0% accurate, 1.2× speedup?

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-195}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{-31}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - t_1\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+90}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+135}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.9999999999999997e-207 or 2.4499999999999999e179 < z

    1. Initial program 83.0%

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

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

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

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

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

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

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

    if -3.9999999999999997e-207 < z < 2.1e-195 or 9.80000000000000047e-31 < z < 3.9000000000000002e90

    1. Initial program 88.3%

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

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

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

    if 2.1e-195 < z < 9.80000000000000047e-31

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    if 3.9000000000000002e90 < z < 4.50000000000000007e135

    1. Initial program 75.3%

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

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

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

    if 4.50000000000000007e135 < z < 2.4499999999999999e179

    1. Initial program 36.0%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 36.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-207}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-195}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-31}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+90}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+135}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+179}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\ \end{array} \]

Alternative 13: 46.8% accurate, 1.2× speedup?

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-194}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - t_1\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+89}:\\
\;\;\;\;t_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.5e-206 or 2.4499999999999999e179 < z

    1. Initial program 83.0%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left({\color{blue}{\left(x \cdot \left(y \cdot \left(z \cdot 18\right)\right)\right)}}^{1} - 4 \cdot a\right) \]
    5. Applied egg-rr57.2%

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

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

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

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

    if -2.5e-206 < z < 9.50000000000000009e-194 or 1.14999999999999992e-30 < z < 5.80000000000000051e89

    1. Initial program 88.3%

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

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

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

    if 9.50000000000000009e-194 < z < 1.14999999999999992e-30

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    if 5.80000000000000051e89 < z < 1.10000000000000008e137

    1. Initial program 75.3%

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

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

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

    if 1.10000000000000008e137 < z < 2.4499999999999999e179

    1. Initial program 36.0%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 36.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right) - a \cdot 4\right)\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-194}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+89}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+137}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+179}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 14: 49.3% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-191}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 1.22 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - t_2\\

\mathbf{elif}\;z \leq 1.26 \cdot 10^{+101}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.65000000000000002e-47

    1. Initial program 86.8%

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

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

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

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

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

      \[\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) + b \cdot c} \]
    10. Step-by-step derivation
      1. +-commutative75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65000000000000002e-47 < z < -3.1000000000000003e-206

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. cancel-sign-sub-inv46.4%

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

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

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

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

    if -3.1000000000000003e-206 < z < 7.4999999999999995e-191 or 1.22e-30 < z < 1.2600000000000001e101

    1. Initial program 87.3%

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

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

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

    if 7.4999999999999995e-191 < z < 1.22e-30

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    if 1.2600000000000001e101 < z

    1. Initial program 73.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. Simplified73.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 64.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{-47}:\\ \;\;\;\;b \cdot c - \left(t \cdot -18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-191}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{+101}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\ \end{array} \]

Alternative 15: 60.1% accurate, 1.3× speedup?

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-191}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.32 \cdot 10^{-80}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.65000000000000003e-27

    1. Initial program 87.6%

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

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

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

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

        \[\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*80.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*80.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. Simplified80.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 x around inf 72.7%

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

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

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

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

      \[\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) + b \cdot c} \]
    10. Step-by-step derivation
      1. +-commutative75.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot c - \left(t \cdot -18\right) \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} \]
    14. Simplified65.2%

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

    if -2.65000000000000003e-27 < z < 3.8999999999999999e-191 or 1.31999999999999995e-80 < z < 9.4999999999999996e123

    1. Initial program 84.8%

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

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

    if 3.8999999999999999e-191 < z < 1.31999999999999995e-80

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

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

      \[\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)} \]
    4. Taylor expanded in i around inf 75.8%

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

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

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

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

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

    if 9.4999999999999996e123 < z

    1. Initial program 72.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. Simplified73.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 69.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{-27}:\\ \;\;\;\;b \cdot c - \left(t \cdot -18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-191}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-80}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+123}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\ \end{array} \]

Alternative 16: 62.5% accurate, 1.3× speedup?

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-284}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.22 \cdot 10^{-79}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+118}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.01999999999999998e-25

    1. Initial program 87.6%

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

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

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

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

        \[\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*80.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*80.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. Simplified80.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 x around inf 72.7%

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

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

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

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

      \[\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) + b \cdot c} \]
    10. Step-by-step derivation
      1. +-commutative75.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot c - \left(t \cdot -18\right) \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} \]
    14. Simplified65.2%

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

    if -1.01999999999999998e-25 < z < -1.15e-284 or 1.22e-79 < z < 1.24999999999999993e118

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

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

    if -1.15e-284 < z < 1.22e-79

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

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

    if 1.24999999999999993e118 < z

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

Alternative 17: 48.5% accurate, 1.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := 27 \cdot \left(j \cdot k\right)\\ t_2 := b \cdot c - t_1\\ \mathbf{if}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right) - a \cdot 4\right)\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-192}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.92 \cdot 10^{-31}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - t_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+115}:\\ \;\;\;\;t_2\\ \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
 (let* ((t_1 (* 27.0 (* j k))) (t_2 (- (* b c) t_1)))
   (if (<= z -6e-207)
     (* t (- (* (* x y) (* 18.0 z)) (* a 4.0)))
     (if (<= z 3.5e-192)
       t_2
       (if (<= z 1.92e-31)
         (- (* x (* i -4.0)) t_1)
         (if (<= z 4e+115) t_2 (* 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 t_1 = 27.0 * (j * k);
	double t_2 = (b * c) - t_1;
	double tmp;
	if (z <= -6e-207) {
		tmp = t * (((x * y) * (18.0 * z)) - (a * 4.0));
	} else if (z <= 3.5e-192) {
		tmp = t_2;
	} else if (z <= 1.92e-31) {
		tmp = (x * (i * -4.0)) - t_1;
	} else if (z <= 4e+115) {
		tmp = t_2;
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 27.0d0 * (j * k)
    t_2 = (b * c) - t_1
    if (z <= (-6d-207)) then
        tmp = t * (((x * y) * (18.0d0 * z)) - (a * 4.0d0))
    else if (z <= 3.5d-192) then
        tmp = t_2
    else if (z <= 1.92d-31) then
        tmp = (x * (i * (-4.0d0))) - t_1
    else if (z <= 4d+115) then
        tmp = t_2
    else
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    end if
    code = tmp
end function
assert y < z;
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = 27.0 * (j * k);
	double t_2 = (b * c) - t_1;
	double tmp;
	if (z <= -6e-207) {
		tmp = t * (((x * y) * (18.0 * z)) - (a * 4.0));
	} else if (z <= 3.5e-192) {
		tmp = t_2;
	} else if (z <= 1.92e-31) {
		tmp = (x * (i * -4.0)) - t_1;
	} else if (z <= 4e+115) {
		tmp = t_2;
	} 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):
	t_1 = 27.0 * (j * k)
	t_2 = (b * c) - t_1
	tmp = 0
	if z <= -6e-207:
		tmp = t * (((x * y) * (18.0 * z)) - (a * 4.0))
	elif z <= 3.5e-192:
		tmp = t_2
	elif z <= 1.92e-31:
		tmp = (x * (i * -4.0)) - t_1
	elif z <= 4e+115:
		tmp = t_2
	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)
	t_1 = Float64(27.0 * Float64(j * k))
	t_2 = Float64(Float64(b * c) - t_1)
	tmp = 0.0
	if (z <= -6e-207)
		tmp = Float64(t * Float64(Float64(Float64(x * y) * Float64(18.0 * z)) - Float64(a * 4.0)));
	elseif (z <= 3.5e-192)
		tmp = t_2;
	elseif (z <= 1.92e-31)
		tmp = Float64(Float64(x * Float64(i * -4.0)) - t_1);
	elseif (z <= 4e+115)
		tmp = t_2;
	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)
	t_1 = 27.0 * (j * k);
	t_2 = (b * c) - t_1;
	tmp = 0.0;
	if (z <= -6e-207)
		tmp = t * (((x * y) * (18.0 * z)) - (a * 4.0));
	elseif (z <= 3.5e-192)
		tmp = t_2;
	elseif (z <= 1.92e-31)
		tmp = (x * (i * -4.0)) - t_1;
	elseif (z <= 4e+115)
		tmp = t_2;
	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_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[z, -6e-207], N[(t * N[(N[(N[(x * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-192], t$95$2, If[LessEqual[z, 1.92e-31], N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 4e+115], t$95$2, 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}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c - t_1\\
\mathbf{if}\;z \leq -6 \cdot 10^{-207}:\\
\;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right) - a \cdot 4\right)\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{-192}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.92 \cdot 10^{-31}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - t_1\\

\mathbf{elif}\;z \leq 4 \cdot 10^{+115}:\\
\;\;\;\;t_2\\

\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 4 regimes
  2. if z < -5.9999999999999999e-207

    1. Initial program 85.0%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left({\color{blue}{\left(x \cdot \left(y \cdot \left(z \cdot 18\right)\right)\right)}}^{1} - 4 \cdot a\right) \]
    5. Applied egg-rr51.6%

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

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

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

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

    if -5.9999999999999999e-207 < z < 3.50000000000000014e-192 or 1.9200000000000001e-31 < z < 4.0000000000000001e115

    1. Initial program 85.6%

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

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

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

    if 3.50000000000000014e-192 < z < 1.9200000000000001e-31

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    if 4.0000000000000001e115 < z

    1. Initial program 74.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. Simplified74.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 67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right) - a \cdot 4\right)\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-192}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 1.92 \cdot 10^{-31}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+115}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \]

Alternative 18: 49.2% accurate, 1.5× speedup?

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-194}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - t_1\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+101}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.15000000000000012e-206

    1. Initial program 85.0%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left({\color{blue}{\left(x \cdot \left(y \cdot \left(z \cdot 18\right)\right)\right)}}^{1} - 4 \cdot a\right) \]
    5. Applied egg-rr51.6%

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

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

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

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

    if -2.15000000000000012e-206 < z < 4.2e-194 or 2.14999999999999983e-30 < z < 1.1500000000000001e101

    1. Initial program 87.3%

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

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

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

    if 4.2e-194 < z < 2.14999999999999983e-30

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    if 1.1500000000000001e101 < z

    1. Initial program 73.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. Simplified73.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 64.2%

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

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

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

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

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

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

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

Alternative 19: 32.1% accurate, 1.6× speedup?

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

\mathbf{elif}\;z \leq -1.4 \cdot 10^{-231}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-190}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-28}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+118}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.6000000000000002e-78 or 1.95e118 < z

    1. Initial program 82.1%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 48.6%

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

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

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

    if -3.6000000000000002e-78 < z < -1.3999999999999999e-231

    1. Initial program 80.3%

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

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

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

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

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

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

    if -1.3999999999999999e-231 < z < 4.50000000000000021e-190 or 2.90000000000000013e-28 < z < 1.95e118

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

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

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

    if 4.50000000000000021e-190 < z < 2.90000000000000013e-28

    1. Initial program 89.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-78}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-190}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+118}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\ \end{array} \]

Alternative 20: 32.0% accurate, 1.6× speedup?

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

\mathbf{elif}\;z \leq -5.4 \cdot 10^{-227}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{-195}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-27}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

\mathbf{elif}\;z \leq 9 \cdot 10^{+117}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.80000000000000009e-69

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

    if -1.80000000000000009e-69 < z < -5.3999999999999999e-227

    1. Initial program 82.4%

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

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

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

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

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

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

    if -5.3999999999999999e-227 < z < 1.8e-195 or 5.80000000000000008e-27 < z < 9e117

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

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

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

    if 1.8e-195 < z < 5.80000000000000008e-27

    1. Initial program 89.0%

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

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

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

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

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

    if 9e117 < z

    1. Initial program 73.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-69}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-195}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-27}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+117}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\ \end{array} \]

Alternative 21: 32.5% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-195}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-28}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+119}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.3e-75

    1. Initial program 86.7%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 45.3%

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

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

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

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

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

    if -2.3e-75 < z < -2.1e-227

    1. Initial program 81.8%

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

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

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

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

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

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

    if -2.1e-227 < z < 2.1e-195 or 3.7000000000000002e-28 < z < 4.4000000000000003e119

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

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

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

    if 2.1e-195 < z < 3.7000000000000002e-28

    1. Initial program 89.0%

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

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

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

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

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

    if 4.4000000000000003e119 < z

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(--18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      8. distribute-lft-neg-in57.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-75}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-227}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-195}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+119}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 22: 46.2% accurate, 2.4× speedup?

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

\mathbf{elif}\;z \leq 8.2 \cdot 10^{+134}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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


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

    1. Initial program 86.6%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 48.7%

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

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

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

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

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

    if -7.4e19 < z < 8.2000000000000007e134

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

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

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

    if 8.2000000000000007e134 < z

    1. Initial program 71.6%

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

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

      \[\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)} \]
    4. Taylor expanded in t around inf 58.4%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      7. distribute-rgt-neg-in60.3%

        \[\leadsto \color{blue}{x \cdot \left(--18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      8. distribute-lft-neg-in60.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.4 \cdot 10^{+19}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+134}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 23: 32.2% accurate, 2.8× speedup?

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

\mathbf{elif}\;a \leq 2.45 \cdot 10^{-260}:\\
\;\;\;\;b \cdot c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.6000000000000001e83 or 1.55000000000000002e141 < a

    1. Initial program 76.9%

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

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

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

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

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

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

    if -5.6000000000000001e83 < a < 2.4500000000000001e-260

    1. Initial program 88.9%

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

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

    if 2.4500000000000001e-260 < a < 1.55000000000000002e141

    1. Initial program 83.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+83}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-260}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+141}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \end{array} \]

Alternative 24: 31.1% accurate, 4.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;j \leq -2.1 \cdot 10^{+67}:\\ \;\;\;\;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 (<= j -2.1e+67) (* 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 (j <= -2.1e+67) {
		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 (j <= (-2.1d+67)) 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 (j <= -2.1e+67) {
		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 j <= -2.1e+67:
		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 (j <= -2.1e+67)
		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 (j <= -2.1e+67)
		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[j, -2.1e+67], 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}\;j \leq -2.1 \cdot 10^{+67}:\\
\;\;\;\;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 j < -2.1000000000000001e67

    1. Initial program 75.9%

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

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

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

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

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

    if -2.1000000000000001e67 < j

    1. Initial program 85.6%

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

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

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

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

Alternative 25: 23.6% 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 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.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 23.3%

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

    \[\leadsto b \cdot c \]

Developer target: 89.3% 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 2023287 
(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)))