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

Percentage Accurate: 85.3% → 91.7%
Time: 20.0s
Alternatives: 17
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 85.3% accurate, 1.0× speedup?

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

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

Alternative 1: 91.7% accurate, 0.5× speedup?

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

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


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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

Alternative 2: 56.8% accurate, 0.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := x \cdot \left(y \cdot z\right)\\ t_2 := b \cdot c + 18 \cdot \left(t \cdot t_1\right)\\ t_3 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ t_4 := k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ t_5 := t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{+38}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-56}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-136}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-177}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-302}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-223}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-184}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-22}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+51}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+81}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \end{array} \]
NOTE: y and z 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 (* y z)))
        (t_2 (+ (* b c) (* 18.0 (* t t_1))))
        (t_3 (- (* b c) (* j (* 27.0 k))))
        (t_4 (+ (* k (* j -27.0)) (* -4.0 (* x i))))
        (t_5 (* t (- (* 18.0 t_1) (* a 4.0)))))
   (if (<= t -1.15e+125)
     t_5
     (if (<= t -1.25e+38)
       t_4
       (if (<= t -5e+14)
         t_2
         (if (<= t -4.5e-56)
           t_4
           (if (<= t -7e-136)
             t_2
             (if (<= t -5.8e-177)
               t_4
               (if (<= t 7.8e-302)
                 t_3
                 (if (<= t 5.5e-223)
                   (- (* b c) (* 4.0 (* x i)))
                   (if (<= t 9.5e-184)
                     t_3
                     (if (<= t 5.6e-22)
                       t_4
                       (if (<= t 6.2e+51)
                         t_2
                         (if (<= t 2.3e+81) t_4 t_5))))))))))))))
assert(y < z);
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 * (y * z);
	double t_2 = (b * c) + (18.0 * (t * t_1));
	double t_3 = (b * c) - (j * (27.0 * k));
	double t_4 = (k * (j * -27.0)) + (-4.0 * (x * i));
	double t_5 = t * ((18.0 * t_1) - (a * 4.0));
	double tmp;
	if (t <= -1.15e+125) {
		tmp = t_5;
	} else if (t <= -1.25e+38) {
		tmp = t_4;
	} else if (t <= -5e+14) {
		tmp = t_2;
	} else if (t <= -4.5e-56) {
		tmp = t_4;
	} else if (t <= -7e-136) {
		tmp = t_2;
	} else if (t <= -5.8e-177) {
		tmp = t_4;
	} else if (t <= 7.8e-302) {
		tmp = t_3;
	} else if (t <= 5.5e-223) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 9.5e-184) {
		tmp = t_3;
	} else if (t <= 5.6e-22) {
		tmp = t_4;
	} else if (t <= 6.2e+51) {
		tmp = t_2;
	} else if (t <= 2.3e+81) {
		tmp = t_4;
	} else {
		tmp = t_5;
	}
	return tmp;
}
NOTE: y and z 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) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = x * (y * z)
    t_2 = (b * c) + (18.0d0 * (t * t_1))
    t_3 = (b * c) - (j * (27.0d0 * k))
    t_4 = (k * (j * (-27.0d0))) + ((-4.0d0) * (x * i))
    t_5 = t * ((18.0d0 * t_1) - (a * 4.0d0))
    if (t <= (-1.15d+125)) then
        tmp = t_5
    else if (t <= (-1.25d+38)) then
        tmp = t_4
    else if (t <= (-5d+14)) then
        tmp = t_2
    else if (t <= (-4.5d-56)) then
        tmp = t_4
    else if (t <= (-7d-136)) then
        tmp = t_2
    else if (t <= (-5.8d-177)) then
        tmp = t_4
    else if (t <= 7.8d-302) then
        tmp = t_3
    else if (t <= 5.5d-223) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if (t <= 9.5d-184) then
        tmp = t_3
    else if (t <= 5.6d-22) then
        tmp = t_4
    else if (t <= 6.2d+51) then
        tmp = t_2
    else if (t <= 2.3d+81) then
        tmp = t_4
    else
        tmp = t_5
    end if
    code = tmp
