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

Percentage Accurate: 85.5% → 89.9%
Time: 28.5s
Alternatives: 24
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 24 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 89.9% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4e131

    1. Initial program 76.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. sub-neg76.7%

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

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

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

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

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

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

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

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

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

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

    if -1.4e131 < y < 9.4999999999999995e38

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

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

    if 9.4999999999999995e38 < y

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.9% accurate, 0.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.1999999999999996e37 or 1.6500000000000001e177 < z

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.1999999999999996e37 < z < 1.6500000000000001e177

    1. Initial program 84.6%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j, -\color{blue}{k \cdot 27}, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      7. distribute-rgt-neg-in85.9%

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

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

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \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) + b \cdot c\right) + \left(-\left(x \cdot 4\right) \cdot i\right)}\right) \]
      10. +-commutative85.9%

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

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \left(-\color{blue}{x \cdot \left(4 \cdot i\right)}\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)\right) \]
      12. distribute-rgt-neg-in85.9%

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

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

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

Alternative 3: 92.5% accurate, 0.4× speedup?

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

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

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


\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)) < 3.99999999999999994e307

    1. Initial program 95.1%

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

    if 3.99999999999999994e307 < (-.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 77.2%

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

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

      \[\leadsto \color{blue}{c \cdot b + \left(-4 \cdot \left(a \cdot t\right) + \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) + -4 \cdot i\right) \cdot x\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. sub-neg0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.1% accurate, 0.9× speedup?

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

\mathbf{elif}\;y \leq -6.5 \cdot 10^{+59}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -1.25 \cdot 10^{-25}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right) - x \cdot \left(4 \cdot i + t_2 \cdot -18\right)\\

\mathbf{elif}\;y \leq -1.46 \cdot 10^{-80}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+30}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.30000000000000011e139 or 3.30000000000000026e30 < y

    1. Initial program 73.1%

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

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--76.4%

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

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

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

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

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

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

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

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

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

    if -1.30000000000000011e139 < y < -6.50000000000000021e59 or -1.2499999999999999e-25 < y < -1.46e-80 or 2.0199999999999999e-143 < y < 3.30000000000000026e30

    1. Initial program 85.2%

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

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

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

    if -6.50000000000000021e59 < y < -1.2499999999999999e-25

    1. Initial program 84.4%

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

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

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

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

    if -1.46e-80 < y < 2.0199999999999999e-143

    1. Initial program 98.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 y around 0 96.0%

      \[\leadsto \color{blue}{\left(c \cdot b - \left(4 \cdot \left(i \cdot x\right) + 4 \cdot \left(a \cdot t\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. distribute-lft-out96.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+139}:\\ \;\;\;\;\left(c \cdot b + 18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+59}:\\ \;\;\;\;c \cdot b + \left(-4 \cdot \left(t \cdot a\right) + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{-25}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) - x \cdot \left(4 \cdot i + \left(y \cdot \left(t \cdot z\right)\right) \cdot -18\right)\\ \mathbf{elif}\;y \leq -1.46 \cdot 10^{-80}:\\ \;\;\;\;c \cdot b + \left(-4 \cdot \left(t \cdot a\right) + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 2.02 \cdot 10^{-143}:\\ \;\;\;\;\left(c \cdot b - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+30}:\\ \;\;\;\;c \cdot b + \left(-4 \cdot \left(t \cdot a\right) + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot b + 18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 5: 80.8% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000039e-44 < (*.f64 (*.f64 j 27) k) < 9.99999999999999945e193

    1. Initial program 89.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. Simplified91.5%

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

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

    if 9.99999999999999945e193 < (*.f64 (*.f64 j 27) k)

    1. Initial program 76.8%

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

      \[\leadsto \color{blue}{\left(c \cdot b - \left(4 \cdot \left(i \cdot x\right) + 4 \cdot \left(a \cdot t\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. distribute-lft-out84.5%

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

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

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

Alternative 6: 80.4% accurate, 0.9× speedup?

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

\mathbf{elif}\;y \leq -2.65 \cdot 10^{+85}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -2.35 \cdot 10^{-38}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;y \leq 1.8 \cdot 10^{+27}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.20000000000000015e137

    1. Initial program 76.1%

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

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

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--78.9%

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

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

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

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

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

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

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

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

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

    if -2.20000000000000015e137 < y < -2.65e85 or 3.40000000000000017e-144 < y < 1.79999999999999991e27

    1. Initial program 82.1%

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

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

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

    if -2.65e85 < y < -2.34999999999999999e-38 or 1.79999999999999991e27 < y

    1. Initial program 76.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. sub-neg76.7%

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

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

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

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

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

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

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

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

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

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

    if -2.34999999999999999e-38 < y < 3.40000000000000017e-144

    1. Initial program 98.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 y around 0 93.9%

      \[\leadsto \color{blue}{\left(c \cdot b - \left(4 \cdot \left(i \cdot x\right) + 4 \cdot \left(a \cdot t\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. distribute-lft-out93.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+137}:\\ \;\;\;\;\left(c \cdot b + 18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{+85}:\\ \;\;\;\;c \cdot b + \left(-4 \cdot \left(t \cdot a\right) + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq -2.35 \cdot 10^{-38}:\\ \;\;\;\;\left(c \cdot b + t \cdot \left(18 \cdot \left(y \cdot \left(z \cdot x\right)\right) - 4 \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-144}:\\ \;\;\;\;\left(c \cdot b - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+27}:\\ \;\;\;\;c \cdot b + \left(-4 \cdot \left(t \cdot a\right) + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot b + t \cdot \left(18 \cdot \left(y \cdot \left(z \cdot x\right)\right) - 4 \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 7: 88.1% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.7000000000000004e130

    1. Initial program 76.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. sub-neg76.7%

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

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

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

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

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

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

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

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

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

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

    if -7.7000000000000004e130 < y < 1.3000000000000001e36

    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. sub-neg89.8%

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

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

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

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

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

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

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

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

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

    if 1.3000000000000001e36 < y

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 72.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-41} \lor \neg \left(t \leq 8 \cdot 10^{-15}\right) \land \left(t \leq 2 \cdot 10^{+102} \lor \neg \left(t \leq 1.3 \cdot 10^{+199}\right)\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.9999999999999998e-121 or 2.5999999999999998e-100 < t < 2.8000000000000002e-41 or 8.0000000000000006e-15 < t < 1.99999999999999995e102 or 1.3000000000000001e199 < t

    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. sub-neg82.6%

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999998e-121 < t < 2.5999999999999998e-100

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000002e-41 < t < 8.0000000000000006e-15 or 1.99999999999999995e102 < t < 1.3000000000000001e199

    1. Initial program 85.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)\right)} + k \cdot \left(j \cdot -27\right) \]
    6. Step-by-step derivation
      1. distribute-lft-out85.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-121}:\\ \;\;\;\;c \cdot b + t \cdot \left(18 \cdot \left(y \cdot \left(z \cdot x\right)\right) - 4 \cdot a\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-100}:\\ \;\;\;\;c \cdot b - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-41} \lor \neg \left(t \leq 8 \cdot 10^{-15}\right) \land \left(t \leq 2 \cdot 10^{+102} \lor \neg \left(t \leq 1.3 \cdot 10^{+199}\right)\right):\\ \;\;\;\;c \cdot b + t \cdot \left(18 \cdot \left(y \cdot \left(z \cdot x\right)\right) - 4 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]

Alternative 9: 72.8% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-14} \lor \neg \left(t \leq 1.46 \cdot 10^{+103}\right) \land t \leq 1.3 \cdot 10^{+199}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.50000000000000027e-121 or 1.9000000000000001e-14 < t < 1.45999999999999998e103 or 1.3000000000000001e199 < t

    1. Initial program 83.1%

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

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--87.4%

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

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

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

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

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

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

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

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

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

    if -7.50000000000000027e-121 < t < 2e-136

    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. Step-by-step derivation
      1. sub-neg92.3%

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--92.3%

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

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

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

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

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

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

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

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

    if 2e-136 < t < 3.3999999999999998e-41

    1. Initial program 72.1%

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

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--72.1%

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

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

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

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

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

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

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

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

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

    if 3.3999999999999998e-41 < t < 1.9000000000000001e-14 or 1.45999999999999998e103 < t < 1.3000000000000001e199

    1. Initial program 85.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)\right)} + k \cdot \left(j \cdot -27\right) \]
    6. Step-by-step derivation
      1. distribute-lft-out85.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-121}:\\ \;\;\;\;c \cdot b + t \cdot \left(18 \cdot \left(y \cdot \left(z \cdot x\right)\right) - 4 \cdot a\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-136}:\\ \;\;\;\;c \cdot b - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-41}:\\ \;\;\;\;\left(c \cdot b + 18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-14} \lor \neg \left(t \leq 1.46 \cdot 10^{+103}\right) \land t \leq 1.3 \cdot 10^{+199}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b + t \cdot \left(18 \cdot \left(y \cdot \left(z \cdot x\right)\right) - 4 \cdot a\right)\\ \end{array} \]

Alternative 10: 63.8% accurate, 1.1× speedup?

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

\mathbf{elif}\;t \leq 10^{-108}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-70}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(t \cdot z\right)\right)\right) + t_1\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-15}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{+87} \lor \neg \left(t \leq 2.8 \cdot 10^{+198}\right):\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right) + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -7.50000000000000003e118

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

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--95.1%

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

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

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

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

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

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

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

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

    if -7.50000000000000003e118 < t < 1.00000000000000004e-108 or 1.25e-70 < t < 2.39999999999999995e-15

    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. sub-neg87.8%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e-108 < t < 1.25e-70

    1. Initial program 66.2%

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

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

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

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

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)} - 1\right)} + -27 \cdot \left(k \cdot j\right) \]
      3. *-commutative53.2%

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

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

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

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

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

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

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

    if 2.39999999999999995e-15 < t < 2.39999999999999981e87 or 2.8e198 < t

    1. Initial program 80.7%

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

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

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

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

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

    if 2.39999999999999981e87 < t < 2.8e198

    1. Initial program 79.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. sub-neg79.0%

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)\right)} + k \cdot \left(j \cdot -27\right) \]
    6. Step-by-step derivation
      1. distribute-lft-out71.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+118}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;t \leq 10^{-108}:\\ \;\;\;\;c \cdot b - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-70}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(t \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-15}:\\ \;\;\;\;c \cdot b - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+87} \lor \neg \left(t \leq 2.8 \cdot 10^{+198}\right):\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]

