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

Percentage Accurate: 85.0% → 90.1%
Time: 28.1s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 85.0% accurate, 1.0× speedup?

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

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

Alternative 1: 90.1% accurate, 0.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := t \cdot \left(a \cdot 4\right)\\ t_2 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t_1\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\\ t_3 := j \cdot \left(27 \cdot k\right)\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{-77}:\\ \;\;\;\;\left(\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) - t_1\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - t_3\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(t, \mathsf{fma}\left(x, y \cdot \left(18 \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right) - 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 (* t (* a 4.0)))
        (t_2
         (- (+ (- (* (* (* (* x 18.0) y) z) t) t_1) (* b c)) (* (* x 4.0) i)))
        (t_3 (* j (* 27.0 k))))
   (if (<= t_2 -5e-77)
     (-
      (+ (- (* (* x (* 18.0 y)) (* z t)) t_1) (- (* b c) (* x (* 4.0 i))))
      t_3)
     (if (<= t_2 INFINITY)
       (fma
        (* j -27.0)
        k
        (fma t (fma x (* y (* 18.0 z)) (* a -4.0)) (fma b c (* -4.0 (* x i)))))
       (- (* x (+ (* 18.0 (* z (* y t))) (* i -4.0))) 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 = t * (a * 4.0);
	double t_2 = ((((((x * 18.0) * y) * z) * t) - t_1) + (b * c)) - ((x * 4.0) * i);
	double t_3 = j * (27.0 * k);
	double tmp;
	if (t_2 <= -5e-77) {
		tmp = ((((x * (18.0 * y)) * (z * t)) - t_1) + ((b * c) - (x * (4.0 * i)))) - t_3;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = fma((j * -27.0), k, fma(t, fma(x, (y * (18.0 * z)), (a * -4.0)), fma(b, c, (-4.0 * (x * i)))));
	} else {
		tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_3;
	}
	return tmp;
}
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(a * 4.0))
	t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_1) + Float64(b * c)) - Float64(Float64(x * 4.0) * i))
	t_3 = Float64(j * Float64(27.0 * k))
	tmp = 0.0
	if (t_2 <= -5e-77)
		tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) - t_1) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - t_3);
	elseif (t_2 <= Inf)
		tmp = fma(Float64(j * -27.0), k, fma(t, fma(x, Float64(y * Float64(18.0 * z)), Float64(a * -4.0)), fma(b, c, Float64(-4.0 * Float64(x * i)))));
	else
		tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) - t_3);
	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[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-77], N[(N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(j * -27.0), $MachinePrecision] * k + N[(t * N[(x * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot 4\right)\\
t_2 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t_1\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\\
t_3 := j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-77}:\\
\;\;\;\;\left(\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) - t_1\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.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)) < -4.99999999999999963e-77

    1. Initial program 89.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*89.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+89.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.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.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*88.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. Simplified88.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*89.9%

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

        \[\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. associate-*l*93.2%

        \[\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) \]
      4. associate-*l*93.1%

        \[\leadsto \left(\left(\color{blue}{\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) \]
      5. *-commutative93.1%

        \[\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) \]
    5. Applied egg-rr93.1%

      \[\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 -4.99999999999999963e-77 < (-.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)) < +inf.0

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

    if +inf.0 < (-.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))

    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--25.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*25.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*25.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. Simplified25.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. Step-by-step derivation
      1. associate-*r*25.0%

        \[\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--0.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. associate-*l*6.3%

        \[\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) \]
      4. associate-*l*6.3%

        \[\leadsto \left(\left(\color{blue}{\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) \]
      5. *-commutative6.3%

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

      \[\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) \]
    6. Taylor expanded in x around inf 75.0%

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

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

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

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

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

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

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

Alternative 2: 91.1% accurate, 0.3× speedup?

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

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_3\\

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


\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.99999999999999976e246

    1. Initial program 88.7%

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

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

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

        \[\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) \]
      4. associate-*l*94.9%

        \[\leadsto \left(\left(\color{blue}{\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) \]
      5. *-commutative94.9%

        \[\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) \]
    5. Applied egg-rr94.9%

      \[\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 -4.99999999999999976e246 < (-.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 98.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 \]

    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--17.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*21.7%

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

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

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

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

        \[\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) \]
      4. associate-*l*4.3%

        \[\leadsto \left(\left(\color{blue}{\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) \]
      5. *-commutative4.3%

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

      \[\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) \]
    6. Taylor expanded in x around inf 65.2%

      \[\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) \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv65.2%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + i \cdot -4\right)} - j \cdot \left(27 \cdot k\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.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) - k \cdot \left(j \cdot 27\right) \leq -5 \cdot 10^{+246}:\\ \;\;\;\;\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{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) - k \cdot \left(j \cdot 27\right) \leq \infty:\\ \;\;\;\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right) - j \cdot \left(27 \cdot k\right)\\ \end{array} \]