end function
assert y < z;
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 * (y * z);
	double t_2 = (b * c) + (18.0 * (t * t_1));
	double t_3 = (b * c) - (j * (27.0 * k));
	double t_4 = (k * (j * -27.0)) + (-4.0 * (x * i));
	double t_5 = t * ((18.0 * t_1) - (a * 4.0));
	double tmp;
	if (t <= -1.15e+125) {
		tmp = t_5;
	} else if (t <= -1.25e+38) {
		tmp = t_4;
	} else if (t <= -5e+14) {
		tmp = t_2;
	} else if (t <= -4.5e-56) {
		tmp = t_4;
	} else if (t <= -7e-136) {
		tmp = t_2;
	} else if (t <= -5.8e-177) {
		tmp = t_4;
	} else if (t <= 7.8e-302) {
		tmp = t_3;
	} else if (t <= 5.5e-223) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 9.5e-184) {
		tmp = t_3;
	} else if (t <= 5.6e-22) {
		tmp = t_4;
	} else if (t <= 6.2e+51) {
		tmp = t_2;
	} else if (t <= 2.3e+81) {
		tmp = t_4;
	} else {
		tmp = t_5;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (y * z)
	t_2 = (b * c) + (18.0 * (t * t_1))
	t_3 = (b * c) - (j * (27.0 * k))
	t_4 = (k * (j * -27.0)) + (-4.0 * (x * i))
	t_5 = t * ((18.0 * t_1) - (a * 4.0))
	tmp = 0
	if t <= -1.15e+125:
		tmp = t_5
	elif t <= -1.25e+38:
		tmp = t_4
	elif t <= -5e+14:
		tmp = t_2
	elif t <= -4.5e-56:
		tmp = t_4
	elif t <= -7e-136:
		tmp = t_2
	elif t <= -5.8e-177:
		tmp = t_4
	elif t <= 7.8e-302:
		tmp = t_3
	elif t <= 5.5e-223:
		tmp = (b * c) - (4.0 * (x * i))
	elif t <= 9.5e-184:
		tmp = t_3
	elif t <= 5.6e-22:
		tmp = t_4
	elif t <= 6.2e+51:
		tmp = t_2
	elif t <= 2.3e+81:
		tmp = t_4
	else:
		tmp = t_5
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(y * z))
	t_2 = Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_1)))
	t_3 = Float64(Float64(b * c) - Float64(j * Float64(27.0 * k)))
	t_4 = Float64(Float64(k * Float64(j * -27.0)) + Float64(-4.0 * Float64(x * i)))
	t_5 = Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -1.15e+125)
		tmp = t_5;
	elseif (t <= -1.25e+38)
		tmp = t_4;
	elseif (t <= -5e+14)
		tmp = t_2;
	elseif (t <= -4.5e-56)
		tmp = t_4;
	elseif (t <= -7e-136)
		tmp = t_2;
	elseif (t <= -5.8e-177)
		tmp = t_4;
	elseif (t <= 7.8e-302)
		tmp = t_3;
	elseif (t <= 5.5e-223)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (t <= 9.5e-184)
		tmp = t_3;
	elseif (t <= 5.6e-22)
		tmp = t_4;
	elseif (t <= 6.2e+51)
		tmp = t_2;
	elseif (t <= 2.3e+81)
		tmp = t_4;
	else
		tmp = t_5;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (y * z);
	t_2 = (b * c) + (18.0 * (t * t_1));
	t_3 = (b * c) - (j * (27.0 * k));
	t_4 = (k * (j * -27.0)) + (-4.0 * (x * i));
	t_5 = t * ((18.0 * t_1) - (a * 4.0));
	tmp = 0.0;
	if (t <= -1.15e+125)
		tmp = t_5;
	elseif (t <= -1.25e+38)
		tmp = t_4;
	elseif (t <= -5e+14)
		tmp = t_2;
	elseif (t <= -4.5e-56)
		tmp = t_4;
	elseif (t <= -7e-136)
		tmp = t_2;
	elseif (t <= -5.8e-177)
		tmp = t_4;
	elseif (t <= 7.8e-302)
		tmp = t_3;
	elseif (t <= 5.5e-223)
		tmp = (b * c) - (4.0 * (x * i));
	elseif (t <= 9.5e-184)
		tmp = t_3;
	elseif (t <= 5.6e-22)
		tmp = t_4;
	elseif (t <= 6.2e+51)
		tmp = t_2;
	elseif (t <= 2.3e+81)
		tmp = t_4;
	else
		tmp = t_5;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+125], t$95$5, If[LessEqual[t, -1.25e+38], t$95$4, If[LessEqual[t, -5e+14], t$95$2, If[LessEqual[t, -4.5e-56], t$95$4, If[LessEqual[t, -7e-136], t$95$2, If[LessEqual[t, -5.8e-177], t$95$4, If[LessEqual[t, 7.8e-302], t$95$3, If[LessEqual[t, 5.5e-223], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-184], t$95$3, If[LessEqual[t, 5.6e-22], t$95$4, If[LessEqual[t, 6.2e+51], t$95$2, If[LessEqual[t, 2.3e+81], t$95$4, t$95$5]]]]]]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := b \cdot c + 18 \cdot \left(t \cdot t_1\right)\\
t_3 := b \cdot c - j \cdot \left(27 \cdot k\right)\\
t_4 := k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
t_5 := t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;t \leq -1.25 \cdot 10^{+38}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq -5 \cdot 10^{+14}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-56}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq -7 \cdot 10^{-136}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-177}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-302}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-184}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 5.6 \cdot 10^{-22}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+51}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{+81}:\\
\;\;\;\;t_4\\

