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

Percentage Accurate: 85.1% → 89.4%
Time: 50.9s
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.1% 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.4% accurate, 0.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{+142}:\\ \;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(c, b, 18 \cdot \left(y \cdot \left(\left(x \cdot z\right) \cdot t\right)\right)\right)\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 (<= x -8e+142)
   (fma
    j
    (* k -27.0)
    (fma x (* i -4.0) (fma c b (* 18.0 (* y (* (* x z) t))))))
   (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 (x <= -8e+142) {
		tmp = fma(j, (k * -27.0), fma(x, (i * -4.0), fma(c, b, (18.0 * (y * ((x * z) * t))))));
	} 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 (x <= -8e+142)
		tmp = fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), fma(c, b, Float64(18.0 * Float64(y * Float64(Float64(x * z) * t))))));
	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[LessEqual[x, -8e+142], N[(j * N[(k * -27.0), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision] + N[(c * b + N[(18.0 * N[(y * N[(N[(x * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $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}\;x \leq -8 \cdot 10^{+142}:\\
\;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(c, b, 18 \cdot \left(y \cdot \left(\left(x \cdot z\right) \cdot t\right)\right)\right)\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 x < -8.00000000000000041e142

    1. Initial program 69.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-neg69.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. +-commutative69.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*69.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-in69.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-def72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000041e142 < x

    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. +-commutative88.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{+142}:\\ \;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(c, b, 18 \cdot \left(y \cdot \left(\left(x \cdot z\right) \cdot t\right)\right)\right)\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 2: 91.6% accurate, 0.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := \left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + c \cdot b\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(c, b, 18 \cdot \left(y \cdot \left(\left(x \cdot z\right) \cdot t\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1
         (-
          (-
           (+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* c b))
           (* i (* x 4.0)))
          (* k (* j 27.0)))))
   (if (<= t_1 INFINITY)
     t_1
     (fma
      j
      (* k -27.0)
      (fma x (* i -4.0) (fma c b (* 18.0 (* y (* (* x z) t)))))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (c * b)) - (i * (x * 4.0))) - (k * (j * 27.0));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = fma(j, (k * -27.0), fma(x, (i * -4.0), fma(c, b, (18.0 * (y * ((x * z) * t))))));
	}
	return tmp;
}
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(c * b)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0)))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), fma(c, b, Float64(18.0 * Float64(y * Float64(Float64(x * z) * t))))));
	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_] := Block[{t$95$1 = N[(N[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(j * N[(k * -27.0), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision] + N[(c * b + N[(18.0 * N[(y * N[(N[(x * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $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(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + c \cdot b\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 96.9%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := \left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + c \cdot b\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1
         (-
          (-
           (+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* c b))
           (* i (* x 4.0)))
          (* k (* j 27.0)))))
   (if (<= t_1 INFINITY) t_1 (* t (- (* 18.0 (* y (* x z))) (* a 4.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 = ((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (c * b)) - (i * (x * 4.0))) - (k * (j * 27.0));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
	}
	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 = ((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (c * b)) - (i * (x * 4.0))) - (k * (j * 27.0));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.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 = ((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (c * b)) - (i * (x * 4.0))) - (k * (j * 27.0))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.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(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(c * b)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0)))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.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 = ((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (c * b)) - (i * (x * 4.0))) - (k * (j * 27.0));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = t * ((18.0 * (y * (x * z))) - (a * 4.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[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + c \cdot b\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 96.9%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

Alternative 4: 68.4% accurate, 0.8× speedup?

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

\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-162}:\\
\;\;\;\;t_4\\

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+103}:\\
\;\;\;\;t_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j 27) k) < -4.9999999999999999e149 or 5e103 < (*.f64 (*.f64 j 27) k)

    1. Initial program 81.2%

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

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

    if -4.9999999999999999e149 < (*.f64 (*.f64 j 27) k) < -9.99999999999999954e-163 or -5.0000000000000001e-290 < (*.f64 (*.f64 j 27) k) < 5e103

    1. Initial program 88.1%

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

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

    if -9.99999999999999954e-163 < (*.f64 (*.f64 j 27) k) < -5.0000000000000001e-290

    1. Initial program 83.5%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + 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.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-neg83.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--83.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*75.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-in75.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-sub75.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*75.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*75.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(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified75.6%

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

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

Alternative 5: 87.6% accurate, 0.9× speedup?

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

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


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

    1. Initial program 44.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-neg44.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. +-commutative44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 (*.f64 j 27) k)

    1. Initial program 88.7%

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

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + 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.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-neg88.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--90.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*88.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-in88.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-sub88.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*88.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*88.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. Simplified88.7%

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

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

Alternative 6: 59.0% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - i \cdot 4\right)\\ t_2 := k \cdot \left(j \cdot -27\right)\\ t_3 := t_2 + a \cdot \left(-4 \cdot t\right)\\ \mathbf{if}\;x \leq -1.2 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -8 \cdot 10^{+48}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-292}:\\ \;\;\;\;c \cdot b + t_2\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-270}:\\ \;\;\;\;c \cdot b + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-103}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-42} \lor \neg \left(x \leq 8200000000000\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
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 (* z t))) (* i 4.0))))
        (t_2 (* k (* j -27.0)))
        (t_3 (+ t_2 (* a (* -4.0 t)))))
   (if (<= x -1.2e+116)
     t_1
     (if (<= x -8e+48)
       t_3
       (if (<= x -2.7e+14)
         t_1
         (if (<= x 6e-292)
           (+ (* c b) t_2)
           (if (<= x 6e-270)
             (+ (* c b) (* -4.0 (* t a)))
             (if (<= x 7.5e-103)
               (- (* c b) (* 27.0 (* j k)))
               (if (or (<= x 2.2e-42) (not (<= x 8200000000000.0)))
                 t_1
                 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 = x * ((18.0 * (y * (z * t))) - (i * 4.0));
	double t_2 = k * (j * -27.0);
	double t_3 = t_2 + (a * (-4.0 * t));
	double tmp;
	if (x <= -1.2e+116) {
		tmp = t_1;
	} else if (x <= -8e+48) {
		tmp = t_3;
	} else if (x <= -2.7e+14) {
		tmp = t_1;
	} else if (x <= 6e-292) {
		tmp = (c * b) + t_2;
	} else if (x <= 6e-270) {
		tmp = (c * b) + (-4.0 * (t * a));
	} else if (x <= 7.5e-103) {
		tmp = (c * b) - (27.0 * (j * k));
	} else if ((x <= 2.2e-42) || !(x <= 8200000000000.0)) {
		tmp = t_1;
	} 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 = x * ((18.0d0 * (y * (z * t))) - (i * 4.0d0))
    t_2 = k * (j * (-27.0d0))
    t_3 = t_2 + (a * ((-4.0d0) * t))
    if (x <= (-1.2d+116)) then
        tmp = t_1
    else if (x <= (-8d+48)) then
        tmp = t_3
    else if (x <= (-2.7d+14)) then
        tmp = t_1
    else if (x <= 6d-292) then
        tmp = (c * b) + t_2
    else if (x <= 6d-270) then
        tmp = (c * b) + ((-4.0d0) * (t * a))
    else if (x <= 7.5d-103) then
        tmp = (c * b) - (27.0d0 * (j * k))
    else if ((x <= 2.2d-42) .or. (.not. (x <= 8200000000000.0d0))) then
        tmp = t_1
    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 = x * ((18.0 * (y * (z * t))) - (i * 4.0));
	double t_2 = k * (j * -27.0);
	double t_3 = t_2 + (a * (-4.0 * t));
	double tmp;
	if (x <= -1.2e+116) {
		tmp = t_1;
	} else if (x <= -8e+48) {
		tmp = t_3;
	} else if (x <= -2.7e+14) {
		tmp = t_1;
	} else if (x <= 6e-292) {
		tmp = (c * b) + t_2;
	} else if (x <= 6e-270) {
		tmp = (c * b) + (-4.0 * (t * a));
	} else if (x <= 7.5e-103) {
		tmp = (c * b) - (27.0 * (j * k));
	} else if ((x <= 2.2e-42) || !(x <= 8200000000000.0)) {
		tmp = t_1;
	} 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 = x * ((18.0 * (y * (z * t))) - (i * 4.0))
	t_2 = k * (j * -27.0)
	t_3 = t_2 + (a * (-4.0 * t))
	tmp = 0
	if x <= -1.2e+116:
		tmp = t_1
	elif x <= -8e+48:
		tmp = t_3
	elif x <= -2.7e+14:
		tmp = t_1
	elif x <= 6e-292:
		tmp = (c * b) + t_2
	elif x <= 6e-270:
		tmp = (c * b) + (-4.0 * (t * a))
	elif x <= 7.5e-103:
		tmp = (c * b) - (27.0 * (j * k))
	elif (x <= 2.2e-42) or not (x <= 8200000000000.0):
		tmp = t_1
	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(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(i * 4.0)))
	t_2 = Float64(k * Float64(j * -27.0))
	t_3 = Float64(t_2 + Float64(a * Float64(-4.0 * t)))
	tmp = 0.0
	if (x <= -1.2e+116)
		tmp = t_1;
	elseif (x <= -8e+48)
		tmp = t_3;
	elseif (x <= -2.7e+14)
		tmp = t_1;
	elseif (x <= 6e-292)
		tmp = Float64(Float64(c * b) + t_2);
	elseif (x <= 6e-270)
		tmp = Float64(Float64(c * b) + Float64(-4.0 * Float64(t * a)));
	elseif (x <= 7.5e-103)
		tmp = Float64(Float64(c * b) - Float64(27.0 * Float64(j * k)));
	elseif ((x <= 2.2e-42) || !(x <= 8200000000000.0))
		tmp = t_1;
	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 = x * ((18.0 * (y * (z * t))) - (i * 4.0));
	t_2 = k * (j * -27.0);
	t_3 = t_2 + (a * (-4.0 * t));
	tmp = 0.0;
	if (x <= -1.2e+116)
		tmp = t_1;
	elseif (x <= -8e+48)
		tmp = t_3;
	elseif (x <= -2.7e+14)
		tmp = t_1;
	elseif (x <= 6e-292)
		tmp = (c * b) + t_2;
	elseif (x <= 6e-270)
		tmp = (c * b) + (-4.0 * (t * a));
	elseif (x <= 7.5e-103)
		tmp = (c * b) - (27.0 * (j * k));
	elseif ((x <= 2.2e-42) || ~((x <= 8200000000000.0)))
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e+116], t$95$1, If[LessEqual[x, -8e+48], t$95$3, If[LessEqual[x, -2.7e+14], t$95$1, If[LessEqual[x, 6e-292], N[(N[(c * b), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 6e-270], N[(N[(c * b), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e-103], N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 2.2e-42], N[Not[LessEqual[x, 8200000000000.0]], $MachinePrecision]], t$95$1, t$95$3]]]]]]]]]]
\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(z \cdot t\right)\right) - i \cdot 4\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
t_3 := t_2 + a \cdot \left(-4 \cdot t\right)\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -8 \cdot 10^{+48}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \leq -2.7 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 6 \cdot 10^{-292}:\\
\;\;\;\;c \cdot b + t_2\\

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

\mathbf{elif}\;x \leq 7.5 \cdot 10^{-103}:\\
\;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{-42} \lor \neg \left(x \leq 8200000000000\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.2e116 or -8.00000000000000035e48 < x < -2.7e14 or 7.5e-103 < x < 2.20000000000000005e-42 or 8.2e12 < x

    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. Step-by-step derivation
      1. sub-neg76.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-76.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-neg76.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-neg76.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--78.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*81.0%

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

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

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

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

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

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

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

    if -1.2e116 < x < -8.00000000000000035e48 or 2.20000000000000005e-42 < x < 8.2e12

    1. Initial program 86.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-neg86.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. *-commutative86.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-in86.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. Simplified90.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. Step-by-step derivation
      1. fma-udef90.8%

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

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

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

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

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

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

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

    if -2.7e14 < x < 6.00000000000000031e-292

    1. Initial program 92.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-neg92.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. *-commutative92.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-in92.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. Simplified89.5%

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

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

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

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

    if 6.00000000000000031e-292 < x < 6.00000000000000025e-270

    1. Initial program 100.0%

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

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

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

    if 6.00000000000000025e-270 < x < 7.5e-103

    1. Initial program 95.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-neg95.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-95.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-neg95.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-neg95.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--95.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*88.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-in88.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-sub88.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*88.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*88.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(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    3. Simplified88.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.2 \cdot 10^{+116}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq -8 \cdot 10^{+48}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + a \cdot \left(-4 \cdot t\right)\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{+14}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - i \cdot 4\right)\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-292}:\\ \;\;\;\;c \cdot b + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-270}:\\ \;\;\;\;c \cdot b + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-103}:\\ \;\;\;\;c \cdot b - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-42} \lor \neg \left(x \leq 8200000000000\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - i \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + a \cdot \left(-4 \cdot t\right)\\ \end{array} \]

Alternative 7: 80.2% accurate, 1.1× speedup?

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

\mathbf{elif}\;y \leq 3 \cdot 10^{-113}:\\
\;\;\;\;\left(c \cdot b - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\right) - k \cdot \left(j \cdot 27\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 3 regimes
  2. if y < -1.64999999999999996e221

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.64999999999999996e221 < y < 3.0000000000000001e-113

    1. Initial program 87.4%

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

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

    if 3.0000000000000001e-113 < y

    1. Initial program 82.5%

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

        \[\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*82.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-in82.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-def83.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 82.3% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -5.80000000000000059e39

    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.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. Taylor expanded in j around 0 87.9%

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

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

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

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

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

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

    if -5.80000000000000059e39 < i < 1.89999999999999989e86

    1. Initial program 86.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg86.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-86.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-neg86.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-neg86.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--88.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*87.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-in87.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-sub87.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*87.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*87.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. Simplified87.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 x around 0 86.0%

      \[\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}{27 \cdot \left(k \cdot j\right)} \]
    5. Step-by-step derivation
      1. associate-*r*86.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(27 \cdot k\right) \cdot j} \]
    6. Simplified86.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(27 \cdot k\right) \cdot j} \]

    if 1.89999999999999989e86 < i

    1. Initial program 74.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 78.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. Recombined 3 regimes into one program.
  4. Final simplification85.2%

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