Alternative 3: 52.9% accurate, 0.7× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c + t_1\\ t_3 := t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;b \cdot c \leq -7.7 \cdot 10^{+236}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{+97}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -5.8 \cdot 10^{-44}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5.9 \cdot 10^{-65}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 4.2 \cdot 10^{-283}:\\ \;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{-54}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 1.1 \cdot 10^{+57}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \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 (* k (* j -27.0)))
        (t_2 (+ (* b c) t_1))
        (t_3 (+ t_1 (* 18.0 (* t (* x (* y z)))))))
   (if (<= (* b c) -7.7e+236)
     t_2
     (if (<= (* b c) -2.5e+97)
       t_3
       (if (<= (* b c) -2e+96)
         t_2
         (if (<= (* b c) -5.8e-44)
           (+ (* j (* k -27.0)) (* a (* t -4.0)))
           (if (<= (* b c) -5.9e-65)
             t_3
             (if (<= (* b c) 4.2e-283)
               (+ t_1 (* x (* i -4.0)))
               (if (<= (* b c) 8e-54)
                 t_3
                 (if (<= (* b c) 1.1e+57)
                   (* -4.0 (+ (* x i) (* t a)))
                   (- (* 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 = k * (j * -27.0);
	double t_2 = (b * c) + t_1;
	double t_3 = t_1 + (18.0 * (t * (x * (y * z))));
	double tmp;
	if ((b * c) <= -7.7e+236) {
		tmp = t_2;
	} else if ((b * c) <= -2.5e+97) {
		tmp = t_3;
	} else if ((b * c) <= -2e+96) {
		tmp = t_2;
	} else if ((b * c) <= -5.8e-44) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if ((b * c) <= -5.9e-65) {
		tmp = t_3;
	} else if ((b * c) <= 4.2e-283) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 8e-54) {
		tmp = t_3;
	} else if ((b * c) <= 1.1e+57) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = k * (j * (-27.0d0))
    t_2 = (b * c) + t_1
    t_3 = t_1 + (18.0d0 * (t * (x * (y * z))))
    if ((b * c) <= (-7.7d+236)) then
        tmp = t_2
    else if ((b * c) <= (-2.5d+97)) then
        tmp = t_3
    else if ((b * c) <= (-2d+96)) then
        tmp = t_2
    else if ((b * c) <= (-5.8d-44)) then
        tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
    else if ((b * c) <= (-5.9d-65)) then
        tmp = t_3
    else if ((b * c) <= 4.2d-283) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if ((b * c) <= 8d-54) then
        tmp = t_3
    else if ((b * c) <= 1.1d+57) then
        tmp = (-4.0d0) * ((x * i) + (t * a))
    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 = k * (j * -27.0);
	double t_2 = (b * c) + t_1;
	double t_3 = t_1 + (18.0 * (t * (x * (y * z))));
	double tmp;
	if ((b * c) <= -7.7e+236) {
		tmp = t_2;
	} else if ((b * c) <= -2.5e+97) {
		tmp = t_3;
	} else if ((b * c) <= -2e+96) {
		tmp = t_2;
	} else if ((b * c) <= -5.8e-44) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if ((b * c) <= -5.9e-65) {
		tmp = t_3;
	} else if ((b * c) <= 4.2e-283) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 8e-54) {
		tmp = t_3;
	} else if ((b * c) <= 1.1e+57) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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 = k * (j * -27.0)
	t_2 = (b * c) + t_1
	t_3 = t_1 + (18.0 * (t * (x * (y * z))))
	tmp = 0
	if (b * c) <= -7.7e+236:
		tmp = t_2
	elif (b * c) <= -2.5e+97:
		tmp = t_3
	elif (b * c) <= -2e+96:
		tmp = t_2
	elif (b * c) <= -5.8e-44:
		tmp = (j * (k * -27.0)) + (a * (t * -4.0))
	elif (b * c) <= -5.9e-65:
		tmp = t_3
	elif (b * c) <= 4.2e-283:
		tmp = t_1 + (x * (i * -4.0))
	elif (b * c) <= 8e-54:
		tmp = t_3
	elif (b * c) <= 1.1e+57:
		tmp = -4.0 * ((x * i) + (t * a))
	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(k * Float64(j * -27.0))
	t_2 = Float64(Float64(b * c) + t_1)
	t_3 = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))))
	tmp = 0.0
	if (Float64(b * c) <= -7.7e+236)
		tmp = t_2;
	elseif (Float64(b * c) <= -2.5e+97)
		tmp = t_3;
	elseif (Float64(b * c) <= -2e+96)
		tmp = t_2;
	elseif (Float64(b * c) <= -5.8e-44)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0)));
	elseif (Float64(b * c) <= -5.9e-65)
		tmp = t_3;
	elseif (Float64(b * c) <= 4.2e-283)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (Float64(b * c) <= 8e-54)
		tmp = t_3;
	elseif (Float64(b * c) <= 1.1e+57)
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	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 = k * (j * -27.0);
	t_2 = (b * c) + t_1;
	t_3 = t_1 + (18.0 * (t * (x * (y * z))));
	tmp = 0.0;
	if ((b * c) <= -7.7e+236)
		tmp = t_2;
	elseif ((b * c) <= -2.5e+97)
		tmp = t_3;
	elseif ((b * c) <= -2e+96)
		tmp = t_2;
	elseif ((b * c) <= -5.8e-44)
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	elseif ((b * c) <= -5.9e-65)
		tmp = t_3;
	elseif ((b * c) <= 4.2e-283)
		tmp = t_1 + (x * (i * -4.0));
	elseif ((b * c) <= 8e-54)
		tmp = t_3;
	elseif ((b * c) <= 1.1e+57)
		tmp = -4.0 * ((x * i) + (t * a));
	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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7.7e+236], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -2.5e+97], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -2e+96], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5.8e-44], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.9e-65], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 4.2e-283], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8e-54], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.1e+57], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := k \cdot \left(j \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
t_3 := t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -7.7 \cdot 10^{+236}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+96}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \cdot c \leq -5.9 \cdot 10^{-65}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{-54}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 b c) < -7.70000000000000035e236 or -2.49999999999999999e97 < (*.f64 b c) < -2.0000000000000001e96

    1. Initial program 83.0%

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

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

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

    if -7.70000000000000035e236 < (*.f64 b c) < -2.49999999999999999e97 or -5.8000000000000003e-44 < (*.f64 b c) < -5.89999999999999978e-65 or 4.19999999999999994e-283 < (*.f64 b c) < 8.0000000000000002e-54

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

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

    if -2.0000000000000001e96 < (*.f64 b c) < -5.8000000000000003e-44

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-j \cdot \left(k \cdot 27\right)\right) + \left(-4 \cdot \left(t \cdot a\right)\right)} \]
      7. distribute-rgt-neg-in65.5%

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

        \[\leadsto j \cdot \left(-\color{blue}{27 \cdot k}\right) + \left(-4 \cdot \left(t \cdot a\right)\right) \]
      9. distribute-lft-neg-in65.5%

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

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

        \[\leadsto \color{blue}{\left(j \cdot -27\right) \cdot k} + \left(-4 \cdot \left(t \cdot a\right)\right) \]
      12. distribute-lft-neg-in65.6%

        \[\leadsto \left(j \cdot -27\right) \cdot k + \color{blue}{\left(-4\right) \cdot \left(t \cdot a\right)} \]
      13. metadata-eval65.6%

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

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

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

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

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

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

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

    if -5.89999999999999978e-65 < (*.f64 b c) < 4.19999999999999994e-283

    1. Initial program 83.9%

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

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

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

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

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

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

    if 8.0000000000000002e-54 < (*.f64 b c) < 1.1e57

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative65.3%

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

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative65.3%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified65.3%

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

    if 1.1e57 < (*.f64 b c)

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -7.7 \cdot 10^{+236}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{+97}:\\ \;\;\;\;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 \cdot c \leq -2 \cdot 10^{+96}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -5.8 \cdot 10^{-44}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5.9 \cdot 10^{-65}:\\ \;\;\;\;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 \cdot c \leq 4.2 \cdot 10^{-283}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{-54}:\\ \;\;\;\;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 \cdot c \leq 1.1 \cdot 10^{+57}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 4: 53.0% accurate, 0.7× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c + t_1\\ t_3 := t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;b \cdot c \leq -7.7 \cdot 10^{+236}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -3.1 \cdot 10^{+97}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-45}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-62}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 1.52 \cdot 10^{-282}:\\ \;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-53}:\\ \;\;\;\;t_1 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{+56}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \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 (* k (* j -27.0)))
        (t_2 (+ (* b c) t_1))
        (t_3 (+ t_1 (* 18.0 (* t (* x (* y z)))))))
   (if (<= (* b c) -7.7e+236)
     t_2
     (if (<= (* b c) -3.1e+97)
       t_3
       (if (<= (* b c) -2.5e+96)
         t_2
         (if (<= (* b c) -9.5e-45)
           (+ (* j (* k -27.0)) (* a (* t -4.0)))
           (if (<= (* b c) -8.5e-62)
             t_3
             (if (<= (* b c) 1.52e-282)
               (+ t_1 (* x (* i -4.0)))
               (if (<= (* b c) 2e-53)
                 (+ t_1 (* 18.0 (* (* y z) (* x t))))
                 (if (<= (* b c) 8.2e+56)
                   (* -4.0 (+ (* x i) (* t a)))
                   (- (* 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 = k * (j * -27.0);
	double t_2 = (b * c) + t_1;
	double t_3 = t_1 + (18.0 * (t * (x * (y * z))));
	double tmp;
	if ((b * c) <= -7.7e+236) {
		tmp = t_2;
	} else if ((b * c) <= -3.1e+97) {
		tmp = t_3;
	} else if ((b * c) <= -2.5e+96) {
		tmp = t_2;
	} else if ((b * c) <= -9.5e-45) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if ((b * c) <= -8.5e-62) {
		tmp = t_3;
	} else if ((b * c) <= 1.52e-282) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 2e-53) {
		tmp = t_1 + (18.0 * ((y * z) * (x * t)));
	} else if ((b * c) <= 8.2e+56) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = k * (j * (-27.0d0))
    t_2 = (b * c) + t_1
    t_3 = t_1 + (18.0d0 * (t * (x * (y * z))))
    if ((b * c) <= (-7.7d+236)) then
        tmp = t_2
    else if ((b * c) <= (-3.1d+97)) then
        tmp = t_3
    else if ((b * c) <= (-2.5d+96)) then
        tmp = t_2
    else if ((b * c) <= (-9.5d-45)) then
        tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
    else if ((b * c) <= (-8.5d-62)) then
        tmp = t_3
    else if ((b * c) <= 1.52d-282) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if ((b * c) <= 2d-53) then
        tmp = t_1 + (18.0d0 * ((y * z) * (x * t)))
    else if ((b * c) <= 8.2d+56) then
        tmp = (-4.0d0) * ((x * i) + (t * a))
    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 = k * (j * -27.0);
	double t_2 = (b * c) + t_1;
	double t_3 = t_1 + (18.0 * (t * (x * (y * z))));
	double tmp;
	if ((b * c) <= -7.7e+236) {
		tmp = t_2;
	} else if ((b * c) <= -3.1e+97) {
		tmp = t_3;
	} else if ((b * c) <= -2.5e+96) {
		tmp = t_2;
	} else if ((b * c) <= -9.5e-45) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if ((b * c) <= -8.5e-62) {
		tmp = t_3;
	} else if ((b * c) <= 1.52e-282) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 2e-53) {
		tmp = t_1 + (18.0 * ((y * z) * (x * t)));
	} else if ((b * c) <= 8.2e+56) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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 = k * (j * -27.0)
	t_2 = (b * c) + t_1
	t_3 = t_1 + (18.0 * (t * (x * (y * z))))
	tmp = 0
	if (b * c) <= -7.7e+236:
		tmp = t_2
	elif (b * c) <= -3.1e+97:
		tmp = t_3
	elif (b * c) <= -2.5e+96:
		tmp = t_2
	elif (b * c) <= -9.5e-45:
		tmp = (j * (k * -27.0)) + (a * (t * -4.0))
	elif (b * c) <= -8.5e-62:
		tmp = t_3
	elif (b * c) <= 1.52e-282:
		tmp = t_1 + (x * (i * -4.0))
	elif (b * c) <= 2e-53:
		tmp = t_1 + (18.0 * ((y * z) * (x * t)))
	elif (b * c) <= 8.2e+56:
		tmp = -4.0 * ((x * i) + (t * a))
	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(k * Float64(j * -27.0))
	t_2 = Float64(Float64(b * c) + t_1)
	t_3 = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))))
	tmp = 0.0
	if (Float64(b * c) <= -7.7e+236)
		tmp = t_2;
	elseif (Float64(b * c) <= -3.1e+97)
		tmp = t_3;
	elseif (Float64(b * c) <= -2.5e+96)
		tmp = t_2;
	elseif (Float64(b * c) <= -9.5e-45)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0)));
	elseif (Float64(b * c) <= -8.5e-62)
		tmp = t_3;
	elseif (Float64(b * c) <= 1.52e-282)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (Float64(b * c) <= 2e-53)
		tmp = Float64(t_1 + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))));
	elseif (Float64(b * c) <= 8.2e+56)
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	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 = k * (j * -27.0);
	t_2 = (b * c) + t_1;
	t_3 = t_1 + (18.0 * (t * (x * (y * z))));
	tmp = 0.0;
	if ((b * c) <= -7.7e+236)
		tmp = t_2;
	elseif ((b * c) <= -3.1e+97)
		tmp = t_3;
	elseif ((b * c) <= -2.5e+96)
		tmp = t_2;
	elseif ((b * c) <= -9.5e-45)
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	elseif ((b * c) <= -8.5e-62)
		tmp = t_3;
	elseif ((b * c) <= 1.52e-282)
		tmp = t_1 + (x * (i * -4.0));
	elseif ((b * c) <= 2e-53)
		tmp = t_1 + (18.0 * ((y * z) * (x * t)));
	elseif ((b * c) <= 8.2e+56)
		tmp = -4.0 * ((x * i) + (t * a));
	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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7.7e+236], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -3.1e+97], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -2.5e+96], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -9.5e-45], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -8.5e-62], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.52e-282], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e-53], N[(t$95$1 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e+56], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := k \cdot \left(j \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
t_3 := t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -7.7 \cdot 10^{+236}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{+96}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-62}:\\
\;\;\;\;t_3\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if (*.f64 b c) < -7.70000000000000035e236 or -3.09999999999999981e97 < (*.f64 b c) < -2.5000000000000002e96

    1. Initial program 83.0%

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

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

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

    if -7.70000000000000035e236 < (*.f64 b c) < -3.09999999999999981e97 or -9.5000000000000002e-45 < (*.f64 b c) < -8.4999999999999995e-62

    1. Initial program 94.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. Simplified99.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 72.7%

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

    if -2.5000000000000002e96 < (*.f64 b c) < -9.5000000000000002e-45

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-j \cdot \left(k \cdot 27\right)\right) + \left(-4 \cdot \left(t \cdot a\right)\right)} \]
      7. distribute-rgt-neg-in65.5%

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

        \[\leadsto j \cdot \left(-\color{blue}{27 \cdot k}\right) + \left(-4 \cdot \left(t \cdot a\right)\right) \]
      9. distribute-lft-neg-in65.5%

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

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

        \[\leadsto \color{blue}{\left(j \cdot -27\right) \cdot k} + \left(-4 \cdot \left(t \cdot a\right)\right) \]
      12. distribute-lft-neg-in65.6%

        \[\leadsto \left(j \cdot -27\right) \cdot k + \color{blue}{\left(-4\right) \cdot \left(t \cdot a\right)} \]
      13. metadata-eval65.6%

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

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

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

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

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

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

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

    if -8.4999999999999995e-62 < (*.f64 b c) < 1.52e-282

    1. Initial program 83.9%

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

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

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

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

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

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

    if 1.52e-282 < (*.f64 b c) < 2.00000000000000006e-53

    1. Initial program 95.8%

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

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

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

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

    if 2.00000000000000006e-53 < (*.f64 b c) < 8.2000000000000007e56

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative65.3%

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

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative65.3%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified65.3%

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

    if 8.2000000000000007e56 < (*.f64 b c)

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -7.7 \cdot 10^{+236}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -3.1 \cdot 10^{+97}:\\ \;\;\;\;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 \cdot c \leq -2.5 \cdot 10^{+96}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-45}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-62}:\\ \;\;\;\;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 \cdot c \leq 1.52 \cdot 10^{-282}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-53}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{+56}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 5: 53.8% accurate, 0.9× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := b \cdot c + t_1\\ \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+236}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -9.8 \cdot 10^{+98}:\\ \;\;\;\;t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq -3 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -4.2 \cdot 10^{-45}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{-80}:\\ \;\;\;\;t_1 + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 1.42 \cdot 10^{+56}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \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 (* k (* j -27.0))) (t_2 (+ (* b c) t_1)))
   (if (<= (* b c) -6.2e+236)
     t_2
     (if (<= (* b c) -9.8e+98)
       (+ t_1 (* 18.0 (* t (* x (* y z)))))
       (if (<= (* b c) -3e+96)
         t_2
         (if (<= (* b c) -4.2e-45)
           (+ (* j (* k -27.0)) (* a (* t -4.0)))
           (if (<= (* b c) 9.8e-80)
             (+ t_1 (* x (* 18.0 (* z (* y t)))))
             (if (<= (* b c) 1.42e+56)
               (* -4.0 (+ (* x i) (* t a)))
               (- (* 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 = k * (j * -27.0);
	double t_2 = (b * c) + t_1;
	double tmp;
	if ((b * c) <= -6.2e+236) {
		tmp = t_2;
	} else if ((b * c) <= -9.8e+98) {
		tmp = t_1 + (18.0 * (t * (x * (y * z))));
	} else if ((b * c) <= -3e+96) {
		tmp = t_2;
	} else if ((b * c) <= -4.2e-45) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if ((b * c) <= 9.8e-80) {
		tmp = t_1 + (x * (18.0 * (z * (y * t))));
	} else if ((b * c) <= 1.42e+56) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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) :: t_2
    real(8) :: tmp
    t_1 = k * (j * (-27.0d0))
    t_2 = (b * c) + t_1
    if ((b * c) <= (-6.2d+236)) then
        tmp = t_2
    else if ((b * c) <= (-9.8d+98)) then
        tmp = t_1 + (18.0d0 * (t * (x * (y * z))))
    else if ((b * c) <= (-3d+96)) then
        tmp = t_2
    else if ((b * c) <= (-4.2d-45)) then
        tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
    else if ((b * c) <= 9.8d-80) then
        tmp = t_1 + (x * (18.0d0 * (z * (y * t))))
    else if ((b * c) <= 1.42d+56) then
        tmp = (-4.0d0) * ((x * i) + (t * a))
    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 = k * (j * -27.0);
	double t_2 = (b * c) + t_1;
	double tmp;
	if ((b * c) <= -6.2e+236) {
		tmp = t_2;
	} else if ((b * c) <= -9.8e+98) {
		tmp = t_1 + (18.0 * (t * (x * (y * z))));
	} else if ((b * c) <= -3e+96) {
		tmp = t_2;
	} else if ((b * c) <= -4.2e-45) {
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	} else if ((b * c) <= 9.8e-80) {
		tmp = t_1 + (x * (18.0 * (z * (y * t))));
	} else if ((b * c) <= 1.42e+56) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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 = k * (j * -27.0)
	t_2 = (b * c) + t_1
	tmp = 0
	if (b * c) <= -6.2e+236:
		tmp = t_2
	elif (b * c) <= -9.8e+98:
		tmp = t_1 + (18.0 * (t * (x * (y * z))))
	elif (b * c) <= -3e+96:
		tmp = t_2
	elif (b * c) <= -4.2e-45:
		tmp = (j * (k * -27.0)) + (a * (t * -4.0))
	elif (b * c) <= 9.8e-80:
		tmp = t_1 + (x * (18.0 * (z * (y * t))))
	elif (b * c) <= 1.42e+56:
		tmp = -4.0 * ((x * i) + (t * a))
	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(k * Float64(j * -27.0))
	t_2 = Float64(Float64(b * c) + t_1)
	tmp = 0.0
	if (Float64(b * c) <= -6.2e+236)
		tmp = t_2;
	elseif (Float64(b * c) <= -9.8e+98)
		tmp = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))));
	elseif (Float64(b * c) <= -3e+96)
		tmp = t_2;
	elseif (Float64(b * c) <= -4.2e-45)
		tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0)));
	elseif (Float64(b * c) <= 9.8e-80)
		tmp = Float64(t_1 + Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))));
	elseif (Float64(b * c) <= 1.42e+56)
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	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 = k * (j * -27.0);
	t_2 = (b * c) + t_1;
	tmp = 0.0;
	if ((b * c) <= -6.2e+236)
		tmp = t_2;
	elseif ((b * c) <= -9.8e+98)
		tmp = t_1 + (18.0 * (t * (x * (y * z))));
	elseif ((b * c) <= -3e+96)
		tmp = t_2;
	elseif ((b * c) <= -4.2e-45)
		tmp = (j * (k * -27.0)) + (a * (t * -4.0));
	elseif ((b * c) <= 9.8e-80)
		tmp = t_1 + (x * (18.0 * (z * (y * t))));
	elseif ((b * c) <= 1.42e+56)
		tmp = -4.0 * ((x * i) + (t * a));
	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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+236], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -9.8e+98], N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3e+96], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -4.2e-45], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.8e-80], N[(t$95$1 + N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.42e+56], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := k \cdot \left(j \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+236}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \cdot c \leq -3 \cdot 10^{+96}:\\
\;\;\;\;t_2\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 b c) < -6.19999999999999999e236 or -9.79999999999999958e98 < (*.f64 b c) < -3e96

    1. Initial program 83.0%

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

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

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

    if -6.19999999999999999e236 < (*.f64 b c) < -9.79999999999999958e98

    1. Initial program 99.9%

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

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

    if -3e96 < (*.f64 b c) < -4.1999999999999999e-45

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-j \cdot \left(k \cdot 27\right)\right) + \left(-4 \cdot \left(t \cdot a\right)\right)} \]
      7. distribute-rgt-neg-in65.5%

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

        \[\leadsto j \cdot \left(-\color{blue}{27 \cdot k}\right) + \left(-4 \cdot \left(t \cdot a\right)\right) \]
      9. distribute-lft-neg-in65.5%

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

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

        \[\leadsto \color{blue}{\left(j \cdot -27\right) \cdot k} + \left(-4 \cdot \left(t \cdot a\right)\right) \]
      12. distribute-lft-neg-in65.6%

        \[\leadsto \left(j \cdot -27\right) \cdot k + \color{blue}{\left(-4\right) \cdot \left(t \cdot a\right)} \]
      13. metadata-eval65.6%

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

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

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

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

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

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

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

    if -4.1999999999999999e-45 < (*.f64 b c) < 9.79999999999999981e-80

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    8. Simplified57.4%

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

    if 9.79999999999999981e-80 < (*.f64 b c) < 1.42e56

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative64.3%

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

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative64.3%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified64.3%

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

    if 1.42e56 < (*.f64 b c)

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+236}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -9.8 \cdot 10^{+98}:\\ \;\;\;\;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 \cdot c \leq -3 \cdot 10^{+96}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -4.2 \cdot 10^{-45}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{-80}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 1.42 \cdot 10^{+56}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 6: 87.0% accurate, 0.9× speedup?

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

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

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


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

    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--82.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*82.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*82.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. Simplified82.8%

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

        \[\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. associate-*l*74.3%

        \[\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) \]
      4. associate-*l*74.2%

        \[\leadsto \left(\left(\color{blue}{\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) \]
      5. *-commutative74.2%

        \[\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) \]
    5. Applied egg-rr74.2%

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

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

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

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

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

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

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

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

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

    if -1.75999999999999994e104 < t < 3.0000000000000002e64

    1. Initial program 88.3%

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

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

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

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

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

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

        \[\leadsto \left(\left(\color{blue}{\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) \]
      5. *-commutative92.8%

        \[\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) \]
    5. Applied egg-rr92.8%

      \[\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) \]
    6. Taylor expanded in x around 0 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--90.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*92.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*92.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. Simplified92.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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.9%

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

Alternative 7: 86.3% accurate, 0.9× speedup?

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < 2.1500000000000002e215

    1. Initial program 88.3%

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

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

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

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

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

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

    if 2.1500000000000002e215 < (*.f64 b c)

    1. Initial program 71.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. Simplified78.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 89.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq 2.15 \cdot 10^{+215}:\\ \;\;\;\;\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}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 8: 70.3% accurate, 1.1× 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)\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+48}:\\ \;\;\;\;\left(b \cdot c - t_1\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;t_2 \leq 10^{+131}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_2\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(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))))
   (if (<= t_2 -5e+48)
     (- (- (* b c) t_1) (* j (* 27.0 k)))
     (if (<= t_2 1e+131)
       (- (+ (* b c) (* -4.0 (* t a))) t_1)
       (- (- (* b c) (* 4.0 (* t a))) 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);
	double tmp;
	if (t_2 <= -5e+48) {
		tmp = ((b * c) - t_1) - (j * (27.0 * k));
	} else if (t_2 <= 1e+131) {
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	} else {
		tmp = ((b * c) - (4.0 * (t * a))) - 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)
    if (t_2 <= (-5d+48)) then
        tmp = ((b * c) - t_1) - (j * (27.0d0 * k))
    else if (t_2 <= 1d+131) then
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
    else
        tmp = ((b * c) - (4.0d0 * (t * a))) - 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);
	double tmp;
	if (t_2 <= -5e+48) {
		tmp = ((b * c) - t_1) - (j * (27.0 * k));
	} else if (t_2 <= 1e+131) {
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	} else {
		tmp = ((b * c) - (4.0 * (t * a))) - 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)
	tmp = 0
	if t_2 <= -5e+48:
		tmp = ((b * c) - t_1) - (j * (27.0 * k))
	elif t_2 <= 1e+131:
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1
	else:
		tmp = ((b * c) - (4.0 * (t * a))) - 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(k * Float64(j * 27.0))
	tmp = 0.0
	if (t_2 <= -5e+48)
		tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(j * Float64(27.0 * k)));
	elseif (t_2 <= 1e+131)
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1);
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - 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);
	tmp = 0.0;
	if (t_2 <= -5e+48)
		tmp = ((b * c) - t_1) - (j * (27.0 * k));
	elseif (t_2 <= 1e+131)
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	else
		tmp = ((b * c) - (4.0 * (t * a))) - t_2;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+48], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+131], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\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)\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+48}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - j \cdot \left(27 \cdot k\right)\\

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

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


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

    1. Initial program 87.8%

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

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

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

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

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

    if -4.99999999999999973e48 < (*.f64 (*.f64 j 27) k) < 9.9999999999999991e130

    1. Initial program 86.3%

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

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

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

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

    if 9.9999999999999991e130 < (*.f64 (*.f64 j 27) k)

    1. Initial program 85.3%

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

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

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