\mathbf{else}:\\
\;\;\;\;t_5\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.15000000000000006e125 or 2.2999999999999999e81 < t

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

    if -1.15000000000000006e125 < t < -1.24999999999999992e38 or -5e14 < t < -4.5000000000000001e-56 or -7.00000000000000058e-136 < t < -5.79999999999999994e-177 or 9.4999999999999991e-184 < t < 5.5999999999999999e-22 or 6.20000000000000022e51 < t < 2.2999999999999999e81

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

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

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

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

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

    if -1.24999999999999992e38 < t < -5e14 or -4.5000000000000001e-56 < t < -7.00000000000000058e-136 or 5.5999999999999999e-22 < t < 6.20000000000000022e51

    1. Initial program 92.2%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 81.8%

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

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

    if -5.79999999999999994e-177 < t < 7.7999999999999998e-302 or 5.5e-223 < t < 9.4999999999999991e-184

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999998e-302 < t < 5.5e-223

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{+38}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+14}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-56}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-136}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-177}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-302}:\\ \;\;\;\;b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-223}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-184}:\\ \;\;\;\;b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-22}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+51}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+81}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 3: 57.2% accurate, 0.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := x \cdot \left(y \cdot z\right)\\ t_2 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ t_3 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_4 := b \cdot c + 18 \cdot \left(t \cdot t_1\right)\\ t_5 := t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\ t_6 := k \cdot \left(j \cdot -27\right)\\ t_7 := t_6 + -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+38}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+16}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-57}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-146}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-170}:\\ \;\;\;\;t_6 + z \cdot \left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-307}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-222}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-181}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-23}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+48}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+81}:\\ \;\;\;\;t_7\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \end{array} \]
NOTE: y and z 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 (* y z)))
        (t_2 (- (* b c) (* j (* 27.0 k))))
        (t_3 (- (* b c) (* 4.0 (* x i))))
        (t_4 (+ (* b c) (* 18.0 (* t t_1))))
        (t_5 (* t (- (* 18.0 t_1) (* a 4.0))))
        (t_6 (* k (* j -27.0)))
        (t_7 (+ t_6 (* -4.0 (* x i)))))
   (if (<= t -1.15e+125)
     t_5
     (if (<= t -3.7e+38)
       t_7
       (if (<= t -4e+16)
         t_4
         (if (<= t -3.8e-57)
           t_7
           (if (<= t -1.9e-146)
             t_3
             (if (<= t -2.4e-170)
               (+ t_6 (* z (* t (* x (* 18.0 y)))))
               (if (<= t 1.45e-307)
                 t_2
                 (if (<= t 2.25e-222)
                   t_3
                   (if (<= t 2.1e-181)
                     t_2
                     (if (<= t 3.3e-23)
                       t_7
                       (if (<= t 2.8e+48)
                         t_4
                         (if (<= t 2.3e+81) t_7 t_5))))))))))))))
assert(y < z);
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 * (y * z);
	double t_2 = (b * c) - (j * (27.0 * k));
	double t_3 = (b * c) - (4.0 * (x * i));
	double t_4 = (b * c) + (18.0 * (t * t_1));
	double t_5 = t * ((18.0 * t_1) - (a * 4.0));
	double t_6 = k * (j * -27.0);
	double t_7 = t_6 + (-4.0 * (x * i));
	double tmp;
	if (t <= -1.15e+125) {
		tmp = t_5;
	} else if (t <= -3.7e+38) {
		tmp = t_7;
	} else if (t <= -4e+16) {
		tmp = t_4;
	} else if (t <= -3.8e-57) {
		tmp = t_7;
	} else if (t <= -1.9e-146) {
		tmp = t_3;
	} else if (t <= -2.4e-170) {
		tmp = t_6 + (z * (t * (x * (18.0 * y))));
	} else if (t <= 1.45e-307) {
		tmp = t_2;
	} else if (t <= 2.25e-222) {
		tmp = t_3;
	} else if (t <= 2.1e-181) {
		tmp = t_2;
	} else if (t <= 3.3e-23) {
		tmp = t_7;
	} else if (t <= 2.8e+48) {
		tmp = t_4;
	} else if (t <= 2.3e+81) {
		tmp = t_7;
	} else {
		tmp = t_5;
	}
	return tmp;
}
NOTE: y and z 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) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: t_7
    real(8) :: tmp
    t_1 = x * (y * z)
    t_2 = (b * c) - (j * (27.0d0 * k))
    t_3 = (b * c) - (4.0d0 * (x * i))
    t_4 = (b * c) + (18.0d0 * (t * t_1))
    t_5 = t * ((18.0d0 * t_1) - (a * 4.0d0))
    t_6 = k * (j * (-27.0d0))
    t_7 = t_6 + ((-4.0d0) * (x * i))
    if (t <= (-1.15d+125)) then
        tmp = t_5
    else if (t <= (-3.7d+38)) then
        tmp = t_7
    else if (t <= (-4d+16)) then
        tmp = t_4
    else if (t <= (-3.8d-57)) then
        tmp = t_7
    else if (t <= (-1.9d-146)) then
        tmp = t_3
    else if (t <= (-2.4d-170)) then
        tmp = t_6 + (z * (t * (x * (18.0d0 * y))))
    else if (t <= 1.45d-307) then
        tmp = t_2
    else if (t <= 2.25d-222) then
        tmp = t_3
    else if (t <= 2.1d-181) then
        tmp = t_2
    else if (t <= 3.3d-23) then
        tmp = t_7
    else if (t <= 2.8d+48) then
        tmp = t_4
    else if (t <= 2.3d+81) then
        tmp = t_7
    else
        tmp = t_5
    end if
    code = tmp