Alternative 11: 78.4% accurate, 1.1× speedup?

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

\mathbf{elif}\;y \leq -6.4 \cdot 10^{+59}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-23}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right) - x \cdot \left(4 \cdot i + \left(y \cdot \left(t \cdot z\right)\right) \cdot -18\right)\\

\mathbf{elif}\;y \leq 1.96 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.19999999999999972e124

    1. Initial program 77.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. sub-neg77.3%

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--80.0%

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

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

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

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

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

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

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

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

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

    if -7.19999999999999972e124 < y < -6.39999999999999964e59 or -1.90000000000000006e-23 < y < 1.96000000000000012e-57

    1. Initial program 92.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 y around 0 87.5%

      \[\leadsto \color{blue}{\left(c \cdot b - \left(4 \cdot \left(i \cdot x\right) + 4 \cdot \left(a \cdot t\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. distribute-lft-out87.5%

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

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

    if -6.39999999999999964e59 < y < -1.90000000000000006e-23

    1. Initial program 83.6%

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

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

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

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

    if 1.96000000000000012e-57 < y

    1. Initial program 76.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. sub-neg76.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+124}:\\ \;\;\;\;\left(c \cdot b + 18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -6.4 \cdot 10^{+59}:\\ \;\;\;\;\left(c \cdot b - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-23}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) - x \cdot \left(4 \cdot i + \left(y \cdot \left(t \cdot z\right)\right) \cdot -18\right)\\ \mathbf{elif}\;y \leq 1.96 \cdot 10^{-57}:\\ \;\;\;\;\left(c \cdot b - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b + t \cdot \left(18 \cdot \left(y \cdot \left(z \cdot x\right)\right) - 4 \cdot a\right)\\ \end{array} \]

Alternative 12: 62.7% accurate, 1.2× speedup?

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

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-69}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{-128}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 8 \cdot 10^{-75}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+22}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.95e125 or 5.8e22 < y

    1. Initial program 74.2%

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

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

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

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

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

    if -2.95e125 < y < -4.1999999999999999e-69 or -3.89999999999999997e-128 < y < 7.9999999999999997e-75

    1. Initial program 90.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. sub-neg90.3%

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)\right)} + k \cdot \left(j \cdot -27\right) \]
    6. Step-by-step derivation
      1. distribute-lft-out64.0%

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

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

    if -4.1999999999999999e-69 < y < -3.89999999999999997e-128 or 7.9999999999999997e-75 < y < 5.8e22

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.95 \cdot 10^{+125}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-69}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-128}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-75}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+22}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 13: 58.0% accurate, 1.3× speedup?

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