Alternative 9: 65.4% accurate, 1.2× speedup?

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

\mathbf{elif}\;x \leq -1.12 \cdot 10^{+35}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq -1.12 \cdot 10^{-31}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 8.2 \cdot 10^{+113}:\\
\;\;\;\;t_2\\

\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 4 regimes
  2. if x < -2.6000000000000002e155 or -1.12000000000000003e35 < x < -1.12e-31

    1. Initial program 77.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. Simplified84.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. +-commutative84.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. *-commutative84.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-def86.2%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(j \cdot -27, k, \color{blue}{\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right)}\right) \]
    8. Step-by-step derivation
      1. fma-udef68.9%

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

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

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

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

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

    if -2.6000000000000002e155 < x < -1.12000000000000003e35 or 9.49999999999999984e-76 < x < 8.19999999999999985e113

    1. Initial program 83.0%

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

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

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

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

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

    if -1.12e-31 < x < 9.49999999999999984e-76

    1. Initial program 96.6%

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

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

    if 8.19999999999999985e113 < x

    1. Initial program 81.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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*71.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) \]
    8. Simplified71.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{+155}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z\right)\right) \cdot \left(18 \cdot t\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{+35}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{-31}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z\right)\right) \cdot \left(18 \cdot t\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-76}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+113}:\\ \;\;\;\;\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 10: 52.4% accurate, 1.2× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.3e110 or -4.5e17 < (*.f64 b c) < -1.09999999999999995e-29 or 3.69999999999999997e56 < (*.f64 b c)

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

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

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

    if -1.3e110 < (*.f64 b c) < -4.5e17 or -1.09999999999999995e-29 < (*.f64 b c) < 3.69999999999999997e56

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative48.3%

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

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative48.3%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified48.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.3 \cdot 10^{+110} \lor \neg \left(b \cdot c \leq -4.5 \cdot 10^{+17}\right) \land \left(b \cdot c \leq -1.1 \cdot 10^{-29} \lor \neg \left(b \cdot c \leq 3.7 \cdot 10^{+56}\right)\right):\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \end{array} \]