end function
assert y < z;
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 * (y * z);
	double t_2 = (b * c) - (j * (27.0 * k));
	double t_3 = (b * c) - (4.0 * (x * i));
	double t_4 = (b * c) + (18.0 * (t * t_1));
	double t_5 = t * ((18.0 * t_1) - (a * 4.0));
	double t_6 = k * (j * -27.0);
	double t_7 = t_6 + (-4.0 * (x * i));
	double tmp;
	if (t <= -1.15e+125) {
		tmp = t_5;
	} else if (t <= -3.7e+38) {
		tmp = t_7;
	} else if (t <= -4e+16) {
		tmp = t_4;
	} else if (t <= -3.8e-57) {
		tmp = t_7;
	} else if (t <= -1.9e-146) {
		tmp = t_3;
	} else if (t <= -2.4e-170) {
		tmp = t_6 + (z * (t * (x * (18.0 * y))));
	} else if (t <= 1.45e-307) {
		tmp = t_2;
	} else if (t <= 2.25e-222) {
		tmp = t_3;
	} else if (t <= 2.1e-181) {
		tmp = t_2;
	} else if (t <= 3.3e-23) {
		tmp = t_7;
	} else if (t <= 2.8e+48) {
		tmp = t_4;
	} else if (t <= 2.3e+81) {
		tmp = t_7;
	} else {
		tmp = t_5;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (y * z)
	t_2 = (b * c) - (j * (27.0 * k))
	t_3 = (b * c) - (4.0 * (x * i))
	t_4 = (b * c) + (18.0 * (t * t_1))
	t_5 = t * ((18.0 * t_1) - (a * 4.0))
	t_6 = k * (j * -27.0)
	t_7 = t_6 + (-4.0 * (x * i))
	tmp = 0
	if t <= -1.15e+125:
		tmp = t_5
	elif t <= -3.7e+38:
		tmp = t_7
	elif t <= -4e+16:
		tmp = t_4
	elif t <= -3.8e-57:
		tmp = t_7
	elif t <= -1.9e-146:
		tmp = t_3
	elif t <= -2.4e-170:
		tmp = t_6 + (z * (t * (x * (18.0 * y))))
	elif t <= 1.45e-307:
		tmp = t_2
	elif t <= 2.25e-222:
		tmp = t_3
	elif t <= 2.1e-181:
		tmp = t_2
	elif t <= 3.3e-23:
		tmp = t_7
	elif t <= 2.8e+48:
		tmp = t_4
	elif t <= 2.3e+81:
		tmp = t_7
	else:
		tmp = t_5
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(y * z))
	t_2 = Float64(Float64(b * c) - Float64(j * Float64(27.0 * k)))
	t_3 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)))
	t_4 = Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_1)))
	t_5 = Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0)))
	t_6 = Float64(k * Float64(j * -27.0))
	t_7 = Float64(t_6 + Float64(-4.0 * Float64(x * i)))
	tmp = 0.0
	if (t <= -1.15e+125)
		tmp = t_5;
	elseif (t <= -3.7e+38)
		tmp = t_7;
	elseif (t <= -4e+16)
		tmp = t_4;
	elseif (t <= -3.8e-57)
		tmp = t_7;
	elseif (t <= -1.9e-146)
		tmp = t_3;
	elseif (t <= -2.4e-170)
		tmp = Float64(t_6 + Float64(z * Float64(t * Float64(x * Float64(18.0 * y)))));
	elseif (t <= 1.45e-307)
		tmp = t_2;
	elseif (t <= 2.25e-222)
		tmp = t_3;
	elseif (t <= 2.1e-181)
		tmp = t_2;
	elseif (t <= 3.3e-23)
		tmp = t_7;
	elseif (t <= 2.8e+48)
		tmp = t_4;
	elseif (t <= 2.3e+81)
		tmp = t_7;
	else
		tmp = t_5;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (y * z);
	t_2 = (b * c) - (j * (27.0 * k));
	t_3 = (b * c) - (4.0 * (x * i));
	t_4 = (b * c) + (18.0 * (t * t_1));
	t_5 = t * ((18.0 * t_1) - (a * 4.0));
	t_6 = k * (j * -27.0);
	t_7 = t_6 + (-4.0 * (x * i));
	tmp = 0.0;
	if (t <= -1.15e+125)
		tmp = t_5;
	elseif (t <= -3.7e+38)
		tmp = t_7;
	elseif (t <= -4e+16)
		tmp = t_4;
	elseif (t <= -3.8e-57)
		tmp = t_7;
	elseif (t <= -1.9e-146)
		tmp = t_3;
	elseif (t <= -2.4e-170)
		tmp = t_6 + (z * (t * (x * (18.0 * y))));
	elseif (t <= 1.45e-307)
		tmp = t_2;
	elseif (t <= 2.25e-222)
		tmp = t_3;
	elseif (t <= 2.1e-181)
		tmp = t_2;
	elseif (t <= 3.3e-23)
		tmp = t_7;
	elseif (t <= 2.8e+48)
		tmp = t_4;
	elseif (t <= 2.3e+81)
		tmp = t_7;
	else
		tmp = t_5;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+125], t$95$5, If[LessEqual[t, -3.7e+38], t$95$7, If[LessEqual[t, -4e+16], t$95$4, If[LessEqual[t, -3.8e-57], t$95$7, If[LessEqual[t, -1.9e-146], t$95$3, If[LessEqual[t, -2.4e-170], N[(t$95$6 + N[(z * N[(t * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e-307], t$95$2, If[LessEqual[t, 2.25e-222], t$95$3, If[LessEqual[t, 2.1e-181], t$95$2, If[LessEqual[t, 3.3e-23], t$95$7, If[LessEqual[t, 2.8e+48], t$95$4, If[LessEqual[t, 2.3e+81], t$95$7, t$95$5]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := b \cdot c - j \cdot \left(27 \cdot k\right)\\
t_3 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_4 := b \cdot c + 18 \cdot \left(t \cdot t_1\right)\\
t_5 := t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\
t_6 := k \cdot \left(j \cdot -27\right)\\
t_7 := t_6 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;t \leq -3.7 \cdot 10^{+38}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;t \leq -4 \cdot 10^{+16}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-57}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-146}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -2.4 \cdot 10^{-170}:\\
\;\;\;\;t_6 + z \cdot \left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{-307}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{-222}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-181}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-23}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+48}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{+81}:\\
\;\;\;\;t_7\\

\mathbf{else}:\\
\;\;\;\;t_5\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.15000000000000006e125 or 2.2999999999999999e81 < t

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

    if -1.15000000000000006e125 < t < -3.7000000000000001e38 or -4e16 < t < -3.7999999999999997e-57 or 2.10000000000000003e-181 < t < 3.30000000000000021e-23 or 2.80000000000000012e48 < t < 2.2999999999999999e81

    1. Initial program 84.3%

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

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

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

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

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

    if -3.7000000000000001e38 < t < -4e16 or 3.30000000000000021e-23 < t < 2.80000000000000012e48

    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. Step-by-step derivation
      1. associate-*l*80.9%

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 87.5%

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

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

    if -3.7999999999999997e-57 < t < -1.89999999999999997e-146 or 1.45e-307 < t < 2.25000000000000007e-222

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

    if -1.89999999999999997e-146 < t < -2.4e-170

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e-170 < t < 1.45e-307 or 2.25000000000000007e-222 < t < 2.10000000000000003e-181

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+38}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+16}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-57}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-146}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-170}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + z \cdot \left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-307}:\\ \;\;\;\;b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-222}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-181}:\\ \;\;\;\;b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-23}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+48}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+81}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 4: 52.9% accurate, 0.9× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := t_2 + t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+133}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -1.25 \cdot 10^{+25}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq -7.4 \cdot 10^{-179}:\\ \;\;\;\;t_2 + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{-57} \lor \neg \left(b \cdot c \leq 2.7 \cdot 10^{+36}\right) \land b \cdot c \leq 5.8 \cdot 10^{+156}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: y and z 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 (* k (* j -27.0)))
        (t_3 (+ t_2 (* t (* a -4.0)))))
   (if (<= (* b c) -5.5e+133)
     t_1
     (if (<= (* b c) -1.25e+25)
       t_3
       (if (<= (* b c) -7.4e-179)
         (+ t_2 (* -4.0 (* x i)))
         (if (or (<= (* b c) 9.6e-57)
                 (and (not (<= (* b c) 2.7e+36)) (<= (* b c) 5.8e+156)))
           t_3
           t_1))))))