\mathbf{elif}\;y \leq -1.35 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3.1 \cdot 10^{-128}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-70}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{+76}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.2e125

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

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

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

    if -6.2e125 < y < -1.3499999999999999e-69 or -3.10000000000000003e-128 < y < 1.2000000000000001e-70

    1. Initial program 90.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. sub-neg90.3%

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)\right)} + k \cdot \left(j \cdot -27\right) \]
    6. Step-by-step derivation
      1. distribute-lft-out64.0%

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

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

    if -1.3499999999999999e-69 < y < -3.10000000000000003e-128 or 1.2000000000000001e-70 < y < 3.80000000000000024e76

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000024e76 < y

    1. Initial program 71.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+125}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-69}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-128}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-70}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+76}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(t \cdot z\right)\right) \cdot \left(y \cdot 18\right)\\ \end{array} \]

Alternative 14: 63.5% accurate, 1.3× speedup?

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

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

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

\mathbf{elif}\;i \leq 4.8 \cdot 10^{+93}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(t \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if i < -1.4000000000000001e109

    1. Initial program 86.0%

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

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

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right) + -4 \cdot \left(a \cdot t\right)\right)} + k \cdot \left(j \cdot -27\right) \]
    6. Step-by-step derivation
      1. distribute-lft-out65.9%

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

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

    if -1.4000000000000001e109 < i < -7.00000000000000035e-16

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000035e-16 < i < 4.7000000000000003e-22

    1. Initial program 89.1%

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

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--90.7%

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

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

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

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

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

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

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

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

    if 4.7000000000000003e-22 < i < 4.80000000000000021e93

    1. Initial program 68.4%

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

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

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

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

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)} - 1\right)} + -27 \cdot \left(k \cdot j\right) \]
      3. *-commutative37.4%

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

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

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

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

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

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

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

    if 4.80000000000000021e93 < i

    1. Initial program 84.3%

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

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

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--88.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.4 \cdot 10^{+109}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;i \leq -7 \cdot 10^{-16}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;i \leq 4.7 \cdot 10^{-22}:\\ \;\;\;\;\left(c \cdot b + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;i \leq 4.8 \cdot 10^{+93}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(t \cdot z\right)\right)\right) + -27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \end{array} \]