Alternative 11: 52.5% 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}\;b \cdot c \leq -6.2 \cdot 10^{+236}:\\ \;\;\;\;b \cdot c + t_1\\ \mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-44}:\\ \;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-54}:\\ \;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{+56}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \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 (* k (* j -27.0))))
   (if (<= (* b c) -6.2e+236)
     (+ (* b c) t_1)
     (if (<= (* b c) -7e-44)
       (+ t_1 (* -4.0 (* t a)))
       (if (<= (* b c) 8.2e-54)
         (+ t_1 (* x (* i -4.0)))
         (if (<= (* b c) 8.2e+56)
           (* -4.0 (+ (* x i) (* t a)))
           (- (* 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 = k * (j * -27.0);
	double tmp;
	if ((b * c) <= -6.2e+236) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -7e-44) {
		tmp = t_1 + (-4.0 * (t * a));
	} else if ((b * c) <= 8.2e-54) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 8.2e+56) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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 = k * (j * (-27.0d0))
    if ((b * c) <= (-6.2d+236)) then
        tmp = (b * c) + t_1
    else if ((b * c) <= (-7d-44)) then
        tmp = t_1 + ((-4.0d0) * (t * a))
    else if ((b * c) <= 8.2d-54) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if ((b * c) <= 8.2d+56) then
        tmp = (-4.0d0) * ((x * i) + (t * a))
    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 = k * (j * -27.0);
	double tmp;
	if ((b * c) <= -6.2e+236) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -7e-44) {
		tmp = t_1 + (-4.0 * (t * a));
	} else if ((b * c) <= 8.2e-54) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 8.2e+56) {
		tmp = -4.0 * ((x * i) + (t * a));
	} 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 = k * (j * -27.0)
	tmp = 0
	if (b * c) <= -6.2e+236:
		tmp = (b * c) + t_1
	elif (b * c) <= -7e-44:
		tmp = t_1 + (-4.0 * (t * a))
	elif (b * c) <= 8.2e-54:
		tmp = t_1 + (x * (i * -4.0))
	elif (b * c) <= 8.2e+56:
		tmp = -4.0 * ((x * i) + (t * a))
	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(k * Float64(j * -27.0))
	tmp = 0.0
	if (Float64(b * c) <= -6.2e+236)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (Float64(b * c) <= -7e-44)
		tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a)));
	elseif (Float64(b * c) <= 8.2e-54)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (Float64(b * c) <= 8.2e+56)
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	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 = k * (j * -27.0);
	tmp = 0.0;
	if ((b * c) <= -6.2e+236)
		tmp = (b * c) + t_1;
	elseif ((b * c) <= -7e-44)
		tmp = t_1 + (-4.0 * (t * a));
	elseif ((b * c) <= 8.2e-54)
		tmp = t_1 + (x * (i * -4.0));
	elseif ((b * c) <= 8.2e+56)
		tmp = -4.0 * ((x * i) + (t * a));
	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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+236], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7e-44], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-54], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e+56], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+236}:\\