assert(y < z);
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 = k * (j * -27.0);
	double t_3 = t_2 + (t * (a * -4.0));
	double tmp;
	if ((b * c) <= -5.5e+133) {
		tmp = t_1;
	} else if ((b * c) <= -1.25e+25) {
		tmp = t_3;
	} else if ((b * c) <= -7.4e-179) {
		tmp = t_2 + (-4.0 * (x * i));
	} else if (((b * c) <= 9.6e-57) || (!((b * c) <= 2.7e+36) && ((b * c) <= 5.8e+156))) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: y and z 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 = k * (j * (-27.0d0))
    t_3 = t_2 + (t * (a * (-4.0d0)))
    if ((b * c) <= (-5.5d+133)) then
        tmp = t_1
    else if ((b * c) <= (-1.25d+25)) then
        tmp = t_3
    else if ((b * c) <= (-7.4d-179)) then
        tmp = t_2 + ((-4.0d0) * (x * i))
    else if (((b * c) <= 9.6d-57) .or. (.not. ((b * c) <= 2.7d+36)) .and. ((b * c) <= 5.8d+156)) then
        tmp = t_3
    else
        tmp = t_1
    end if
    code = tmp
end function
assert y < z;
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 = k * (j * -27.0);
	double t_3 = t_2 + (t * (a * -4.0));
	double tmp;
	if ((b * c) <= -5.5e+133) {
		tmp = t_1;
	} else if ((b * c) <= -1.25e+25) {
		tmp = t_3;
	} else if ((b * c) <= -7.4e-179) {
		tmp = t_2 + (-4.0 * (x * i));
	} else if (((b * c) <= 9.6e-57) || (!((b * c) <= 2.7e+36) && ((b * c) <= 5.8e+156))) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - (4.0 * (x * i))
	t_2 = k * (j * -27.0)
	t_3 = t_2 + (t * (a * -4.0))
	tmp = 0
	if (b * c) <= -5.5e+133:
		tmp = t_1
	elif (b * c) <= -1.25e+25:
		tmp = t_3
	elif (b * c) <= -7.4e-179:
		tmp = t_2 + (-4.0 * (x * i))
	elif ((b * c) <= 9.6e-57) or (not ((b * c) <= 2.7e+36) and ((b * c) <= 5.8e+156)):
		tmp = t_3
	else:
		tmp = t_1
	return tmp