Alternative 15: 81.0% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.50000000000000004e124

    1. Initial program 77.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. sub-neg77.3%

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

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

        \[\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)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i - \left(-\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. distribute-rgt-out--80.0%

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

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

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

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

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

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

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

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

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

    if -9.50000000000000004e124 < y < 5.7999999999999999e-60

    1. Initial program 91.4%

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

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

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

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

    if 5.7999999999999999e-60 < y

    1. Initial program 76.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. sub-neg76.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 49.3% accurate, 1.5× speedup?

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

\mathbf{elif}\;b \leq -1.25 \cdot 10^{-128}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 2.3 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.19999999999999996e96 or 2.3000000000000001e-105 < b

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.19999999999999996e96 < b < -1.25e-128 or -2.6e-206 < b < 2.3000000000000001e-105

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e-128 < b < -2.6e-206

    1. Initial program 75.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{+96}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-128}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-206}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-105}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 17: 49.2% accurate, 1.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.09999999999999989e94 or 1.44999999999999998e-114 < b

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2.09999999999999989e94 < b < -1.1999999999999999e-128

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1999999999999999e-128 < b < -3.1000000000000001e-207

    1. Initial program 75.0%

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

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

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

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

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

    if -3.1000000000000001e-207 < b < 1.44999999999999998e-114

    1. Initial program 90.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. sub-neg90.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.1 \cdot 10^{+94}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{-128}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;b \leq -3.1 \cdot 10^{-207}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 18: 46.4% accurate, 1.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.5e-74 or 1e221 < z

    1. Initial program 82.3%

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

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

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

    if -7.5e-74 < z < -2.35000000000000002e-124

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

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

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

    if -2.35000000000000002e-124 < z < -5.6000000000000002e-157

    1. Initial program 89.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. Simplified99.8%

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

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

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

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

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

    if -5.6000000000000002e-157 < z < 1e221

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-74}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{-124}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-157}:\\ \;\;\;\;\left(x \cdot \left(t \cdot z\right)\right) \cdot \left(y \cdot 18\right)\\ \mathbf{elif}\;z \leq 10^{+221}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\\ \end{array} \]