\;\;\;\;b \cdot c + t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -6.19999999999999999e236

    1. Initial program 81.8%

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

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

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

    if -6.19999999999999999e236 < (*.f64 b c) < -6.9999999999999995e-44

    1. Initial program 92.3%

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

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

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

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

    if -6.9999999999999995e-44 < (*.f64 b c) < 8.2000000000000001e-54

    1. Initial program 86.1%

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

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

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

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

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

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

    if 8.2000000000000001e-54 < (*.f64 b c) < 8.2000000000000007e56

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative65.3%

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

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative65.3%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified65.3%

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

    if 8.2000000000000007e56 < (*.f64 b c)

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

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

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

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

Alternative 12: 77.1% accurate, 1.2× speedup?

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

    1. Initial program 82.6%

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

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

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

        \[\leadsto \left(\left(\color{blue}{\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) \]
      5. *-commutative87.5%

        \[\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) \]
    5. Applied egg-rr87.5%

      \[\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) \]
    6. Taylor expanded in x around inf 67.3%

      \[\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) \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv67.3%

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

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

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

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

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

    if -4.29999999999999994e133 < y < 2.60000000000000008e-148

    1. Initial program 90.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*90.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+90.9%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--91.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*90.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*90.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. Simplified90.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+133} \lor \neg \left(y \leq 2.6 \cdot 10^{-148}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\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 13: 75.9% accurate, 1.3× 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 -2.6 \cdot 10^{-35} \lor \neg \left(t \leq 4.6 \cdot 10^{+58}\right):\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\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 -2.6e-35) (not (<= t 4.6e+58)))
     (- (* t (- (* a (- 4.0)) (* (* z (* x y)) -18.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 <= -2.6e-35) || !(t <= 4.6e+58)) {
		tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.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 <= (-2.6d-35)) .or. (.not. (t <= 4.6d+58))) then
        tmp = (t * ((a * -4.0d0) - ((z * (x * y)) * (-18.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 <= -2.6e-35) || !(t <= 4.6e+58)) {
		tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.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 <= -2.6e-35) or not (t <= 4.6e+58):
		tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.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 <= -2.6e-35) || !(t <= 4.6e+58))
		tmp = Float64(Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.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 <= -2.6e-35) || ~((t <= 4.6e+58)))
		tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.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, -2.6e-35], N[Not[LessEqual[t, 4.6e+58]], $MachinePrecision]], N[(N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $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 -2.6 \cdot 10^{-35} \lor \neg \left(t \leq 4.6 \cdot 10^{+58}\right):\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\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 < -2.60000000000000005e-35 or 4.60000000000000005e58 < t

    1. Initial program 85.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate-*r*89.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--85.8%

        \[\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. associate-*l*82.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) \]
      4. associate-*l*82.5%

        \[\leadsto \left(\left(\color{blue}{\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) \]
      5. *-commutative82.5%

        \[\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) \]
    5. Applied egg-rr82.5%

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

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

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

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

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

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

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

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

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

    if -2.60000000000000005e-35 < t < 4.60000000000000005e58

    1. Initial program 87.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*87.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+87.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--87.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*86.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*86.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. Simplified86.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 t around 0 82.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-35} \lor \neg \left(t \leq 4.6 \cdot 10^{+58}\right):\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\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 14: 61.3% accurate, 1.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := x \cdot \left(y \cdot z\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;k \leq -2.15 \cdot 10^{-27}:\\ \;\;\;\;t_2 + 18 \cdot \left(t \cdot t_1\right)\\ \mathbf{elif}\;k \leq 1.1 \cdot 10^{+97}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;k \leq 1.85 \cdot 10^{+129}:\\ \;\;\;\;t_1 \cdot \left(18 \cdot t\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 7 \cdot 10^{+177}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2 + x \cdot \left(i \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 (* x (* y z)))
        (t_2 (* k (* j -27.0)))
        (t_3 (- (+ (* b c) (* -4.0 (* t a))) (* 4.0 (* x i)))))
   (if (<= k -2.15e-27)
     (+ t_2 (* 18.0 (* t t_1)))
     (if (<= k 1.1e+97)
       t_3
       (if (<= k 1.85e+129)
         (+ (* t_1 (* 18.0 t)) (* j (* k -27.0)))
         (if (<= k 7e+177) t_3 (+ t_2 (* x (* i -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 = x * (y * z);
	double t_2 = k * (j * -27.0);
	double t_3 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	double tmp;
	if (k <= -2.15e-27) {
		tmp = t_2 + (18.0 * (t * t_1));
	} else if (k <= 1.1e+97) {
		tmp = t_3;
	} else if (k <= 1.85e+129) {
		tmp = (t_1 * (18.0 * t)) + (j * (k * -27.0));
	} else if (k <= 7e+177) {
		tmp = t_3;
	} else {
		tmp = t_2 + (x * (i * -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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * (y * z)
    t_2 = k * (j * (-27.0d0))
    t_3 = ((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))
    if (k <= (-2.15d-27)) then
        tmp = t_2 + (18.0d0 * (t * t_1))
    else if (k <= 1.1d+97) then
        tmp = t_3
    else if (k <= 1.85d+129) then
        tmp = (t_1 * (18.0d0 * t)) + (j * (k * (-27.0d0)))
    else if (k <= 7d+177) then
        tmp = t_3
    else
        tmp = t_2 + (x * (i * (-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 = x * (y * z);
	double t_2 = k * (j * -27.0);
	double t_3 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	double tmp;
	if (k <= -2.15e-27) {
		tmp = t_2 + (18.0 * (t * t_1));
	} else if (k <= 1.1e+97) {
		tmp = t_3;
	} else if (k <= 1.85e+129) {
		tmp = (t_1 * (18.0 * t)) + (j * (k * -27.0));
	} else if (k <= 7e+177) {
		tmp = t_3;
	} else {
		tmp = t_2 + (x * (i * -4.0));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (y * z)
	t_2 = k * (j * -27.0)
	t_3 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))
	tmp = 0
	if k <= -2.15e-27:
		tmp = t_2 + (18.0 * (t * t_1))
	elif k <= 1.1e+97:
		tmp = t_3
	elif k <= 1.85e+129:
		tmp = (t_1 * (18.0 * t)) + (j * (k * -27.0))
	elif k <= 7e+177:
		tmp = t_3
	else:
		tmp = t_2 + (x * (i * -4.0))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(y * z))
	t_2 = Float64(k * Float64(j * -27.0))
	t_3 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i)))
	tmp = 0.0
	if (k <= -2.15e-27)
		tmp = Float64(t_2 + Float64(18.0 * Float64(t * t_1)));
	elseif (k <= 1.1e+97)
		tmp = t_3;
	elseif (k <= 1.85e+129)
		tmp = Float64(Float64(t_1 * Float64(18.0 * t)) + Float64(j * Float64(k * -27.0)));
	elseif (k <= 7e+177)
		tmp = t_3;
	else
		tmp = Float64(t_2 + Float64(x * Float64(i * -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 = x * (y * z);
	t_2 = k * (j * -27.0);
	t_3 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
	tmp = 0.0;
	if (k <= -2.15e-27)
		tmp = t_2 + (18.0 * (t * t_1));
	elseif (k <= 1.1e+97)
		tmp = t_3;
	elseif (k <= 1.85e+129)
		tmp = (t_1 * (18.0 * t)) + (j * (k * -27.0));
	elseif (k <= 7e+177)
		tmp = t_3;
	else
		tmp = t_2 + (x * (i * -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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -2.15e-27], N[(t$95$2 + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.1e+97], t$95$3, If[LessEqual[k, 1.85e+129], N[(N[(t$95$1 * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7e+177], t$95$3, N[(t$95$2 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
t_3 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;k \leq -2.15 \cdot 10^{-27}:\\
\;\;\;\;t_2 + 18 \cdot \left(t \cdot t_1\right)\\

\mathbf{elif}\;k \leq 1.1 \cdot 10^{+97}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;k \leq 1.85 \cdot 10^{+129}:\\
\;\;\;\;t_1 \cdot \left(18 \cdot t\right) + j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;k \leq 7 \cdot 10^{+177}:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 83.7%

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

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

    if -2.15000000000000001e-27 < k < 1.1e97 or 1.84999999999999989e129 < k < 6.99999999999999983e177

    1. Initial program 87.7%

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

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

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

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

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

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

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

    if 1.1e97 < k < 1.84999999999999989e129

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(j \cdot -27, k, \color{blue}{\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right)}\right) \]
    8. Step-by-step derivation
      1. fma-udef72.0%

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

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

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

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

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

    if 6.99999999999999983e177 < k

    1. Initial program 89.7%

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

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

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

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

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

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

Alternative 15: 75.8% accurate, 1.3× speedup?

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

    1. Initial program 85.8%

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

      \[\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 -2.05e-39 < t < 3.04999999999999988e57

    1. Initial program 87.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*87.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+87.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--87.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*86.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*86.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. Simplified86.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 t around 0 82.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{-39} \lor \neg \left(t \leq 3.05 \cdot 10^{+57}\right):\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\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 16: 49.8% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;k \leq 2.6 \cdot 10^{+56}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -1.05e-125 or 2.60000000000000011e56 < k

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

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

    if -1.05e-125 < k < 7.50000000000000006e-52

    1. Initial program 87.9%

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

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

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

    if 7.50000000000000006e-52 < k < 2.60000000000000011e56

    1. Initial program 93.8%

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative44.4%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out44.4%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative44.4%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified44.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.05 \cdot 10^{-125}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq 7.5 \cdot 10^{-52}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 2.6 \cdot 10^{+56}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 17: 50.1% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;k \leq 5 \cdot 10^{+59}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -4.2000000000000001e-120 or 4.9999999999999997e59 < k

    1. Initial program 84.5%

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

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

    if -4.2000000000000001e-120 < k < 1.79999999999999994e-52

    1. Initial program 87.9%

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

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

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

    if 1.79999999999999994e-52 < k < 4.9999999999999997e59

    1. Initial program 94.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*94.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+94.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--94.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*94.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*94.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. Simplified94.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 y around 0 72.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -4.2 \cdot 10^{-120}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.8 \cdot 10^{-52}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 5 \cdot 10^{+59}:\\ \;\;\;\;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 18: 51.2% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;k \leq 8.6 \cdot 10^{+58}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -1.02000000000000004e24

    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. Simplified89.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 a around inf 43.8%

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

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

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

    if -1.02000000000000004e24 < k < 4.89999999999999963e-53

    1. Initial program 88.4%

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

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

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

    if 4.89999999999999963e-53 < k < 8.59999999999999982e58

    1. Initial program 94.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*94.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+94.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--94.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*94.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*94.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. Simplified94.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 y around 0 72.4%

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

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

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

    if 8.59999999999999982e58 < k

    1. Initial program 81.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.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 62.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.02 \cdot 10^{+24}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 4.9 \cdot 10^{-53}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 8.6 \cdot 10^{+58}:\\ \;\;\;\;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 19: 41.5% accurate, 2.4× speedup?

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

\mathbf{elif}\;k \leq 5.7 \cdot 10^{+175}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -3.8000000000000002e-39

    1. Initial program 84.4%

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

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

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

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

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

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

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

    if -3.8000000000000002e-39 < k < 5.70000000000000024e175

    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--88.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.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*87.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. Simplified87.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 72.0%

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

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

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

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

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval41.6%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative41.6%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out41.6%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative41.6%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified41.6%

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

    if 5.70000000000000024e175 < k

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -3.8 \cdot 10^{-39}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq 5.7 \cdot 10^{+175}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]

Alternative 20: 23.6% 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 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. Simplified88.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 k around inf 23.6%

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

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

Alternative 21: 23.6% accurate, 6.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 89.1% 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 2023308 
(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)))