y, z = sort([y, z])
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(k * Float64(j * -27.0))
	t_3 = Float64(t_2 + Float64(t * Float64(a * -4.0)))
	tmp = 0.0
	if (Float64(b * c) <= -5.5e+133)
		tmp = t_1;
	elseif (Float64(b * c) <= -1.25e+25)
		tmp = t_3;
	elseif (Float64(b * c) <= -7.4e-179)
		tmp = Float64(t_2 + Float64(-4.0 * Float64(x * i)));
	elseif ((Float64(b * c) <= 9.6e-57) || (!(Float64(b * c) <= 2.7e+36) && (Float64(b * c) <= 5.8e+156)))
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - (4.0 * (x * i));
	t_2 = k * (j * -27.0);
	t_3 = t_2 + (t * (a * -4.0));
	tmp = 0.0;
	if ((b * c) <= -5.5e+133)
		tmp = t_1;
	elseif ((b * c) <= -1.25e+25)
		tmp = t_3;
	elseif ((b * c) <= -7.4e-179)
		tmp = t_2 + (-4.0 * (x * i));
	elseif (((b * c) <= 9.6e-57) || (~(((b * c) <= 2.7e+36)) && ((b * c) <= 5.8e+156)))
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.5e+133], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1.25e+25], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -7.4e-179], N[(t$95$2 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(b * c), $MachinePrecision], 9.6e-57], And[N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.7e+36]], $MachinePrecision], LessEqual[N[(b * c), $MachinePrecision], 5.8e+156]]], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
t_3 := t_2 + t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+133}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -1.25 \cdot 10^{+25}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{-57} \lor \neg \left(b \cdot c \leq 2.7 \cdot 10^{+36}\right) \land b \cdot c \leq 5.8 \cdot 10^{+156}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -5.5e133 or 9.60000000000000025e-57 < (*.f64 b c) < 2.7000000000000001e36 or 5.80000000000000021e156 < (*.f64 b c)

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

    if -5.5e133 < (*.f64 b c) < -1.25000000000000006e25 or -7.39999999999999981e-179 < (*.f64 b c) < 9.60000000000000025e-57 or 2.7000000000000001e36 < (*.f64 b c) < 5.80000000000000021e156

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

    if -1.25000000000000006e25 < (*.f64 b c) < -7.39999999999999981e-179

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+133}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.25 \cdot 10^{+25}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -7.4 \cdot 10^{-179}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{-57} \lor \neg \left(b \cdot c \leq 2.7 \cdot 10^{+36}\right) \land b \cdot c \leq 5.8 \cdot 10^{+156}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 5: 88.3% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.00000000000000016e-156 or 5.3999999999999997e-170 < t

    1. Initial program 86.4%

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

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

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

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

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

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

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

    if -4.00000000000000016e-156 < t < 5.3999999999999997e-170

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