Alternative 19: 47.1% accurate, 1.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3e-72 or 2.30000000000000004e223 < z

    1. Initial program 82.3%

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

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

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

    if -3e-72 < z < -5.1999999999999999e-124

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

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

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

    if -5.1999999999999999e-124 < z < -8.2e-153

    1. Initial program 88.5%

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

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

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

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

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

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

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

    if -8.2e-153 < z < 2.30000000000000004e223

    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. Step-by-step derivation
      1. sub-neg86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 33.6% accurate, 2.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -3.05e16 or 2.2000000000000001e157 < c

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

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

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

    if -3.05e16 < c < 2.2000000000000001e157

    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. Simplified86.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.05 \cdot 10^{+16}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \leq 2.2 \cdot 10^{+157}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]

Alternative 21: 31.0% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;c \leq 3.6 \cdot 10^{+120}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -9.19999999999999967e-61 or 3.60000000000000016e120 < c

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

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

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

    if -9.19999999999999967e-61 < c < 2.2500000000000001e-151

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

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

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

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

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

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

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

    if 2.2500000000000001e-151 < c < 3.60000000000000016e120

    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. Simplified92.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9.2 \cdot 10^{-61}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \leq 2.25 \cdot 10^{-151}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{+120}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]

Alternative 22: 32.4% accurate, 3.4× speedup?

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

\mathbf{elif}\;c \leq 0.0008:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -3.5000000000000001e-59 or 8.00000000000000038e-4 < c

    1. Initial program 82.0%

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

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

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

    if -3.5000000000000001e-59 < c < 8.00000000000000038e-4

    1. Initial program 88.0%

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

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

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

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

Alternative 23: 28.5% accurate, 3.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -6.1000000000000001e-238 or 3.19999999999999982e120 < c

    1. Initial program 82.4%

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

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

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

    if -6.1000000000000001e-238 < c < 3.19999999999999982e120

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -6.1 \cdot 10^{-238}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \leq 3.2 \cdot 10^{+120}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]

Alternative 24: 23.1% accurate, 10.3× speedup?

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

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

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

    \[\leadsto c \cdot b \]

Developer target: 89.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\ t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
        (t_2
         (-
          (- (* (* 18.0 t) (* (* x y) z)) t_1)
          (- (* (* k j) 27.0) (* c b)))))
   (if (< t -1.6210815397541398e-69)
     t_2
     (if (< t 165.68027943805222)
       (+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((a * t) + (i * x)) * 4.0d0
    t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
    if (t < (-1.6210815397541398d-69)) then
        tmp = t_2
    else if (t < 165.68027943805222d0) then
        tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((a * t) + (i * x)) * 4.0
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b))
	tmp = 0
	if t < -1.6210815397541398e-69:
		tmp = t_2
	elif t < 165.68027943805222:
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0)
	t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b)))
	tmp = 0.0
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((a * t) + (i * x)) * 4.0;
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	tmp = 0.0;
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023221 
(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)))