Alternative 9: 66.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 1.58 \cdot 10^{-133}:\\
\;\;\;\;\left(c \cdot b - t_1\right) - k \cdot \left(j \cdot 27\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.4e220 or 1.58e-133 < y

    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. *-commutative83.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-in83.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. Simplified82.5%

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

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

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

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

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

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

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

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

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

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

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

    if -7.4e220 < y < -1.2599999999999999e-81

    1. Initial program 81.3%

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

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

    if -1.2599999999999999e-81 < y < 1.58e-133

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

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

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

Alternative 10: 80.0% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999991e221 < y < 7.0000000000000002e-84

    1. Initial program 87.6%

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

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

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

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

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

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

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

    if 7.0000000000000002e-84 < y

    1. Initial program 81.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg81.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. *-commutative81.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-in81.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. Simplified81.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. Step-by-step derivation
      1. fma-udef81.6%

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

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

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

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

Alternative 11: 31.9% accurate, 1.3× speedup?

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

\mathbf{elif}\;i \leq -1.7 \cdot 10^{-202}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 2.5 \cdot 10^{-223}:\\
\;\;\;\;c \cdot b\\

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

\mathbf{elif}\;i \leq 3.2 \cdot 10^{+18}:\\
\;\;\;\;c \cdot b\\

\mathbf{elif}\;i \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if i < -8.00000000000000034e36 or 1.09999999999999999e188 < i

    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. +-commutative87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000034e36 < i < -1.70000000000000006e-202 or 3.2e18 < i < 3.20000000000000023e71

    1. Initial program 83.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg83.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. *-commutative83.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-in83.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. Simplified86.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. Step-by-step derivation
      1. fma-udef86.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-27 \cdot k\right) \cdot j} \]
    11. Simplified43.9%

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

    if -1.70000000000000006e-202 < i < 2.50000000000000012e-223 or 3.30000000000000016e-106 < i < 3.2e18

    1. Initial program 90.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg90.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. *-commutative90.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-in90.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. Simplified88.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. Step-by-step derivation
      1. fma-udef88.7%

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

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

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

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

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

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

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

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

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

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

    if 2.50000000000000012e-223 < i < 3.30000000000000016e-106

    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. Step-by-step derivation
      1. sub-neg85.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-85.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-neg85.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-neg85.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--85.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.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-in85.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-sub85.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*85.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*85.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. Simplified85.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 x around inf 56.2%

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

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

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

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

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

    if 3.20000000000000023e71 < i < 1.09999999999999999e188

    1. Initial program 70.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-neg70.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. *-commutative70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{\left(x \cdot -4\right) \cdot i + 18 \cdot \left(\left(y \cdot t\right) \cdot \left(z \cdot x\right)\right)}\right) + k \cdot \left(j \cdot -27\right) \]
    11. 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 5 regimes into one program.
  4. Final simplification48.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -8 \cdot 10^{+36}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;i \leq -1.7 \cdot 10^{-202}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;i \leq 2.5 \cdot 10^{-223}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;i \leq 3.3 \cdot 10^{-106}:\\ \;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;i \leq 3.2 \cdot 10^{+18}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;i \leq 3.2 \cdot 10^{+71}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;i \leq 1.1 \cdot 10^{+188}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(\left(x \cdot z\right) \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 12: 63.4% accurate, 1.3× speedup?

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

\mathbf{elif}\;j \leq -1.6 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;j \leq -1.7 \cdot 10^{+35}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{elif}\;j \leq 1.6 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -1.5e203

    1. Initial program 71.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-neg71.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. *-commutative71.8%

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

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

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

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

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

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

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

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

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

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

    if -1.5e203 < j < -1.6e52 or -1.7000000000000001e35 < j < 1.6e-13

    1. Initial program 87.9%

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

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

    if -1.6e52 < j < -1.7000000000000001e35

    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. associate-+l-85.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-neg85.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-neg85.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--85.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*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 t around inf 57.9%

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

    if 1.6e-13 < j

    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.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. Step-by-step derivation
      1. fma-udef85.4%

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

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

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

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

Alternative 13: 75.3% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.90000000000000004e-27 or 8.59999999999999991e-87 < x

    1. Initial program 78.1%

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

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

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

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

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

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

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

    if -2.90000000000000004e-27 < x < 8.59999999999999991e-87

    1. Initial program 94.8%

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

        \[\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*89.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-in89.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-sub89.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*89.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*89.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. Simplified89.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 x around 0 83.1%

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

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

Alternative 14: 49.2% accurate, 1.6× 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}\;b \leq -1.65 \cdot 10^{+161} \lor \neg \left(b \leq -1.5 \cdot 10^{+92}\right) \land \left(b \leq -1.05 \cdot 10^{+40} \lor \neg \left(b \leq 8 \cdot 10^{-153}\right)\right):\\ \;\;\;\;c \cdot b + t_1\\ \mathbf{else}:\\ \;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
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 (or (<= b -1.65e+161)
           (and (not (<= b -1.5e+92))
                (or (<= b -1.05e+40) (not (<= b 8e-153)))))
     (+ (* c b) t_1)
     (+ t_1 (* x (* i -4.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);
	double tmp;
	if ((b <= -1.65e+161) || (!(b <= -1.5e+92) && ((b <= -1.05e+40) || !(b <= 8e-153)))) {
		tmp = (c * b) + t_1;
	} else {
		tmp = t_1 + (x * (i * -4.0));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = k * (j * (-27.0d0))
    if ((b <= (-1.65d+161)) .or. (.not. (b <= (-1.5d+92))) .and. (b <= (-1.05d+40)) .or. (.not. (b <= 8d-153))) then
        tmp = (c * b) + t_1
    else
        tmp = t_1 + (x * (i * (-4.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);
	double tmp;
	if ((b <= -1.65e+161) || (!(b <= -1.5e+92) && ((b <= -1.05e+40) || !(b <= 8e-153)))) {
		tmp = (c * b) + t_1;
	} else {
		tmp = t_1 + (x * (i * -4.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)
	tmp = 0
	if (b <= -1.65e+161) or (not (b <= -1.5e+92) and ((b <= -1.05e+40) or not (b <= 8e-153))):
		tmp = (c * b) + t_1
	else:
		tmp = t_1 + (x * (i * -4.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(k * Float64(j * -27.0))
	tmp = 0.0
	if ((b <= -1.65e+161) || (!(b <= -1.5e+92) && ((b <= -1.05e+40) || !(b <= 8e-153))))
		tmp = Float64(Float64(c * b) + t_1);
	else
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.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);
	tmp = 0.0;
	if ((b <= -1.65e+161) || (~((b <= -1.5e+92)) && ((b <= -1.05e+40) || ~((b <= 8e-153)))))
		tmp = (c * b) + t_1;
	else
		tmp = t_1 + (x * (i * -4.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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -1.65e+161], And[N[Not[LessEqual[b, -1.5e+92]], $MachinePrecision], Or[LessEqual[b, -1.05e+40], N[Not[LessEqual[b, 8e-153]], $MachinePrecision]]]], N[(N[(c * b), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $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)\\
\mathbf{if}\;b \leq -1.65 \cdot 10^{+161} \lor \neg \left(b \leq -1.5 \cdot 10^{+92}\right) \land \left(b \leq -1.05 \cdot 10^{+40} \lor \neg \left(b \leq 8 \cdot 10^{-153}\right)\right):\\
\;\;\;\;c \cdot b + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.64999999999999999e161 or -1.50000000000000007e92 < b < -1.05000000000000005e40 or 8.00000000000000031e-153 < b

    1. Initial program 84.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-neg84.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. *-commutative84.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-in84.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.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. Step-by-step derivation
      1. fma-udef84.1%

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

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

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

    if -1.64999999999999999e161 < b < -1.50000000000000007e92 or -1.05000000000000005e40 < b < 8.00000000000000031e-153

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+161} \lor \neg \left(b \leq -1.5 \cdot 10^{+92}\right) \land \left(b \leq -1.05 \cdot 10^{+40} \lor \neg \left(b \leq 8 \cdot 10^{-153}\right)\right):\\ \;\;\;\;c \cdot b + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \end{array} \]

Alternative 15: 51.1% accurate, 1.6× speedup?

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

\mathbf{elif}\;x \leq 2.4 \cdot 10^{-102}:\\
\;\;\;\;c \cdot b + t_1\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{+116}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.3999999999999997e-27 or 2.4e-102 < x < 2.2e116

    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. *-commutative83.1%

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

        \[\leadsto \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) + \color{blue}{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. Step-by-step derivation
      1. fma-udef85.7%

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

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

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

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

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

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

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

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

    if -3.3999999999999997e-27 < x < 2.4e-102

    1. Initial program 94.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-neg94.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. *-commutative94.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-in94.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. Simplified89.5%

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

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

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

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

    if 2.2e116 < x

    1. Initial program 62.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-neg62.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-62.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-neg62.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-neg62.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--65.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*71.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-in71.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-sub71.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*71.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*71.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. Simplified71.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 inf 63.6%

      \[\leadsto \color{blue}{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 simplification59.9%

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

Alternative 16: 65.9% accurate, 1.6× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;i \leq -1 \cdot 10^{+40} \lor \neg \left(i \leq 5.8 \cdot 10^{+191}\right):\\ \;\;\;\;c \cdot b - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot b + -4 \cdot \left(t \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 (or (<= i -1e+40) (not (<= i 5.8e+191)))
   (- (* c b) (+ (* 4.0 (* x i)) (* 4.0 (* t a))))
   (- (+ (* c b) (* -4.0 (* t 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 ((i <= -1e+40) || !(i <= 5.8e+191)) {
		tmp = (c * b) - ((4.0 * (x * i)) + (4.0 * (t * a)));
	} else {
		tmp = ((c * b) + (-4.0 * (t * 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) :: tmp
    if ((i <= (-1d+40)) .or. (.not. (i <= 5.8d+191))) then
        tmp = (c * b) - ((4.0d0 * (x * i)) + (4.0d0 * (t * a)))
    else
        tmp = ((c * b) + ((-4.0d0) * (t * 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 tmp;
	if ((i <= -1e+40) || !(i <= 5.8e+191)) {
		tmp = (c * b) - ((4.0 * (x * i)) + (4.0 * (t * a)));
	} else {
		tmp = ((c * b) + (-4.0 * (t * 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):
	tmp = 0
	if (i <= -1e+40) or not (i <= 5.8e+191):
		tmp = (c * b) - ((4.0 * (x * i)) + (4.0 * (t * a)))
	else:
		tmp = ((c * b) + (-4.0 * (t * 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 ((i <= -1e+40) || !(i <= 5.8e+191))
		tmp = Float64(Float64(c * b) - Float64(Float64(4.0 * Float64(x * i)) + Float64(4.0 * Float64(t * a))));
	else
		tmp = Float64(Float64(Float64(c * b) + Float64(-4.0 * Float64(t * 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)
	tmp = 0.0;
	if ((i <= -1e+40) || ~((i <= 5.8e+191)))
		tmp = (c * b) - ((4.0 * (x * i)) + (4.0 * (t * a)));
	else
		tmp = ((c * b) + (-4.0 * (t * 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_] := If[Or[LessEqual[i, -1e+40], N[Not[LessEqual[i, 5.8e+191]], $MachinePrecision]], N[(N[(c * b), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(c * b), $MachinePrecision] + N[(-4.0 * N[(t * a), $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}\;i \leq -1 \cdot 10^{+40} \lor \neg \left(i \leq 5.8 \cdot 10^{+191}\right):\\
\;\;\;\;c \cdot b - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -1.00000000000000003e40 or 5.8000000000000003e191 < i

    1. Initial program 87.7%

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

      \[\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. Taylor expanded in j around 0 73.7%

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

    if -1.00000000000000003e40 < i < 5.8000000000000003e191

    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. associate-+l-84.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-neg84.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-neg84.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.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.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-in85.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-sub85.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*85.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*85.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. Simplified85.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 x around 0 72.1%

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

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

Alternative 17: 32.4% accurate, 1.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;c \leq -1.4 \cdot 10^{-35}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-196}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq 9.5 \cdot 10^{-114}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;c \leq 85000:\\ \;\;\;\;18 \cdot \left(y \cdot \left(\left(x \cdot z\right) \cdot t\right)\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{+39}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{+100}:\\ \;\;\;\;t \cdot \left(-4 \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 -1.4e-35)
   (* c b)
   (if (<= c 1.75e-196)
     (* -4.0 (* x i))
     (if (<= c 9.5e-114)
       (* -27.0 (* j k))
       (if (<= c 85000.0)
         (* 18.0 (* y (* (* x z) t)))
         (if (<= c 2.7e+39)
           (* c b)
           (if (<= c 2.6e+100) (* t (* -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 (c <= -1.4e-35) {
		tmp = c * b;
	} else if (c <= 1.75e-196) {
		tmp = -4.0 * (x * i);
	} else if (c <= 9.5e-114) {
		tmp = -27.0 * (j * k);
	} else if (c <= 85000.0) {
		tmp = 18.0 * (y * ((x * z) * t));
	} else if (c <= 2.7e+39) {
		tmp = c * b;
	} else if (c <= 2.6e+100) {
		tmp = t * (-4.0 * 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 <= (-1.4d-35)) then
        tmp = c * b
    else if (c <= 1.75d-196) then
        tmp = (-4.0d0) * (x * i)
    else if (c <= 9.5d-114) then
        tmp = (-27.0d0) * (j * k)
    else if (c <= 85000.0d0) then
        tmp = 18.0d0 * (y * ((x * z) * t))
    else if (c <= 2.7d+39) then
        tmp = c * b
    else if (c <= 2.6d+100) then
        tmp = t * ((-4.0d0) * 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 <= -1.4e-35) {
		tmp = c * b;
	} else if (c <= 1.75e-196) {
		tmp = -4.0 * (x * i);
	} else if (c <= 9.5e-114) {
		tmp = -27.0 * (j * k);
	} else if (c <= 85000.0) {
		tmp = 18.0 * (y * ((x * z) * t));
	} else if (c <= 2.7e+39) {
		tmp = c * b;
	} else if (c <= 2.6e+100) {
		tmp = t * (-4.0 * 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 <= -1.4e-35:
		tmp = c * b
	elif c <= 1.75e-196:
		tmp = -4.0 * (x * i)
	elif c <= 9.5e-114:
		tmp = -27.0 * (j * k)
	elif c <= 85000.0:
		tmp = 18.0 * (y * ((x * z) * t))
	elif c <= 2.7e+39:
		tmp = c * b
	elif c <= 2.6e+100:
		tmp = t * (-4.0 * 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 <= -1.4e-35)
		tmp = Float64(c * b);
	elseif (c <= 1.75e-196)
		tmp = Float64(-4.0 * Float64(x * i));
	elseif (c <= 9.5e-114)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (c <= 85000.0)
		tmp = Float64(18.0 * Float64(y * Float64(Float64(x * z) * t)));
	elseif (c <= 2.7e+39)
		tmp = Float64(c * b);
	elseif (c <= 2.6e+100)
		tmp = Float64(t * Float64(-4.0 * 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 <= -1.4e-35)
		tmp = c * b;
	elseif (c <= 1.75e-196)
		tmp = -4.0 * (x * i);
	elseif (c <= 9.5e-114)
		tmp = -27.0 * (j * k);
	elseif (c <= 85000.0)
		tmp = 18.0 * (y * ((x * z) * t));
	elseif (c <= 2.7e+39)
		tmp = c * b;
	elseif (c <= 2.6e+100)
		tmp = t * (-4.0 * 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, -1.4e-35], N[(c * b), $MachinePrecision], If[LessEqual[c, 1.75e-196], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.5e-114], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 85000.0], N[(18.0 * N[(y * N[(N[(x * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.7e+39], N[(c * b), $MachinePrecision], If[LessEqual[c, 2.6e+100], N[(t * N[(-4.0 * 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 -1.4 \cdot 10^{-35}:\\
\;\;\;\;c \cdot b\\

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

\mathbf{elif}\;c \leq 9.5 \cdot 10^{-114}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;c \leq 85000:\\
\;\;\;\;18 \cdot \left(y \cdot \left(\left(x \cdot z\right) \cdot t\right)\right)\\

\mathbf{elif}\;c \leq 2.7 \cdot 10^{+39}:\\
\;\;\;\;c \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.4e-35 or 85000 < c < 2.70000000000000003e39 or 2.6000000000000002e100 < c

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e-35 < c < 1.75000000000000002e-196

    1. Initial program 77.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-neg77.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. +-commutative77.4%

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

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

        \[\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-def81.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. *-commutative81.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-in81.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-eval81.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-neg81.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. +-commutative81.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*81.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-in81.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. Simplified89.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)} \]
    4. Taylor expanded in i around inf 32.4%

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

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

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

    if 1.75000000000000002e-196 < c < 9.49999999999999958e-114

    1. Initial program 99.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-neg99.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. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999958e-114 < c < 85000

    1. Initial program 79.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-neg79.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. *-commutative79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.70000000000000003e39 < c < 2.6000000000000002e100

    1. Initial program 94.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.4 \cdot 10^{-35}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-196}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq 9.5 \cdot 10^{-114}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;c \leq 85000:\\ \;\;\;\;18 \cdot \left(y \cdot \left(\left(x \cdot z\right) \cdot t\right)\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{+39}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{+100}:\\ \;\;\;\;t \cdot \left(-4 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]

Alternative 18: 50.0% accurate, 1.8× 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)\\ t_2 := c \cdot b + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;a \leq -4.8 \cdot 10^{+80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -420000:\\ \;\;\;\;t_1 + a \cdot \left(-4 \cdot t\right)\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-44}:\\ \;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+155}:\\ \;\;\;\;c \cdot b + 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 (* k (* j -27.0))) (t_2 (+ (* c b) (* -4.0 (* t a)))))
   (if (<= a -4.8e+80)
     t_2
     (if (<= a -420000.0)
       (+ t_1 (* a (* -4.0 t)))
       (if (<= a -2.05e-44)
         (* x (* (* 18.0 y) (* z t)))
         (if (<= a 7.5e+155) (+ (* c b) 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 = k * (j * -27.0);
	double t_2 = (c * b) + (-4.0 * (t * a));
	double tmp;
	if (a <= -4.8e+80) {
		tmp = t_2;
	} else if (a <= -420000.0) {
		tmp = t_1 + (a * (-4.0 * t));
	} else if (a <= -2.05e-44) {
		tmp = x * ((18.0 * y) * (z * t));
	} else if (a <= 7.5e+155) {
		tmp = (c * b) + 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 = k * (j * (-27.0d0))
    t_2 = (c * b) + ((-4.0d0) * (t * a))
    if (a <= (-4.8d+80)) then
        tmp = t_2
    else if (a <= (-420000.0d0)) then
        tmp = t_1 + (a * ((-4.0d0) * t))
    else if (a <= (-2.05d-44)) then
        tmp = x * ((18.0d0 * y) * (z * t))
    else if (a <= 7.5d+155) then
        tmp = (c * b) + 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 = k * (j * -27.0);
	double t_2 = (c * b) + (-4.0 * (t * a));
	double tmp;
	if (a <= -4.8e+80) {
		tmp = t_2;
	} else if (a <= -420000.0) {
		tmp = t_1 + (a * (-4.0 * t));
	} else if (a <= -2.05e-44) {
		tmp = x * ((18.0 * y) * (z * t));
	} else if (a <= 7.5e+155) {
		tmp = (c * b) + 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 = k * (j * -27.0)
	t_2 = (c * b) + (-4.0 * (t * a))
	tmp = 0
	if a <= -4.8e+80:
		tmp = t_2
	elif a <= -420000.0:
		tmp = t_1 + (a * (-4.0 * t))
	elif a <= -2.05e-44:
		tmp = x * ((18.0 * y) * (z * t))
	elif a <= 7.5e+155:
		tmp = (c * b) + 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(k * Float64(j * -27.0))
	t_2 = Float64(Float64(c * b) + Float64(-4.0 * Float64(t * a)))
	tmp = 0.0
	if (a <= -4.8e+80)
		tmp = t_2;
	elseif (a <= -420000.0)
		tmp = Float64(t_1 + Float64(a * Float64(-4.0 * t)));
	elseif (a <= -2.05e-44)
		tmp = Float64(x * Float64(Float64(18.0 * y) * Float64(z * t)));
	elseif (a <= 7.5e+155)
		tmp = Float64(Float64(c * b) + 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 = k * (j * -27.0);
	t_2 = (c * b) + (-4.0 * (t * a));
	tmp = 0.0;
	if (a <= -4.8e+80)
		tmp = t_2;
	elseif (a <= -420000.0)
		tmp = t_1 + (a * (-4.0 * t));
	elseif (a <= -2.05e-44)
		tmp = x * ((18.0 * y) * (z * t));
	elseif (a <= 7.5e+155)
		tmp = (c * b) + 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * b), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.8e+80], t$95$2, If[LessEqual[a, -420000.0], N[(t$95$1 + N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.05e-44], N[(x * N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e+155], N[(N[(c * b), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := c \cdot b + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;a \leq -4.8 \cdot 10^{+80}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -420000:\\
\;\;\;\;t_1 + a \cdot \left(-4 \cdot t\right)\\

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

\mathbf{elif}\;a \leq 7.5 \cdot 10^{+155}:\\
\;\;\;\;c \cdot b + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.79999999999999958e80 or 7.4999999999999999e155 < a

    1. Initial program 78.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-neg78.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-78.8%

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

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

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

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

        \[\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.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. Simplified80.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 x around 0 74.1%

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

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

    if -4.79999999999999958e80 < a < -4.2e5

    1. Initial program 73.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-neg73.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. *-commutative73.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-in73.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. Simplified81.5%

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

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

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

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

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

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

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

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

    if -4.2e5 < a < -2.04999999999999996e-44

    1. Initial program 88.9%

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + 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*88.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-in88.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-sub88.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*88.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*88.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. Simplified88.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 76.6%

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

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

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

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

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

    if -2.04999999999999996e-44 < a < 7.4999999999999999e155

    1. Initial program 89.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. sub-neg89.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. *-commutative89.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-in89.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. Simplified88.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. Step-by-step derivation
      1. fma-udef88.6%

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

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

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

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

Alternative 19: 30.7% accurate, 2.0× 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 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;i \leq -5.8 \cdot 10^{+39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq -3.7 \cdot 10^{-202}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 2.65 \cdot 10^{+20}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;i \leq 2.1 \cdot 10^{+127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 3.8 \cdot 10^{+194}:\\ \;\;\;\;c \cdot b\\ \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 (* -4.0 (* x i))))
   (if (<= i -5.8e+39)
     t_2
     (if (<= i -3.7e-202)
       t_1
       (if (<= i 2.65e+20)
         (* c b)
         (if (<= i 2.1e+127) t_1 (if (<= i 3.8e+194) (* c b) 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 = -4.0 * (x * i);
	double tmp;
	if (i <= -5.8e+39) {
		tmp = t_2;
	} else if (i <= -3.7e-202) {
		tmp = t_1;
	} else if (i <= 2.65e+20) {
		tmp = c * b;
	} else if (i <= 2.1e+127) {
		tmp = t_1;
	} else if (i <= 3.8e+194) {
		tmp = c * b;
	} 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 = (-4.0d0) * (x * i)
    if (i <= (-5.8d+39)) then
        tmp = t_2
    else if (i <= (-3.7d-202)) then
        tmp = t_1
    else if (i <= 2.65d+20) then
        tmp = c * b
    else if (i <= 2.1d+127) then
        tmp = t_1
    else if (i <= 3.8d+194) then
        tmp = c * b
    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 = -4.0 * (x * i);
	double tmp;
	if (i <= -5.8e+39) {
		tmp = t_2;
	} else if (i <= -3.7e-202) {
		tmp = t_1;
	} else if (i <= 2.65e+20) {
		tmp = c * b;
	} else if (i <= 2.1e+127) {
		tmp = t_1;
	} else if (i <= 3.8e+194) {
		tmp = c * b;
	} 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 = -4.0 * (x * i)
	tmp = 0
	if i <= -5.8e+39:
		tmp = t_2
	elif i <= -3.7e-202:
		tmp = t_1
	elif i <= 2.65e+20:
		tmp = c * b
	elif i <= 2.1e+127:
		tmp = t_1
	elif i <= 3.8e+194:
		tmp = c * b
	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(-4.0 * Float64(x * i))
	tmp = 0.0
	if (i <= -5.8e+39)
		tmp = t_2;
	elseif (i <= -3.7e-202)
		tmp = t_1;
	elseif (i <= 2.65e+20)
		tmp = Float64(c * b);
	elseif (i <= 2.1e+127)
		tmp = t_1;
	elseif (i <= 3.8e+194)
		tmp = Float64(c * b);
	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 = -4.0 * (x * i);
	tmp = 0.0;
	if (i <= -5.8e+39)
		tmp = t_2;
	elseif (i <= -3.7e-202)
		tmp = t_1;
	elseif (i <= 2.65e+20)
		tmp = c * b;
	elseif (i <= 2.1e+127)
		tmp = t_1;
	elseif (i <= 3.8e+194)
		tmp = c * b;
	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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -5.8e+39], t$95$2, If[LessEqual[i, -3.7e-202], t$95$1, If[LessEqual[i, 2.65e+20], N[(c * b), $MachinePrecision], If[LessEqual[i, 2.1e+127], t$95$1, If[LessEqual[i, 3.8e+194], N[(c * b), $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 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -5.8 \cdot 10^{+39}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;i \leq -3.7 \cdot 10^{-202}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 2.65 \cdot 10^{+20}:\\
\;\;\;\;c \cdot b\\

\mathbf{elif}\;i \leq 2.1 \cdot 10^{+127}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 3.8 \cdot 10^{+194}:\\
\;\;\;\;c \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -5.80000000000000059e39 or 3.7999999999999999e194 < i

    1. Initial program 87.7%

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

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

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

        \[\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-def88.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. *-commutative88.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-in88.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-eval88.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-neg88.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. +-commutative88.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*88.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-in88.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. Simplified90.3%

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

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

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

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

    if -5.80000000000000059e39 < i < -3.69999999999999991e-202 or 2.65e20 < i < 2.09999999999999992e127

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.69999999999999991e-202 < i < 2.65e20 or 2.09999999999999992e127 < i < 3.7999999999999999e194

    1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -5.8 \cdot 10^{+39}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;i \leq -3.7 \cdot 10^{-202}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;i \leq 2.65 \cdot 10^{+20}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;i \leq 2.1 \cdot 10^{+127}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;i \leq 3.8 \cdot 10^{+194}:\\ \;\;\;\;c \cdot b\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 20: 30.8% accurate, 2.0× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;i \leq -1.25 \cdot 10^{+38}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq -1.9 \cdot 10^{-202}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 7.8 \cdot 10^{+18}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;i \leq 1.05 \cdot 10^{+90}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 8.5 \cdot 10^{+191}:\\ \;\;\;\;c \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))) (t_2 (* -4.0 (* x i))))
   (if (<= i -1.25e+38)
     t_2
     (if (<= i -1.9e-202)
       t_1
       (if (<= i 7.8e+18)
         (* c b)
         (if (<= i 1.05e+90) t_1 (if (<= i 8.5e+191) (* c b) t_2)))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = -4.0 * (x * i);
	double tmp;
	if (i <= -1.25e+38) {
		tmp = t_2;
	} else if (i <= -1.9e-202) {
		tmp = t_1;
	} else if (i <= 7.8e+18) {
		tmp = c * b;
	} else if (i <= 1.05e+90) {
		tmp = t_1;
	} else if (i <= 8.5e+191) {
		tmp = c * b;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = (-4.0d0) * (x * i)
    if (i <= (-1.25d+38)) then
        tmp = t_2
    else if (i <= (-1.9d-202)) then
        tmp = t_1
    else if (i <= 7.8d+18) then
        tmp = c * b
    else if (i <= 1.05d+90) then
        tmp = t_1
    else if (i <= 8.5d+191) then
        tmp = c * b
    else
        tmp = t_2
    end if
    code = tmp
end function
assert y < z;
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = -4.0 * (x * i);
	double tmp;
	if (i <= -1.25e+38) {
		tmp = t_2;
	} else if (i <= -1.9e-202) {
		tmp = t_1;
	} else if (i <= 7.8e+18) {
		tmp = c * b;
	} else if (i <= 1.05e+90) {
		tmp = t_1;
	} else if (i <= 8.5e+191) {
		tmp = c * b;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = -4.0 * (x * i)
	tmp = 0
	if i <= -1.25e+38:
		tmp = t_2
	elif i <= -1.9e-202:
		tmp = t_1
	elif i <= 7.8e+18:
		tmp = c * b
	elif i <= 1.05e+90:
		tmp = t_1
	elif i <= 8.5e+191:
		tmp = c * b
	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(j * Float64(k * -27.0))
	t_2 = Float64(-4.0 * Float64(x * i))
	tmp = 0.0
	if (i <= -1.25e+38)
		tmp = t_2;
	elseif (i <= -1.9e-202)
		tmp = t_1;
	elseif (i <= 7.8e+18)
		tmp = Float64(c * b);
	elseif (i <= 1.05e+90)
		tmp = t_1;
	elseif (i <= 8.5e+191)
		tmp = Float64(c * b);
	else
		tmp = t_2;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = -4.0 * (x * i);
	tmp = 0.0;
	if (i <= -1.25e+38)
		tmp = t_2;
	elseif (i <= -1.9e-202)
		tmp = t_1;
	elseif (i <= 7.8e+18)
		tmp = c * b;
	elseif (i <= 1.05e+90)
		tmp = t_1;
	elseif (i <= 8.5e+191)
		tmp = c * b;
	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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.25e+38], t$95$2, If[LessEqual[i, -1.9e-202], t$95$1, If[LessEqual[i, 7.8e+18], N[(c * b), $MachinePrecision], If[LessEqual[i, 1.05e+90], t$95$1, If[LessEqual[i, 8.5e+191], N[(c * b), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -1.25 \cdot 10^{+38}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;i \leq -1.9 \cdot 10^{-202}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 7.8 \cdot 10^{+18}:\\
\;\;\;\;c \cdot b\\

\mathbf{elif}\;i \leq 1.05 \cdot 10^{+90}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 8.5 \cdot 10^{+191}:\\
\;\;\;\;c \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -1.24999999999999992e38 or 8.4999999999999999e191 < i

    1. Initial program 87.7%

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

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

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

        \[\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-def88.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. *-commutative88.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-in88.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-eval88.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-neg88.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. +-commutative88.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*88.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-in88.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. Simplified90.3%

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

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

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

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

    if -1.24999999999999992e38 < i < -1.90000000000000007e-202 or 7.8e18 < i < 1.0499999999999999e90

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000007e-202 < i < 7.8e18 or 1.0499999999999999e90 < i < 8.4999999999999999e191

    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. *-commutative85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.25 \cdot 10^{+38}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;i \leq -1.9 \cdot 10^{-202}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;i \leq 7.8 \cdot 10^{+18}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;i \leq 1.05 \cdot 10^{+90}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;i \leq 8.5 \cdot 10^{+191}:\\ \;\;\;\;c \cdot b\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 21: 33.7% accurate, 2.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;j \leq -9.6 \cdot 10^{+193} \lor \neg \left(j \leq -1.15 \cdot 10^{+162}\right) \land \left(j \leq -1.7 \cdot 10^{+44} \lor \neg \left(j \leq 4.9 \cdot 10^{-36}\right)\right):\\ \;\;\;\;-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 (or (<= j -9.6e+193)
         (and (not (<= j -1.15e+162))
              (or (<= j -1.7e+44) (not (<= j 4.9e-36)))))
   (* -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 ((j <= -9.6e+193) || (!(j <= -1.15e+162) && ((j <= -1.7e+44) || !(j <= 4.9e-36)))) {
		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 ((j <= (-9.6d+193)) .or. (.not. (j <= (-1.15d+162))) .and. (j <= (-1.7d+44)) .or. (.not. (j <= 4.9d-36))) 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 ((j <= -9.6e+193) || (!(j <= -1.15e+162) && ((j <= -1.7e+44) || !(j <= 4.9e-36)))) {
		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 (j <= -9.6e+193) or (not (j <= -1.15e+162) and ((j <= -1.7e+44) or not (j <= 4.9e-36))):
		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 ((j <= -9.6e+193) || (!(j <= -1.15e+162) && ((j <= -1.7e+44) || !(j <= 4.9e-36))))
		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 ((j <= -9.6e+193) || (~((j <= -1.15e+162)) && ((j <= -1.7e+44) || ~((j <= 4.9e-36)))))
		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[Or[LessEqual[j, -9.6e+193], And[N[Not[LessEqual[j, -1.15e+162]], $MachinePrecision], Or[LessEqual[j, -1.7e+44], N[Not[LessEqual[j, 4.9e-36]], $MachinePrecision]]]], 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}\;j \leq -9.6 \cdot 10^{+193} \lor \neg \left(j \leq -1.15 \cdot 10^{+162}\right) \land \left(j \leq -1.7 \cdot 10^{+44} \lor \neg \left(j \leq 4.9 \cdot 10^{-36}\right)\right):\\
\;\;\;\;-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 j < -9.6e193 or -1.14999999999999997e162 < j < -1.7e44 or 4.8999999999999997e-36 < j

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.6e193 < j < -1.14999999999999997e162 or -1.7e44 < j < 4.8999999999999997e-36

    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. Step-by-step derivation
      1. sub-neg89.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. *-commutative89.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-in89.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. Simplified91.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. Step-by-step derivation
      1. fma-udef90.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -9.6 \cdot 10^{+193} \lor \neg \left(j \leq -1.15 \cdot 10^{+162}\right) \land \left(j \leq -1.7 \cdot 10^{+44} \lor \neg \left(j \leq 4.9 \cdot 10^{-36}\right)\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]

Alternative 22: 51.4% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.70000000000000036e109 or 2.0499999999999998e149 < a

    1. Initial program 80.2%

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

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

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

    if -6.70000000000000036e109 < a < 2.0499999999999998e149

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.7 \cdot 10^{+109} \lor \neg \left(a \leq 2.05 \cdot 10^{+149}\right):\\ \;\;\;\;c \cdot b + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 23: 47.9% accurate, 2.4× speedup?

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

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

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


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

    1. Initial program 67.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-neg67.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. *-commutative67.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-in67.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. Simplified67.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. Step-by-step derivation
      1. fma-udef67.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.84999999999999992e194 < j < 4.8e-36

    1. Initial program 88.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-neg88.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-88.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-neg88.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-neg88.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--90.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*88.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-in88.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-sub88.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*88.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*88.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. Simplified88.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 0 58.1%

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

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

    if 4.8e-36 < j

    1. Initial program 85.7%

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

        \[\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*85.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-in85.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-def88.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -2.85 \cdot 10^{+194}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq 4.8 \cdot 10^{-36}:\\ \;\;\;\;c \cdot b + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 24: 24.2% 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 85.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{c \cdot b} \]
  10. Final simplification26.0%

    \[\leadsto c \cdot b \]

Developer target: 89.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\ t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
        (t_2
         (-
          (- (* (* 18.0 t) (* (* x y) z)) t_1)
          (- (* (* k j) 27.0) (* c b)))))
   (if (< t -1.6210815397541398e-69)
     t_2
     (if (< t 165.68027943805222)
       (+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((a * t) + (i * x)) * 4.0d0
    t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
    if (t < (-1.6210815397541398d-69)) then
        tmp = t_2
    else if (t < 165.68027943805222d0) then
        tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((a * t) + (i * x)) * 4.0
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b))
	tmp = 0
	if t < -1.6210815397541398e-69:
		tmp = t_2
	elif t < 165.68027943805222:
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0)
	t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b)))
	tmp = 0.0
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((a * t) + (i * x)) * 4.0;
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	tmp = 0.0;
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023278 
(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)))