Alternative 6: 58.2% accurate, 1.2× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := b \cdot c - j \cdot \left(27 \cdot k\right)\\ t_2 := k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-307}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-223}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-14}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* j (* 27.0 k))))
        (t_2 (+ (* k (* j -27.0)) (* -4.0 (* x i))))
        (t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
   (if (<= t -1.15e+125)
     t_3
     (if (<= t -2.6e-47)
       t_2
       (if (<= t 3.4e-307)
         t_1
         (if (<= t 3.1e-223)
           (- (* b c) (* 4.0 (* x i)))
           (if (<= t 5.6e-183) t_1 (if (<= t 7e-14) t_2 t_3))))))))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) - (j * (27.0 * k));
	double t_2 = (k * (j * -27.0)) + (-4.0 * (x * i));
	double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -1.15e+125) {
		tmp = t_3;
	} else if (t <= -2.6e-47) {
		tmp = t_2;
	} else if (t <= 3.4e-307) {
		tmp = t_1;
	} else if (t <= 3.1e-223) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 5.6e-183) {
		tmp = t_1;
	} else if (t <= 7e-14) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
NOTE: y and z 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) - (j * (27.0d0 * k))
    t_2 = (k * (j * (-27.0d0))) + ((-4.0d0) * (x * i))
    t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    if (t <= (-1.15d+125)) then
        tmp = t_3
    else if (t <= (-2.6d-47)) then
        tmp = t_2
    else if (t <= 3.4d-307) then
        tmp = t_1
    else if (t <= 3.1d-223) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if (t <= 5.6d-183) then
        tmp = t_1
    else if (t <= 7d-14) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) - (j * (27.0 * k));
	double t_2 = (k * (j * -27.0)) + (-4.0 * (x * i));
	double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -1.15e+125) {
		tmp = t_3;
	} else if (t <= -2.6e-47) {
		tmp = t_2;
	} else if (t <= 3.4e-307) {
		tmp = t_1;
	} else if (t <= 3.1e-223) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (t <= 5.6e-183) {
		tmp = t_1;
	} else if (t <= 7e-14) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - (j * (27.0 * k))
	t_2 = (k * (j * -27.0)) + (-4.0 * (x * i))
	t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	tmp = 0
	if t <= -1.15e+125:
		tmp = t_3
	elif t <= -2.6e-47:
		tmp = t_2
	elif t <= 3.4e-307:
		tmp = t_1
	elif t <= 3.1e-223:
		tmp = (b * c) - (4.0 * (x * i))
	elif t <= 5.6e-183:
		tmp = t_1
	elif t <= 7e-14:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) - Float64(j * Float64(27.0 * k)))
	t_2 = Float64(Float64(k * Float64(j * -27.0)) + Float64(-4.0 * Float64(x * i)))
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -1.15e+125)
		tmp = t_3;
	elseif (t <= -2.6e-47)
		tmp = t_2;
	elseif (t <= 3.4e-307)
		tmp = t_1;
	elseif (t <= 3.1e-223)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (t <= 5.6e-183)
		tmp = t_1;
	elseif (t <= 7e-14)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - (j * (27.0 * k));
	t_2 = (k * (j * -27.0)) + (-4.0 * (x * i));
	t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -1.15e+125)
		tmp = t_3;
	elseif (t <= -2.6e-47)
		tmp = t_2;
	elseif (t <= 3.4e-307)
		tmp = t_1;
	elseif (t <= 3.1e-223)
		tmp = (b * c) - (4.0 * (x * i));
	elseif (t <= 5.6e-183)
		tmp = t_1;
	elseif (t <= 7e-14)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
NOTE: y and z 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[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+125], t$95$3, If[LessEqual[t, -2.6e-47], t$95$2, If[LessEqual[t, 3.4e-307], t$95$1, If[LessEqual[t, 3.1e-223], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e-183], t$95$1, If[LessEqual[t, 7e-14], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - j \cdot \left(27 \cdot k\right)\\
t_2 := k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-47}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{-307}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 5.6 \cdot 10^{-183}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 7 \cdot 10^{-14}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.15000000000000006e125 or 7.0000000000000005e-14 < t

    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. Step-by-step derivation
      1. associate-*l*85.4%

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

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

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

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

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

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

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

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

    if -1.15000000000000006e125 < t < -2.6e-47 or 5.5999999999999997e-183 < t < 7.0000000000000005e-14

    1. Initial program 81.9%

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

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

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

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

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

    if -2.6e-47 < t < 3.39999999999999989e-307 or 3.10000000000000018e-223 < t < 5.5999999999999997e-183

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.39999999999999989e-307 < t < 3.10000000000000018e-223

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+125}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-47}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-307}:\\ \;\;\;\;b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-223}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-183}:\\ \;\;\;\;b \cdot c - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-14}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 7: 81.0% accurate, 1.2× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.66000000000000011e158 or 1.1e43 < x

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

    if -1.66000000000000011e158 < x < 1.1e43

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

Alternative 8: 76.1% accurate, 1.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+60} \lor \neg \left(x \leq 3.5 \cdot 10^{+42}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(27 \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} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= x -7.5e+60) (not (<= x 3.5e+42)))
   (- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (* j (* 27.0 k)))
   (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))))
assert(y < z);
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 <= -7.5e+60) || !(x <= 3.5e+42)) {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (27.0 * k));
	} 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.
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 <= (-7.5d+60)) .or. (.not. (x <= 3.5d+42))) then
        tmp = (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))) - (j * (27.0d0 * k))
    else
        tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
    end if
    code = tmp
