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

Percentage Accurate: 84.3% → 89.6%
Time: 22.9s
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: 84.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: 89.6% accurate, 0.1× 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 5 \cdot 10^{+303}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\left(\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + t \cdot \left(a \cdot -4\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(t, \mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\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
         (-
          (-
           (+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
           (* (* x 4.0) i))
          (* (* j 27.0) k))))
   (if (<= t_1 5e+303)
     t_1
     (if (<= t_1 INFINITY)
       (-
        (+
         (+ (* (* x (* 18.0 y)) (* z t)) (* t (* a -4.0)))
         (- (* b c) (* x (* 4.0 i))))
        (* j (* 27.0 k)))
       (fma
        (* j -27.0)
        k
        (fma
         t
         (fma x (* z (* 18.0 y)) (* a -4.0))
         (fma b c (* -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 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 <= 5e+303) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = ((((x * (18.0 * y)) * (z * t)) + (t * (a * -4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
	} else {
		tmp = fma((j * -27.0), k, fma(t, fma(x, (z * (18.0 * y)), (a * -4.0)), fma(b, c, (-4.0 * (x * i)))));
	}
	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 <= 5e+303)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) + Float64(t * Float64(a * -4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - Float64(j * Float64(27.0 * k)));
	else
		tmp = fma(Float64(j * -27.0), k, fma(t, fma(x, Float64(z * Float64(18.0 * y)), Float64(a * -4.0)), fma(b, c, Float64(-4.0 * Float64(x * i)))));
	end
	return 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, 5e+303], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * -27.0), $MachinePrecision] * k + N[(t * N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $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 5 \cdot 10^{+303}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 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)) < 4.9999999999999997e303

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

    if 4.9999999999999997e303 < (-.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 84.2%

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

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

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

        \[\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--84.2%

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

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

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

      \[\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. Step-by-step derivation
      1. fma-udef93.6%

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

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

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

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

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

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

    1. Initial program 0.0%

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

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right) + \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)} \]
      2. *-commutative37.5%

        \[\leadsto \color{blue}{\left(j \cdot -27\right) \cdot k} + \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) \]
      3. fma-def58.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(j \cdot -27, k, \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)\right)} \]
      4. associate-*r*58.3%

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

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

    \[\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 5 \cdot 10^{+303}:\\ \;\;\;\;\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{elif}\;\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(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + t \cdot \left(a \cdot -4\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(t, \mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right)\\ \end{array} \]

Alternative 2: 88.3% accurate, 0.3× 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 5 \cdot 10^{+303}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\left(\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) + t \cdot \left(a \cdot -4\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(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 5e+303)
     t_1
     (if (<= t_1 INFINITY)
       (-
        (+
         (+ (* (* x (* 18.0 y)) (* z t)) (* t (* a -4.0)))
         (- (* b c) (* x (* 4.0 i))))
        (* j (* 27.0 k)))
       (- (+ (* b c) (* -4.0 (* t a))) (* 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 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 <= 5e+303) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = ((((x * (18.0 * y)) * (z * t)) + (t * (a * -4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
	} else {
		tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	}
	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 <= 5e+303) {
		tmp = t_1;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = ((((x * (18.0 * y)) * (z * t)) + (t * (a * -4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
	} else {
		tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	}
	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 <= 5e+303:
		tmp = t_1
	elif t_1 <= math.inf:
		tmp = ((((x * (18.0 * y)) * (z * t)) + (t * (a * -4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k))
	else:
		tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))
	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 <= 5e+303)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) + Float64(t * Float64(a * -4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - Float64(j * Float64(27.0 * k)));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - 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)
	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 <= 5e+303)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = ((((x * (18.0 * y)) * (z * t)) + (t * (a * -4.0))) + ((b * c) - (x * (4.0 * i)))) - (j * (27.0 * k));
	else
		tmp = ((b * c) + (-4.0 * (t * a))) - (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_] := 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, 5e+303], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $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[(4.0 * N[(x * i), $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 5 \cdot 10^{+303}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 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)) < 4.9999999999999997e303

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

    if 4.9999999999999997e303 < (-.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 84.2%

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

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

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

        \[\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--84.2%

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

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

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

      \[\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. Step-by-step derivation
      1. fma-udef93.6%

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

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

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

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

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

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

    1. Initial program 0.0%

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

      \[\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) \]
    5. Taylor expanded in j around 0 50.0%

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

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

Alternative 3: 86.2% 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 -7.8 \cdot 10^{-150} \lor \neg \left(t \leq 2.7 \cdot 10^{-220}\right):\\ \;\;\;\;\left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 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 -7.8e-150) (not (<= t 2.7e-220)))
     (-
      (+
       (- (* b c) (* x (* 4.0 i)))
       (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
      t_1)
     (- (- (* b c) (* 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 <= -7.8e-150) || !(t <= 2.7e-220)) {
		tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	} else {
		tmp = ((b * c) - (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 <= (-7.8d-150)) .or. (.not. (t <= 2.7d-220))) then
        tmp = (((b * c) - (x * (4.0d0 * i))) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - t_1
    else
        tmp = ((b * c) - (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 <= -7.8e-150) || !(t <= 2.7e-220)) {
		tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	} else {
		tmp = ((b * c) - (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 <= -7.8e-150) or not (t <= 2.7e-220):
		tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1
	else:
		tmp = ((b * c) - (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 <= -7.8e-150) || !(t <= 2.7e-220))
		tmp = Float64(Float64(Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - t_1);
	else
		tmp = Float64(Float64(Float64(b * c) - 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 <= -7.8e-150) || ~((t <= 2.7e-220)))
		tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	else
		tmp = ((b * c) - (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, -7.8e-150], N[Not[LessEqual[t, 2.7e-220]], $MachinePrecision]], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $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 -7.8 \cdot 10^{-150} \lor \neg \left(t \leq 2.7 \cdot 10^{-220}\right):\\
\;\;\;\;\left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.8000000000000004e-150 or 2.7e-220 < t

    1. Initial program 87.5%

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

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

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

      \[\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 -7.8000000000000004e-150 < t < 2.7e-220

    1. Initial program 76.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*76.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+76.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--76.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*71.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*71.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. Simplified71.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 t around 0 94.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{-150} \lor \neg \left(t \leq 2.7 \cdot 10^{-220}\right):\\ \;\;\;\;\left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - j \cdot \left(27 \cdot k\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 4: 83.5% accurate, 1.1× 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 -60000 \lor \neg \left(t \leq 1.3 \cdot 10^{-15}\right):\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\ \mathbf{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 -60000.0) (not (<= t 1.3e-15)))
     (- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) 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 <= -60000.0) || !(t <= 1.3e-15)) {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - 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 <= (-60000.0d0)) .or. (.not. (t <= 1.3d-15))) then
        tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - 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 <= -60000.0) || !(t <= 1.3e-15)) {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - 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 <= -60000.0) or not (t <= 1.3e-15):
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - 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 <= -60000.0) || !(t <= 1.3e-15))
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - 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 <= -60000.0) || ~((t <= 1.3e-15)))
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - 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, -60000.0], N[Not[LessEqual[t, 1.3e-15]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 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 -60000 \lor \neg \left(t \leq 1.3 \cdot 10^{-15}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\

\mathbf{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 < -6e4 or 1.30000000000000002e-15 < t

    1. Initial program 86.0%

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

    if -6e4 < t < 1.30000000000000002e-15

    1. Initial program 84.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*84.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+84.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--84.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*83.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*83.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. Simplified83.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 y around 0 84.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -60000 \lor \neg \left(t \leq 1.3 \cdot 10^{-15}\right):\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\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 5: 79.0% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.3e29

    1. Initial program 86.9%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.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.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*89.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. Simplified89.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. Taylor expanded in y around 0 82.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) \]

    if 1.3e29 < z

    1. Initial program 80.0%

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

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

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

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

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

        \[\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*79.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-rr79.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 x around inf 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 73.2% accurate, 1.2× speedup?

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

\mathbf{elif}\;t \leq 8.2 \cdot 10^{-56}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - j \cdot \left(27 \cdot k\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7e5 or 6.2000000000000003e165 < t

    1. Initial program 82.0%

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

      \[\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 t around inf 79.2%

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

    if -7e5 < t < 8.2000000000000003e-56

    1. Initial program 84.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*84.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+84.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--84.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*83.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*83.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. Simplified83.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 0 81.2%

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

    if 8.2000000000000003e-56 < t < 6.2000000000000003e165

    1. Initial program 93.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*93.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+93.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--95.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*89.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*89.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. Simplified89.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. Taylor expanded in y around 0 76.8%

      \[\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) \]
    5. Taylor expanded in j around 0 74.8%

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

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

Alternative 7: 80.0% accurate, 1.2× speedup?

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+169}:\\
\;\;\;\;\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)\\

\mathbf{else}:\\
\;\;\;\;t_1 + 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 < -9e65

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

    if -9e65 < t < 1.15e169

    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--87.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*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 y around 0 81.6%

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

    if 1.15e169 < t

    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. 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. Taylor expanded in t around inf 81.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+65}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+169}:\\ \;\;\;\;\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)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ \end{array} \]

Alternative 8: 59.9% accurate, 1.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;j \leq -1.32 \cdot 10^{+200}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -1.3 \cdot 10^{+181} \lor \neg \left(j \leq -3.4 \cdot 10^{+139}\right) \land j \leq 2.7 \cdot 10^{-97}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= j -1.32e+200)
   (- (* 18.0 (* t (* x (* y z)))) (* 27.0 (* j k)))
   (if (or (<= j -1.3e+181) (and (not (<= j -3.4e+139)) (<= j 2.7e-97)))
     (- (+ (* b c) (* -4.0 (* t a))) (* 4.0 (* x i)))
     (+ (* k (* j -27.0)) (* x (* 18.0 (* z (* y t))))))))
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 (j <= -1.32e+200) {
		tmp = (18.0 * (t * (x * (y * z)))) - (27.0 * (j * k));
	} else if ((j <= -1.3e+181) || (!(j <= -3.4e+139) && (j <= 2.7e-97))) {
		tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	} else {
		tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
	}
	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 (j <= (-1.32d+200)) then
        tmp = (18.0d0 * (t * (x * (y * z)))) - (27.0d0 * (j * k))
    else if ((j <= (-1.3d+181)) .or. (.not. (j <= (-3.4d+139))) .and. (j <= 2.7d-97)) then
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))
    else
        tmp = (k * (j * (-27.0d0))) + (x * (18.0d0 * (z * (y * t))))
    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 (j <= -1.32e+200) {
		tmp = (18.0 * (t * (x * (y * z)))) - (27.0 * (j * k));
	} else if ((j <= -1.3e+181) || (!(j <= -3.4e+139) && (j <= 2.7e-97))) {
		tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	} else {
		tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if j <= -1.32e+200:
		tmp = (18.0 * (t * (x * (y * z)))) - (27.0 * (j * k))
	elif (j <= -1.3e+181) or (not (j <= -3.4e+139) and (j <= 2.7e-97)):
		tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))
	else:
		tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (j <= -1.32e+200)
		tmp = Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) - Float64(27.0 * Float64(j * k)));
	elseif ((j <= -1.3e+181) || (!(j <= -3.4e+139) && (j <= 2.7e-97)))
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i)));
	else
		tmp = Float64(Float64(k * Float64(j * -27.0)) + Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))));
	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 (j <= -1.32e+200)
		tmp = (18.0 * (t * (x * (y * z)))) - (27.0 * (j * k));
	elseif ((j <= -1.3e+181) || (~((j <= -3.4e+139)) && (j <= 2.7e-97)))
		tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	else
		tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
	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[j, -1.32e+200], N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[j, -1.3e+181], And[N[Not[LessEqual[j, -3.4e+139]], $MachinePrecision], LessEqual[j, 2.7e-97]]], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.32 \cdot 10^{+200}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;j \leq -1.3 \cdot 10^{+181} \lor \neg \left(j \leq -3.4 \cdot 10^{+139}\right) \land j \leq 2.7 \cdot 10^{-97}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -1.3199999999999999e200

    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. Step-by-step derivation
      1. associate-*l*90.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+90.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--90.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)} \]
    4. Taylor expanded in x around inf 73.8%

      \[\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) \]
    5. Taylor expanded in i around 0 51.4%

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

    if -1.3199999999999999e200 < j < -1.3e181 or -3.4000000000000002e139 < j < 2.69999999999999985e-97

    1. Initial program 84.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*84.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+84.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--87.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*87.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*87.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. Simplified87.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 y around 0 75.9%

      \[\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) \]
    5. Taylor expanded in j around 0 69.0%

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

    if -1.3e181 < j < -3.4000000000000002e139 or 2.69999999999999985e-97 < j

    1. Initial program 85.2%

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

      \[\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 z around inf 52.1%

      \[\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) \]
    4. Step-by-step derivation
      1. *-commutative52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.32 \cdot 10^{+200}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -1.3 \cdot 10^{+181} \lor \neg \left(j \leq -3.4 \cdot 10^{+139}\right) \land j \leq 2.7 \cdot 10^{-97}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 9: 50.0% accurate, 1.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ t_3 := b \cdot c + t_1\\ \mathbf{if}\;b \leq -4.3 \cdot 10^{+203}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -3.2 \cdot 10^{+137}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-35}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;b \leq 4.7 \cdot 10^{-282}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-20}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + t_1\\ \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 (* k (* j -27.0)))
        (t_2 (+ t_1 (* 18.0 (* t (* x (* y z))))))
        (t_3 (+ (* b c) t_1)))
   (if (<= b -4.3e+203)
     t_3
     (if (<= b -3.2e+137)
       t_2
       (if (<= b -6.5e-35)
         (- (* b c) (* (* x 4.0) i))
         (if (<= b 4.7e-282)
           t_2
           (if (<= b 3.2e-20) (+ (* -4.0 (* t a)) t_1) 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 = k * (j * -27.0);
	double t_2 = t_1 + (18.0 * (t * (x * (y * z))));
	double t_3 = (b * c) + t_1;
	double tmp;
	if (b <= -4.3e+203) {
		tmp = t_3;
	} else if (b <= -3.2e+137) {
		tmp = t_2;
	} else if (b <= -6.5e-35) {
		tmp = (b * c) - ((x * 4.0) * i);
	} else if (b <= 4.7e-282) {
		tmp = t_2;
	} else if (b <= 3.2e-20) {
		tmp = (-4.0 * (t * a)) + t_1;
	} 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 = k * (j * (-27.0d0))
    t_2 = t_1 + (18.0d0 * (t * (x * (y * z))))
    t_3 = (b * c) + t_1
    if (b <= (-4.3d+203)) then
        tmp = t_3
    else if (b <= (-3.2d+137)) then
        tmp = t_2
    else if (b <= (-6.5d-35)) then
        tmp = (b * c) - ((x * 4.0d0) * i)
    else if (b <= 4.7d-282) then
        tmp = t_2
    else if (b <= 3.2d-20) then
        tmp = ((-4.0d0) * (t * a)) + t_1
    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 = k * (j * -27.0);
	double t_2 = t_1 + (18.0 * (t * (x * (y * z))));
	double t_3 = (b * c) + t_1;
	double tmp;
	if (b <= -4.3e+203) {
		tmp = t_3;
	} else if (b <= -3.2e+137) {
		tmp = t_2;
	} else if (b <= -6.5e-35) {
		tmp = (b * c) - ((x * 4.0) * i);
	} else if (b <= 4.7e-282) {
		tmp = t_2;
	} else if (b <= 3.2e-20) {
		tmp = (-4.0 * (t * a)) + t_1;
	} 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 = k * (j * -27.0)
	t_2 = t_1 + (18.0 * (t * (x * (y * z))))
	t_3 = (b * c) + t_1
	tmp = 0
	if b <= -4.3e+203:
		tmp = t_3
	elif b <= -3.2e+137:
		tmp = t_2
	elif b <= -6.5e-35:
		tmp = (b * c) - ((x * 4.0) * i)
	elif b <= 4.7e-282:
		tmp = t_2
	elif b <= 3.2e-20:
		tmp = (-4.0 * (t * a)) + t_1
	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(k * Float64(j * -27.0))
	t_2 = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))))
	t_3 = Float64(Float64(b * c) + t_1)
	tmp = 0.0
	if (b <= -4.3e+203)
		tmp = t_3;
	elseif (b <= -3.2e+137)
		tmp = t_2;
	elseif (b <= -6.5e-35)
		tmp = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i));
	elseif (b <= 4.7e-282)
		tmp = t_2;
	elseif (b <= 3.2e-20)
		tmp = Float64(Float64(-4.0 * Float64(t * a)) + t_1);
	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 = k * (j * -27.0);
	t_2 = t_1 + (18.0 * (t * (x * (y * z))));
	t_3 = (b * c) + t_1;
	tmp = 0.0;
	if (b <= -4.3e+203)
		tmp = t_3;
	elseif (b <= -3.2e+137)
		tmp = t_2;
	elseif (b <= -6.5e-35)
		tmp = (b * c) - ((x * 4.0) * i);
	elseif (b <= 4.7e-282)
		tmp = t_2;
	elseif (b <= 3.2e-20)
		tmp = (-4.0 * (t * a)) + t_1;
	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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[b, -4.3e+203], t$95$3, If[LessEqual[b, -3.2e+137], t$95$2, If[LessEqual[b, -6.5e-35], N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.7e-282], t$95$2, If[LessEqual[b, 3.2e-20], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
t_3 := b \cdot c + t_1\\
\mathbf{if}\;b \leq -4.3 \cdot 10^{+203}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq -3.2 \cdot 10^{+137}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \leq 4.7 \cdot 10^{-282}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -4.3e203 or 3.1999999999999997e-20 < b

    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. Simplified83.7%

      \[\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 55.9%

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

    if -4.3e203 < b < -3.20000000000000019e137 or -6.4999999999999999e-35 < b < 4.7e-282

    1. Initial program 82.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. Simplified82.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 z around inf 50.3%

      \[\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) \]
    4. Step-by-step derivation
      1. *-commutative50.3%

        \[\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) \]
    5. Simplified50.3%

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

    if -3.20000000000000019e137 < b < -6.4999999999999999e-35

    1. Initial program 87.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*87.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+87.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--87.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.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*90.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. Simplified90.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 65.0%

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

        \[\leadsto b \cdot c - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(4 \cdot \left(i \cdot x\right)\right)\right)} \]
      2. expm1-udef34.2%

        \[\leadsto b \cdot c - \color{blue}{\left(e^{\mathsf{log1p}\left(4 \cdot \left(i \cdot x\right)\right)} - 1\right)} \]
      3. associate-*r*34.2%

        \[\leadsto b \cdot c - \left(e^{\mathsf{log1p}\left(\color{blue}{\left(4 \cdot i\right) \cdot x}\right)} - 1\right) \]
    7. Applied egg-rr34.2%

      \[\leadsto b \cdot c - \color{blue}{\left(e^{\mathsf{log1p}\left(\left(4 \cdot i\right) \cdot x\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def38.8%

        \[\leadsto b \cdot c - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(4 \cdot i\right) \cdot x\right)\right)} \]
      2. expm1-log1p59.5%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
      3. *-commutative59.5%

        \[\leadsto b \cdot c - \color{blue}{\left(i \cdot 4\right)} \cdot x \]
      4. associate-*l*62.6%

        \[\leadsto b \cdot c - \color{blue}{i \cdot \left(4 \cdot x\right)} \]
      5. *-commutative62.6%

        \[\leadsto b \cdot c - i \cdot \color{blue}{\left(x \cdot 4\right)} \]
    9. Simplified62.6%

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

    if 4.7e-282 < b < 3.1999999999999997e-20

    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. Simplified94.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 a around inf 68.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.3 \cdot 10^{+203}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \leq -3.2 \cdot 10^{+137}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-35}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;b \leq 4.7 \cdot 10^{-282}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-20}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 10: 75.1% accurate, 1.3× speedup?

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

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

    if -1.05e6 < t < 6.8000000000000004e-19

    1. Initial program 84.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1050000 \lor \neg \left(t \leq 6.8 \cdot 10^{-19}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) + k \cdot \left(j \cdot -27\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 11: 50.8% accurate, 1.6× 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)\\ \mathbf{if}\;c \leq -2.45 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 290:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;c \leq 2.15 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* 4.0 (* x i)))))
   (if (<= c -2.45e-85)
     t_1
     (if (<= c 290.0)
       (+ (* k (* j -27.0)) (* x (* 18.0 (* z (* y t)))))
       (if (<= c 2.15e+79) t_1 (- (* b c) (* 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) {
	double t_1 = (b * c) - (4.0 * (x * i));
	double tmp;
	if (c <= -2.45e-85) {
		tmp = t_1;
	} else if (c <= 290.0) {
		tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
	} else if (c <= 2.15e+79) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * 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) :: t_1
    real(8) :: tmp
    t_1 = (b * c) - (4.0d0 * (x * i))
    if (c <= (-2.45d-85)) then
        tmp = t_1
    else if (c <= 290.0d0) then
        tmp = (k * (j * (-27.0d0))) + (x * (18.0d0 * (z * (y * t))))
    else if (c <= 2.15d+79) then
        tmp = t_1
    else
        tmp = (b * c) - (27.0d0 * (j * 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 t_1 = (b * c) - (4.0 * (x * i));
	double tmp;
	if (c <= -2.45e-85) {
		tmp = t_1;
	} else if (c <= 290.0) {
		tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
	} else if (c <= 2.15e+79) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	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))
	tmp = 0
	if c <= -2.45e-85:
		tmp = t_1
	elif c <= 290.0:
		tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))))
	elif c <= 2.15e+79:
		tmp = t_1
	else:
		tmp = (b * c) - (27.0 * (j * k))
	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)))
	tmp = 0.0
	if (c <= -2.45e-85)
		tmp = t_1;
	elseif (c <= 290.0)
		tmp = Float64(Float64(k * Float64(j * -27.0)) + Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))));
	elseif (c <= 2.15e+79)
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * 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 = (b * c) - (4.0 * (x * i));
	tmp = 0.0;
	if (c <= -2.45e-85)
		tmp = t_1;
	elseif (c <= 290.0)
		tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
	elseif (c <= 2.15e+79)
		tmp = t_1;
	else
		tmp = (b * c) - (27.0 * (j * 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[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.45e-85], t$95$1, If[LessEqual[c, 290.0], N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.15e+79], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -2.45 \cdot 10^{-85}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 2.15 \cdot 10^{+79}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.45000000000000007e-85 or 290 < c < 2.1500000000000002e79

    1. Initial program 82.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*82.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+82.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--83.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*84.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*84.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. Simplified84.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 t around 0 62.4%

      \[\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 50.1%

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

    if -2.45000000000000007e-85 < c < 290

    1. Initial program 86.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.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 z around inf 52.9%

      \[\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) \]
    4. Step-by-step derivation
      1. *-commutative52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1500000000000002e79 < c

    1. Initial program 88.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*87.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+87.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--87.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*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 74.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 i around 0 63.1%

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

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

Alternative 12: 62.5% accurate, 1.6× speedup?

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

\mathbf{elif}\;j \leq 2.5 \cdot 10^{-97}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -9.4999999999999999e34

    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*91.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*91.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. Simplified91.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 73.3%

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

    if -9.4999999999999999e34 < j < 2.4999999999999998e-97

    1. Initial program 83.2%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + \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*86.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*86.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. Simplified86.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 y around 0 75.3%

      \[\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) \]
    5. Taylor expanded in j around 0 69.7%

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

    if 2.4999999999999998e-97 < j

    1. Initial program 84.6%

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

      \[\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) \]
    4. Step-by-step derivation
      1. *-commutative51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 49.1% accurate, 2.0× 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)\\ \mathbf{if}\;c \leq -2.25 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 31000:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 1.08 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* 4.0 (* x i)))))
   (if (<= c -2.25e-147)
     t_1
     (if (<= c 31000.0)
       (+ (* -4.0 (* t a)) (* k (* j -27.0)))
       (if (<= c 1.08e+79) t_1 (- (* b c) (* 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) {
	double t_1 = (b * c) - (4.0 * (x * i));
	double tmp;
	if (c <= -2.25e-147) {
		tmp = t_1;
	} else if (c <= 31000.0) {
		tmp = (-4.0 * (t * a)) + (k * (j * -27.0));
	} else if (c <= 1.08e+79) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * 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) :: t_1
    real(8) :: tmp
    t_1 = (b * c) - (4.0d0 * (x * i))
    if (c <= (-2.25d-147)) then
        tmp = t_1
    else if (c <= 31000.0d0) then
        tmp = ((-4.0d0) * (t * a)) + (k * (j * (-27.0d0)))
    else if (c <= 1.08d+79) then
        tmp = t_1
    else
        tmp = (b * c) - (27.0d0 * (j * 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 t_1 = (b * c) - (4.0 * (x * i));
	double tmp;
	if (c <= -2.25e-147) {
		tmp = t_1;
	} else if (c <= 31000.0) {
		tmp = (-4.0 * (t * a)) + (k * (j * -27.0));
	} else if (c <= 1.08e+79) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	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))
	tmp = 0
	if c <= -2.25e-147:
		tmp = t_1
	elif c <= 31000.0:
		tmp = (-4.0 * (t * a)) + (k * (j * -27.0))
	elif c <= 1.08e+79:
		tmp = t_1
	else:
		tmp = (b * c) - (27.0 * (j * k))
	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)))
	tmp = 0.0
	if (c <= -2.25e-147)
		tmp = t_1;
	elseif (c <= 31000.0)
		tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(k * Float64(j * -27.0)));
	elseif (c <= 1.08e+79)
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * 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 = (b * c) - (4.0 * (x * i));
	tmp = 0.0;
	if (c <= -2.25e-147)
		tmp = t_1;
	elseif (c <= 31000.0)
		tmp = (-4.0 * (t * a)) + (k * (j * -27.0));
	elseif (c <= 1.08e+79)
		tmp = t_1;
	else
		tmp = (b * c) - (27.0 * (j * 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[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.25e-147], t$95$1, If[LessEqual[c, 31000.0], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.08e+79], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -2.25 \cdot 10^{-147}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 31000:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;c \leq 1.08 \cdot 10^{+79}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.24999999999999986e-147 or 31000 < c < 1.08000000000000002e79

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

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

      \[\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 46.8%

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

    if -2.24999999999999986e-147 < c < 31000

    1. Initial program 86.6%

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

      \[\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 50.1%

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

    if 1.08000000000000002e79 < c

    1. Initial program 88.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*87.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+87.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--87.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*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 74.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 i around 0 63.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.25 \cdot 10^{-147}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq 31000:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 1.08 \cdot 10^{+79}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 14: 46.2% accurate, 2.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{+127}:\\ \;\;\;\;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 (<= k 2.8e+127)
   (- (* 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 (k <= 2.8e+127) {
		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 (k <= 2.8d+127) 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 (k <= 2.8e+127) {
		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 k <= 2.8e+127:
		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 (k <= 2.8e+127)
		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 (k <= 2.8e+127)
		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[LessEqual[k, 2.8e+127], 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}\;k \leq 2.8 \cdot 10^{+127}:\\
\;\;\;\;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 k < 2.8000000000000002e127

    1. Initial program 86.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*86.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+86.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--87.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*86.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*86.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. Simplified86.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 57.1%

      \[\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 42.3%

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

    if 2.8000000000000002e127 < k

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

      \[\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 67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{+127}:\\ \;\;\;\;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 15: 46.1% accurate, 2.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{+127}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \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 (<= k 2.8e+127)
   (- (* b c) (* (* x 4.0) 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 (k <= 2.8e+127) {
		tmp = (b * c) - ((x * 4.0) * 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 (k <= 2.8d+127) then
        tmp = (b * c) - ((x * 4.0d0) * 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 (k <= 2.8e+127) {
		tmp = (b * c) - ((x * 4.0) * 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 k <= 2.8e+127:
		tmp = (b * c) - ((x * 4.0) * 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 (k <= 2.8e+127)
		tmp = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * 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 (k <= 2.8e+127)
		tmp = (b * c) - ((x * 4.0) * 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[LessEqual[k, 2.8e+127], N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $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}\;k \leq 2.8 \cdot 10^{+127}:\\
\;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\

\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 k < 2.8000000000000002e127

    1. Initial program 86.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate-*l*86.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+86.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--87.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*86.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*86.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. Simplified86.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 57.1%

      \[\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 42.3%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. expm1-log1p-u24.3%

        \[\leadsto b \cdot c - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(4 \cdot \left(i \cdot x\right)\right)\right)} \]
      2. expm1-udef22.8%

        \[\leadsto b \cdot c - \color{blue}{\left(e^{\mathsf{log1p}\left(4 \cdot \left(i \cdot x\right)\right)} - 1\right)} \]
      3. associate-*r*22.8%

        \[\leadsto b \cdot c - \left(e^{\mathsf{log1p}\left(\color{blue}{\left(4 \cdot i\right) \cdot x}\right)} - 1\right) \]
    7. Applied egg-rr22.8%

      \[\leadsto b \cdot c - \color{blue}{\left(e^{\mathsf{log1p}\left(\left(4 \cdot i\right) \cdot x\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def24.3%

        \[\leadsto b \cdot c - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(4 \cdot i\right) \cdot x\right)\right)} \]
      2. expm1-log1p42.3%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
      3. *-commutative42.3%

        \[\leadsto b \cdot c - \color{blue}{\left(i \cdot 4\right)} \cdot x \]
      4. associate-*l*42.7%

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

        \[\leadsto b \cdot c - i \cdot \color{blue}{\left(x \cdot 4\right)} \]
    9. Simplified42.7%

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

    if 2.8000000000000002e127 < k

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

      \[\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 67.7%

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

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

Alternative 16: 44.2% 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.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. Simplified86.6%

    \[\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 42.8%

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

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

Alternative 17: 23.9% 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.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. Simplified86.6%

    \[\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 22.8%

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

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

Developer target: 88.4% 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 2023306 
(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)))