end function
assert y < z;
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 <= -7.5e+60) || !(x <= 3.5e+42)) {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (27.0 * k));
	} else {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (x <= -7.5e+60) or not (x <= 3.5e+42):
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (27.0 * k))
	else:
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k)
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((x <= -7.5e+60) || !(x <= 3.5e+42))
		tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - Float64(j * Float64(27.0 * k)));
	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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((x <= -7.5e+60) || ~((x <= 3.5e+42)))
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (27.0 * k));
	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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -7.5e+60], N[Not[LessEqual[x, 3.5e+42]], $MachinePrecision]], N[(N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+60} \lor \neg \left(x \leq 3.5 \cdot 10^{+42}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(27 \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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.5e60 or 3.50000000000000023e42 < x

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

    if -7.5e60 < x < 3.50000000000000023e42

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+60} \lor \neg \left(x \leq 3.5 \cdot 10^{+42}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(27 \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: 75.1% accurate, 1.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.32 \cdot 10^{+125} \lor \neg \left(t \leq 9 \cdot 10^{-19}\right):\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\ \end{array} \end{array} \]
NOTE: y and z 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 -1.32e+125) (not (<= t 9e-19)))
   (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
   (- (- (* b c) (* 4.0 (* x i))) (* j (* 27.0 k)))))
assert(y < z);
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 <= -1.32e+125) || !(t <= 9e-19)) {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	} 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.
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 <= (-1.32d+125)) .or. (.not. (t <= 9d-19))) then
        tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
    else
        tmp = ((b * c) - (4.0d0 * (x * i))) - (j * (27.0d0 * k))
    end if
    code = tmp
end function
assert y < z;
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 <= -1.32e+125) || !(t <= 9e-19)) {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	} else {
		tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (t <= -1.32e+125) or not (t <= 9e-19):
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))
	else:
		tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((t <= -1.32e+125) || !(t <= 9e-19))
		tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))));
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(j * Float64(27.0 * k)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((t <= -1.32e+125) || ~((t <= 9e-19)))
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.32e+125], N[Not[LessEqual[t, 9e-19]], $MachinePrecision]], 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[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.32 \cdot 10^{+125} \lor \neg \left(t \leq 9 \cdot 10^{-19}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.32000000000000006e125 or 9.00000000000000026e-19 < t

    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. Step-by-step derivation
      1. associate-*l*85.4%

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 84.8%

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

    if -1.32000000000000006e125 < t < 9.00000000000000026e-19

    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. Step-by-step derivation
      1. associate-*l*85.9%

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

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

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

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

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

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

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

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

Alternative 10: 64.1% accurate, 1.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000018e140 < x < 1.60000000000000007e43

    1. Initial program 92.2%

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

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

    if 1.60000000000000007e43 < x < 3.19999999999999981e238

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

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

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

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

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

    if 3.19999999999999981e238 < x

    1. Initial program 68.4%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 73.9%

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

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

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

Alternative 11: 53.5% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -49 or 1.69999999999999999e-63 < (*.f64 b c)

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

    if -49 < (*.f64 b c) < 1.69999999999999999e-63

    1. Initial program 84.2%

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

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

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

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

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

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

Alternative 12: 70.4% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 89.8%

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

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

    if -1.60000000000000008e97 < t < 3.4000000000000001e96

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

    if 3.4000000000000001e96 < t

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 52.3% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.0000000000000007e68 or 1.3000000000000001e-40 < x

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

    if -9.0000000000000007e68 < x < 1.3000000000000001e-40

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

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

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

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

Alternative 14: 52.3% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.05e69 or 2.5999999999999999e-41 < x

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

    if -3.05e69 < x < 2.5999999999999999e-41

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 44.8% accurate, 3.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ b \cdot c + k \cdot \left(j \cdot -27\right) \end{array} \]
NOTE: y and z 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) (* k (* j -27.0))))
assert(y < z);
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) + (k * (j * -27.0));
}
NOTE: y and z 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) + (k * (j * (-27.0d0)))
end function
assert y < z;
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) + (k * (j * -27.0));
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	return (b * c) + (k * (j * -27.0))
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(Float64(b * c) + Float64(k * Float64(j * -27.0)))
end
y, z = num2cell(sort([y, z])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = (b * c) + (k * (j * -27.0));
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
b \cdot c + k \cdot \left(j \cdot -27\right)
\end{array}
Derivation
  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. Simplified88.4%

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

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

    \[\leadsto b \cdot c + k \cdot \left(j \cdot -27\right) \]

Alternative 16: 24.3% accurate, 6.2× speedup?

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

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

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

    \[\leadsto -27 \cdot \left(j \cdot k\right) \]

Alternative 17: 24.3% accurate, 6.2× speedup?

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

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

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

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

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

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

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

    \[\leadsto j \cdot \left(k \cdot -27\right) \]

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 2023305 
(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)))