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

Percentage Accurate: 86.3% → 87.4%
Time: 28.5s
Alternatives: 29
Speedup: 0.5×

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 29 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: 86.3% accurate, 1.0× speedup?

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

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

Alternative 1: 87.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 -2.2 \cdot 10^{+116}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(\left(t \cdot y\right) \cdot z\right)\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{+198}:\\ \;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), b \cdot c\right) - \mathsf{fma}\left(x, i \cdot 4, j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), b \cdot c\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 (<= x -2.2e+116)
   (* x (- (* i (- 4.0)) (* -18.0 (* (* t y) z))))
   (if (<= x 5.5e+198)
     (-
      (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (* b c))
      (fma x (* i 4.0) (* j (* 27.0 k))))
     (-
      (fma x (fma 18.0 (* t (* y z)) (* i -4.0)) (* b c))
      (* 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 (x <= -2.2e+116) {
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)));
	} else if (x <= 5.5e+198) {
		tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), (b * c)) - fma(x, (i * 4.0), (j * (27.0 * k)));
	} else {
		tmp = fma(x, fma(18.0, (t * (y * z)), (i * -4.0)), (b * c)) - (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 (x <= -2.2e+116)
		tmp = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(-18.0 * Float64(Float64(t * y) * z))));
	elseif (x <= 5.5e+198)
		tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), Float64(b * c)) - fma(x, Float64(i * 4.0), Float64(j * Float64(27.0 * k))));
	else
		tmp = Float64(fma(x, fma(18.0, Float64(t * Float64(y * z)), Float64(i * -4.0)), Float64(b * c)) - Float64(k * Float64(j * 27.0)));
	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, -2.2e+116], N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(-18.0 * N[(N[(t * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.5e+198], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $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}\;x \leq -2.2 \cdot 10^{+116}:\\
\;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(\left(t \cdot y\right) \cdot z\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.2e116

    1. Initial program 68.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. Simplified70.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)} \]
    3. Taylor expanded in x around inf 68.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv83.1%

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

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

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

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

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

    if -2.2e116 < x < 5.5000000000000004e198

    1. Initial program 91.0%

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

        \[\leadsto \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 - b \cdot c\right)\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
    3. Simplified93.1%

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

    if 5.5000000000000004e198 < x

    1. Initial program 71.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. Taylor expanded in a around 0 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.1% accurate, 0.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;\left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(4 \cdot a\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - 4 \cdot a\right)\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(i \cdot 4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(\left(t \cdot y\right) \cdot z\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 (<=
      (-
       (-
        (+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* 4.0 a))))
        (* i (* x 4.0)))
       (* k (* j 27.0)))
      INFINITY)
   (-
    (+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* 4.0 a))))
    (+ (* j (* 27.0 k)) (* x (* i 4.0))))
   (* x (- (* i (- 4.0)) (* -18.0 (* (* t y) z))))))
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 (((((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (4.0 * a)))) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
		tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (4.0 * a)))) - ((j * (27.0 * k)) + (x * (i * 4.0)));
	} else {
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)));
	}
	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 (((((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (4.0 * a)))) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Double.POSITIVE_INFINITY) {
		tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (4.0 * a)))) - ((j * (27.0 * k)) + (x * (i * 4.0)));
	} else {
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)));
	}
	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 ((((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (4.0 * a)))) - (i * (x * 4.0))) - (k * (j * 27.0))) <= math.inf:
		tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (4.0 * a)))) - ((j * (27.0 * k)) + (x * (i * 4.0)))
	else:
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)))
	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(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(4.0 * a)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(4.0 * a)))) - Float64(Float64(j * Float64(27.0 * k)) + Float64(x * Float64(i * 4.0))));
	else
		tmp = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(-18.0 * Float64(Float64(t * y) * z))));
	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 (((((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (4.0 * a)))) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Inf)
		tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (4.0 * a)))) - ((j * (27.0 * k)) + (x * (i * 4.0)));
	else
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)));
	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[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(-18.0 * N[(N[(t * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(4 \cdot a\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - 4 \cdot a\right)\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(i \cdot 4\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(\left(t \cdot y\right) \cdot z\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 92.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. Simplified92.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)} \]

    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. Simplified14.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)} \]
    3. Taylor expanded in x around inf 28.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv62.1%

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

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

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

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

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

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

Alternative 3: 60.5% accurate, 0.7× 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(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\ t_2 := b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\ t_3 := k \cdot \left(j \cdot 27\right)\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{+167}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) - t_3\\ \mathbf{elif}\;t_3 \leq -5 \cdot 10^{-196}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+170}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 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 (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))
        (t_2 (- (* b c) (* 4.0 (+ (* t a) (* x i)))))
        (t_3 (* k (* j 27.0))))
   (if (<= t_3 -1e+167)
     (- (* t (* a -4.0)) t_3)
     (if (<= t_3 -5e-196)
       t_2
       (if (<= t_3 1e-235)
         t_1
         (if (<= t_3 2e-72)
           t_2
           (if (<= t_3 4e+170)
             t_1
             (- (* b c) (+ (* 27.0 (* j k)) (* 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 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
	double t_2 = (b * c) - (4.0 * ((t * a) + (x * i)));
	double t_3 = k * (j * 27.0);
	double tmp;
	if (t_3 <= -1e+167) {
		tmp = (t * (a * -4.0)) - t_3;
	} else if (t_3 <= -5e-196) {
		tmp = t_2;
	} else if (t_3 <= 1e-235) {
		tmp = t_1;
	} else if (t_3 <= 2e-72) {
		tmp = t_2;
	} else if (t_3 <= 4e+170) {
		tmp = t_1;
	} else {
		tmp = (b * c) - ((27.0 * (j * k)) + (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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
    t_2 = (b * c) - (4.0d0 * ((t * a) + (x * i)))
    t_3 = k * (j * 27.0d0)
    if (t_3 <= (-1d+167)) then
        tmp = (t * (a * (-4.0d0))) - t_3
    else if (t_3 <= (-5d-196)) then
        tmp = t_2
    else if (t_3 <= 1d-235) then
        tmp = t_1
    else if (t_3 <= 2d-72) then
        tmp = t_2
    else if (t_3 <= 4d+170) then
        tmp = t_1
    else
        tmp = (b * c) - ((27.0d0 * (j * k)) + (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 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
	double t_2 = (b * c) - (4.0 * ((t * a) + (x * i)));
	double t_3 = k * (j * 27.0);
	double tmp;
	if (t_3 <= -1e+167) {
		tmp = (t * (a * -4.0)) - t_3;
	} else if (t_3 <= -5e-196) {
		tmp = t_2;
	} else if (t_3 <= 1e-235) {
		tmp = t_1;
	} else if (t_3 <= 2e-72) {
		tmp = t_2;
	} else if (t_3 <= 4e+170) {
		tmp = t_1;
	} else {
		tmp = (b * c) - ((27.0 * (j * k)) + (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 = x * ((18.0 * (t * (y * z))) - (i * 4.0))
	t_2 = (b * c) - (4.0 * ((t * a) + (x * i)))
	t_3 = k * (j * 27.0)
	tmp = 0
	if t_3 <= -1e+167:
		tmp = (t * (a * -4.0)) - t_3
	elif t_3 <= -5e-196:
		tmp = t_2
	elif t_3 <= 1e-235:
		tmp = t_1
	elif t_3 <= 2e-72:
		tmp = t_2
	elif t_3 <= 4e+170:
		tmp = t_1
	else:
		tmp = (b * c) - ((27.0 * (j * k)) + (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(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0)))
	t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i))))
	t_3 = Float64(k * Float64(j * 27.0))
	tmp = 0.0
	if (t_3 <= -1e+167)
		tmp = Float64(Float64(t * Float64(a * -4.0)) - t_3);
	elseif (t_3 <= -5e-196)
		tmp = t_2;
	elseif (t_3 <= 1e-235)
		tmp = t_1;
	elseif (t_3 <= 2e-72)
		tmp = t_2;
	elseif (t_3 <= 4e+170)
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + 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 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
	t_2 = (b * c) - (4.0 * ((t * a) + (x * i)));
	t_3 = k * (j * 27.0);
	tmp = 0.0;
	if (t_3 <= -1e+167)
		tmp = (t * (a * -4.0)) - t_3;
	elseif (t_3 <= -5e-196)
		tmp = t_2;
	elseif (t_3 <= 1e-235)
		tmp = t_1;
	elseif (t_3 <= 2e-72)
		tmp = t_2;
	elseif (t_3 <= 4e+170)
		tmp = t_1;
	else
		tmp = (b * c) - ((27.0 * (j * k)) + (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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+167], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$3, -5e-196], t$95$2, If[LessEqual[t$95$3, 1e-235], t$95$1, If[LessEqual[t$95$3, 2e-72], t$95$2, If[LessEqual[t$95$3, 4e+170], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + 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 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
t_2 := b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_3 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{+167}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - t_3\\

\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-196}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_3 \leq 10^{-235}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-72}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_3 \leq 4 \cdot 10^{+170}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1e167 < (*.f64 (*.f64 j 27) k) < -5.0000000000000005e-196 or 9.9999999999999996e-236 < (*.f64 (*.f64 j 27) k) < 1.9999999999999999e-72

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if -5.0000000000000005e-196 < (*.f64 (*.f64 j 27) k) < 9.9999999999999996e-236 or 1.9999999999999999e-72 < (*.f64 (*.f64 j 27) k) < 4.00000000000000014e170

    1. Initial program 84.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. Simplified84.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)} \]
    3. Taylor expanded in x around inf 68.4%

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

    if 4.00000000000000014e170 < (*.f64 (*.f64 j 27) k)

    1. Initial program 93.0%

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

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

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

Alternative 4: 60.0% accurate, 0.7× 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(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\ t_2 := b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\ t_3 := k \cdot \left(j \cdot 27\right)\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{+167}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) - t_3\\ \mathbf{elif}\;t_3 \leq -5 \cdot 10^{-196}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 10^{-235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+170}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
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 (* t (* y z))) (* i 4.0))))
        (t_2 (- (* b c) (* 4.0 (+ (* t a) (* x i)))))
        (t_3 (* k (* j 27.0))))
   (if (<= t_3 -1e+167)
     (- (* t (* a -4.0)) t_3)
     (if (<= t_3 -5e-196)
       t_2
       (if (<= t_3 1e-235)
         t_1
         (if (<= t_3 2e-72)
           t_2
           (if (<= t_3 4e+170) t_1 (- (* b c) (* 27.0 (* j k))))))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
	double t_2 = (b * c) - (4.0 * ((t * a) + (x * i)));
	double t_3 = k * (j * 27.0);
	double tmp;
	if (t_3 <= -1e+167) {
		tmp = (t * (a * -4.0)) - t_3;
	} else if (t_3 <= -5e-196) {
		tmp = t_2;
	} else if (t_3 <= 1e-235) {
		tmp = t_1;
	} else if (t_3 <= 2e-72) {
		tmp = t_2;
	} else if (t_3 <= 4e+170) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 * (t * (y * z))) - (i * 4.0d0))
    t_2 = (b * c) - (4.0d0 * ((t * a) + (x * i)))
    t_3 = k * (j * 27.0d0)
    if (t_3 <= (-1d+167)) then
        tmp = (t * (a * (-4.0d0))) - t_3
    else if (t_3 <= (-5d-196)) then
        tmp = t_2
    else if (t_3 <= 1d-235) then
        tmp = t_1
    else if (t_3 <= 2d-72) then
        tmp = t_2
    else if (t_3 <= 4d+170) then
        tmp = t_1
    else
        tmp = (b * c) - (27.0d0 * (j * k))
    end if
    code = tmp
end function
assert y < z;
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
	double t_2 = (b * c) - (4.0 * ((t * a) + (x * i)));
	double t_3 = k * (j * 27.0);
	double tmp;
	if (t_3 <= -1e+167) {
		tmp = (t * (a * -4.0)) - t_3;
	} else if (t_3 <= -5e-196) {
		tmp = t_2;
	} else if (t_3 <= 1e-235) {
		tmp = t_1;
	} else if (t_3 <= 2e-72) {
		tmp = t_2;
	} else if (t_3 <= 4e+170) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0))
	t_2 = (b * c) - (4.0 * ((t * a) + (x * i)))
	t_3 = k * (j * 27.0)
	tmp = 0
	if t_3 <= -1e+167:
		tmp = (t * (a * -4.0)) - t_3
	elif t_3 <= -5e-196:
		tmp = t_2
	elif t_3 <= 1e-235:
		tmp = t_1
	elif t_3 <= 2e-72:
		tmp = t_2
	elif t_3 <= 4e+170:
		tmp = t_1
	else:
		tmp = (b * c) - (27.0 * (j * k))
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0)))
	t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i))))
	t_3 = Float64(k * Float64(j * 27.0))
	tmp = 0.0
	if (t_3 <= -1e+167)
		tmp = Float64(Float64(t * Float64(a * -4.0)) - t_3);
	elseif (t_3 <= -5e-196)
		tmp = t_2;
	elseif (t_3 <= 1e-235)
		tmp = t_1;
	elseif (t_3 <= 2e-72)
		tmp = t_2;
	elseif (t_3 <= 4e+170)
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
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 * (t * (y * z))) - (i * 4.0));
	t_2 = (b * c) - (4.0 * ((t * a) + (x * i)));
	t_3 = k * (j * 27.0);
	tmp = 0.0;
	if (t_3 <= -1e+167)
		tmp = (t * (a * -4.0)) - t_3;
	elseif (t_3 <= -5e-196)
		tmp = t_2;
	elseif (t_3 <= 1e-235)
		tmp = t_1;
	elseif (t_3 <= 2e-72)
		tmp = t_2;
	elseif (t_3 <= 4e+170)
		tmp = t_1;
	else
		tmp = (b * c) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+167], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$3, -5e-196], t$95$2, If[LessEqual[t$95$3, 1e-235], t$95$1, If[LessEqual[t$95$3, 2e-72], t$95$2, If[LessEqual[t$95$3, 4e+170], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
t_2 := b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_3 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{+167}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - t_3\\

\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-196}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_3 \leq 10^{-235}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-72}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_3 \leq 4 \cdot 10^{+170}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1e167 < (*.f64 (*.f64 j 27) k) < -5.0000000000000005e-196 or 9.9999999999999996e-236 < (*.f64 (*.f64 j 27) k) < 1.9999999999999999e-72

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if -5.0000000000000005e-196 < (*.f64 (*.f64 j 27) k) < 9.9999999999999996e-236 or 1.9999999999999999e-72 < (*.f64 (*.f64 j 27) k) < 4.00000000000000014e170

    1. Initial program 84.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. Simplified84.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)} \]
    3. Taylor expanded in x around inf 68.4%

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

    if 4.00000000000000014e170 < (*.f64 (*.f64 j 27) k)

    1. Initial program 93.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. Taylor expanded in a around 0 86.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 52.1% accurate, 0.8× 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(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\ t_2 := k \cdot \left(j \cdot 27\right)\\ t_3 := t \cdot \left(a \cdot -4\right) - t_2\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+111}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-75}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+170}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
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 (* t (* y z))) (* i 4.0))))
        (t_2 (* k (* j 27.0)))
        (t_3 (- (* t (* a -4.0)) t_2)))
   (if (<= t_2 -1e+111)
     t_3
     (if (<= t_2 -2e-39)
       t_1
       (if (<= t_2 -2e-75)
         t_3
         (if (<= t_2 4e+170) t_1 (- (* b c) (* 27.0 (* j k)))))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
	double t_2 = k * (j * 27.0);
	double t_3 = (t * (a * -4.0)) - t_2;
	double tmp;
	if (t_2 <= -1e+111) {
		tmp = t_3;
	} else if (t_2 <= -2e-39) {
		tmp = t_1;
	} else if (t_2 <= -2e-75) {
		tmp = t_3;
	} else if (t_2 <= 4e+170) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 * (t * (y * z))) - (i * 4.0d0))
    t_2 = k * (j * 27.0d0)
    t_3 = (t * (a * (-4.0d0))) - t_2
    if (t_2 <= (-1d+111)) then
        tmp = t_3
    else if (t_2 <= (-2d-39)) then
        tmp = t_1
    else if (t_2 <= (-2d-75)) then
        tmp = t_3
    else if (t_2 <= 4d+170) then
        tmp = t_1
    else
        tmp = (b * c) - (27.0d0 * (j * k))
    end if
    code = tmp
end function
assert y < z;
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
	double t_2 = k * (j * 27.0);
	double t_3 = (t * (a * -4.0)) - t_2;
	double tmp;
	if (t_2 <= -1e+111) {
		tmp = t_3;
	} else if (t_2 <= -2e-39) {
		tmp = t_1;
	} else if (t_2 <= -2e-75) {
		tmp = t_3;
	} else if (t_2 <= 4e+170) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0))
	t_2 = k * (j * 27.0)
	t_3 = (t * (a * -4.0)) - t_2
	tmp = 0
	if t_2 <= -1e+111:
		tmp = t_3
	elif t_2 <= -2e-39:
		tmp = t_1
	elif t_2 <= -2e-75:
		tmp = t_3
	elif t_2 <= 4e+170:
		tmp = t_1
	else:
		tmp = (b * c) - (27.0 * (j * k))
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0)))
	t_2 = Float64(k * Float64(j * 27.0))
	t_3 = Float64(Float64(t * Float64(a * -4.0)) - t_2)
	tmp = 0.0
	if (t_2 <= -1e+111)
		tmp = t_3;
	elseif (t_2 <= -2e-39)
		tmp = t_1;
	elseif (t_2 <= -2e-75)
		tmp = t_3;
	elseif (t_2 <= 4e+170)
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
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 * (t * (y * z))) - (i * 4.0));
	t_2 = k * (j * 27.0);
	t_3 = (t * (a * -4.0)) - t_2;
	tmp = 0.0;
	if (t_2 <= -1e+111)
		tmp = t_3;
	elseif (t_2 <= -2e-39)
		tmp = t_1;
	elseif (t_2 <= -2e-75)
		tmp = t_3;
	elseif (t_2 <= 4e+170)
		tmp = t_1;
	else
		tmp = (b * c) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(t * N[(y * z), $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[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+111], t$95$3, If[LessEqual[t$95$2, -2e-39], t$95$1, If[LessEqual[t$95$2, -2e-75], t$95$3, If[LessEqual[t$95$2, 4e+170], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
t_3 := t \cdot \left(a \cdot -4\right) - t_2\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+111}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-75}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+170}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j 27) k) < -9.99999999999999957e110 or -1.99999999999999986e-39 < (*.f64 (*.f64 j 27) k) < -1.9999999999999999e-75

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999957e110 < (*.f64 (*.f64 j 27) k) < -1.99999999999999986e-39 or -1.9999999999999999e-75 < (*.f64 (*.f64 j 27) k) < 4.00000000000000014e170

    1. Initial program 84.2%

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

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

    if 4.00000000000000014e170 < (*.f64 (*.f64 j 27) k)

    1. Initial program 93.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. Taylor expanded in a around 0 86.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 85.3% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.25000000000000006e42 or 5.5e-18 < t

    1. Initial program 86.5%

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

      \[\leadsto \color{blue}{\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. Taylor expanded in i around 0 87.7%

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

    if -2.25000000000000006e42 < t < -1.45000000000000003e-210

    1. Initial program 91.9%

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

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

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

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

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

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

    if -1.45000000000000003e-210 < t < 5.5e-18

    1. Initial program 79.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. Simplified79.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)} \]
    3. Taylor expanded in x around inf 77.1%

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

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

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

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

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

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

Alternative 7: 84.3% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.0000000000000002e38

    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. Simplified91.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)} \]
    3. Taylor expanded in i around 0 88.6%

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

    if -6.0000000000000002e38 < t < -1.25000000000000005e-216

    1. Initial program 91.9%

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

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

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

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

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

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

    if -1.25000000000000005e-216 < t < 5.0000000000000004e-16

    1. Initial program 79.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. Simplified79.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)} \]
    3. Taylor expanded in x around inf 77.1%

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

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

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

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

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

    if 5.0000000000000004e-16 < t

    1. Initial program 88.2%

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

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

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

Alternative 8: 84.6% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.00000000000000017e36 or 3.3999999999999998e31 < t

    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. 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)} \]
    3. Taylor expanded in i around 0 88.5%

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

    if -4.00000000000000017e36 < t < 3.3999999999999998e31

    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. Taylor expanded in y around 0 89.1%

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

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

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

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

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

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

Alternative 9: 71.5% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 71.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. Simplified73.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. Taylor expanded in x around inf 67.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv80.9%

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

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

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

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

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

    if -7.50000000000000027e72 < x < 2.70000000000000016e-168

    1. Initial program 90.0%

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

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

    if 2.70000000000000016e-168 < x < 3.1999999999999999e83

    1. Initial program 94.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 a around 0 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.1999999999999999e83 < x

    1. Initial program 78.7%

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

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

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

Alternative 10: 79.7% accurate, 1.2× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

    if -2.39999999999999997e85 < t < 8.8000000000000005e29

    1. Initial program 85.4%

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

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

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

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

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

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

    if 8.8000000000000005e29 < t

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

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

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

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

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

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

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

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

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

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

Alternative 11: 79.6% accurate, 1.2× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

    if -3.4000000000000003e85 < t < 1.3e29

    1. Initial program 85.4%

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

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

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

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

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

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

    if 1.3e29 < t

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

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

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.95e85 or 1.12e33 < t

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

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

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

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

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

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

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

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

    if -2.95e85 < t < 1.12e33

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

\mathbf{elif}\;x \leq 5.2 \cdot 10^{-64}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;x \leq 2.9 \cdot 10^{+102}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 1.16 \cdot 10^{+181}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 1.12 \cdot 10^{+200}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -1.15e68

    1. Initial program 70.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. Simplified74.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)} \]
    3. Taylor expanded in x around inf 66.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv79.3%

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

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

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

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

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

      \[\leadsto -\color{blue}{-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    10. Step-by-step derivation
      1. *-commutative53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e68 < x < 5.2e-64 or 2.3500000000000001e-32 < x < 2.9000000000000002e102

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2e-64 < x < 2.3500000000000001e-32

    1. Initial program 71.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv52.4%

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

        \[\leadsto -x \cdot \left(-18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(--4\right) \cdot i\right) \]
      4. metadata-eval61.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\left(-18 \cdot x\right) \cdot \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} \]
      8. *-commutative70.7%

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

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

        \[\leadsto -\color{blue}{\left(z \cdot t\right) \cdot \left(y \cdot \left(-18 \cdot x\right)\right)} \]
      11. *-commutative70.7%

        \[\leadsto -\color{blue}{\left(t \cdot z\right)} \cdot \left(y \cdot \left(-18 \cdot x\right)\right) \]
      12. *-commutative70.7%

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

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

    if 2.9000000000000002e102 < x < 1.16000000000000003e181 or 6.2000000000000002e242 < x

    1. Initial program 81.9%

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

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

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

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

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

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

    if 1.16000000000000003e181 < x < 1.12000000000000004e200

    1. Initial program 50.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. Simplified75.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)} \]
    3. Taylor expanded in j around inf 50.2%

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

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

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

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

    if 1.12000000000000004e200 < x < 6.2000000000000002e242

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutative42.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.15 \cdot 10^{+68}:\\ \;\;\;\;x \cdot \left(z \cdot \left(t \cdot \left(-18 \cdot \left(-y\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-64}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{-32}:\\ \;\;\;\;\left(t \cdot z\right) \cdot \left(y \cdot \left(-18 \cdot \left(-x\right)\right)\right)\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+102}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 1.16 \cdot 10^{+181}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+200}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+242}:\\ \;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]

Alternative 14: 71.3% accurate, 1.3× speedup?

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

\mathbf{elif}\;x \leq 4.3 \cdot 10^{-168}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;x \leq 2.4 \cdot 10^{+47}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 71.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. Simplified73.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. Taylor expanded in x around inf 67.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv80.9%

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

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

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

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

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

    if -4.1999999999999998e74 < x < 4.29999999999999995e-168 or 1.6000000000000001e-55 < x < 2.40000000000000019e47

    1. Initial program 89.1%

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

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

    if 4.29999999999999995e-168 < x < 1.6000000000000001e-55

    1. Initial program 99.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. Simplified99.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)} \]
    3. Taylor expanded in t around 0 79.0%

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

    if 2.40000000000000019e47 < x

    1. Initial program 80.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. Simplified84.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)} \]
    3. Taylor expanded in x around inf 70.7%

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

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

Alternative 15: 71.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 := 27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(\left(t \cdot y\right) \cdot z\right)\right)\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{-169}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{-77}:\\ \;\;\;\;b \cdot c - \left(t_1 + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 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 (* 27.0 (* j k))))
   (if (<= x -1.9e+73)
     (* x (- (* i (- 4.0)) (* -18.0 (* (* t y) z))))
     (if (<= x 9.6e-169)
       (- (+ (* b c) (* -4.0 (* t a))) t_1)
       (if (<= x 2.35e-77)
         (- (* b c) (+ t_1 (* 4.0 (* x i))))
         (if (<= x 1.8e+46)
           (- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0)))
           (* x (- (* 18.0 (* t (* y z))) (* 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 = 27.0 * (j * k);
	double tmp;
	if (x <= -1.9e+73) {
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)));
	} else if (x <= 9.6e-169) {
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	} else if (x <= 2.35e-77) {
		tmp = (b * c) - (t_1 + (4.0 * (x * i)));
	} else if (x <= 1.8e+46) {
		tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (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 = 27.0d0 * (j * k)
    if (x <= (-1.9d+73)) then
        tmp = x * ((i * -4.0d0) - ((-18.0d0) * ((t * y) * z)))
    else if (x <= 9.6d-169) then
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
    else if (x <= 2.35d-77) then
        tmp = (b * c) - (t_1 + (4.0d0 * (x * i)))
    else if (x <= 1.8d+46) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (j * 27.0d0))
    else
        tmp = x * ((18.0d0 * (t * (y * z))) - (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 = 27.0 * (j * k);
	double tmp;
	if (x <= -1.9e+73) {
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)));
	} else if (x <= 9.6e-169) {
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	} else if (x <= 2.35e-77) {
		tmp = (b * c) - (t_1 + (4.0 * (x * i)));
	} else if (x <= 1.8e+46) {
		tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
	} else {
		tmp = x * ((18.0 * (t * (y * z))) - (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 = 27.0 * (j * k)
	tmp = 0
	if x <= -1.9e+73:
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)))
	elif x <= 9.6e-169:
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1
	elif x <= 2.35e-77:
		tmp = (b * c) - (t_1 + (4.0 * (x * i)))
	elif x <= 1.8e+46:
		tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0))
	else:
		tmp = x * ((18.0 * (t * (y * z))) - (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(27.0 * Float64(j * k))
	tmp = 0.0
	if (x <= -1.9e+73)
		tmp = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(-18.0 * Float64(Float64(t * y) * z))));
	elseif (x <= 9.6e-169)
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1);
	elseif (x <= 2.35e-77)
		tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(4.0 * Float64(x * i))));
	elseif (x <= 1.8e+46)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0)));
	else
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - 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 = 27.0 * (j * k);
	tmp = 0.0;
	if (x <= -1.9e+73)
		tmp = x * ((i * -4.0) - (-18.0 * ((t * y) * z)));
	elseif (x <= 9.6e-169)
		tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
	elseif (x <= 2.35e-77)
		tmp = (b * c) - (t_1 + (4.0 * (x * i)));
	elseif (x <= 1.8e+46)
		tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
	else
		tmp = x * ((18.0 * (t * (y * z))) - (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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.9e+73], N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(-18.0 * N[(N[(t * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.6e-169], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 2.35e-77], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e+46], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 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 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{+73}:\\
\;\;\;\;x \cdot \left(i \cdot \left(-4\right) - -18 \cdot \left(\left(t \cdot y\right) \cdot z\right)\right)\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.90000000000000011e73

    1. Initial program 71.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. Simplified73.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. Taylor expanded in x around inf 67.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv80.9%

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

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

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

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

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

    if -1.90000000000000011e73 < x < 9.60000000000000043e-169

    1. Initial program 90.0%

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

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

    if 9.60000000000000043e-169 < x < 2.3499999999999999e-77

    1. Initial program 99.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. Simplified99.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)} \]
    3. Taylor expanded in t around 0 83.7%

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

    if 2.3499999999999999e-77 < x < 1.7999999999999999e46

    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. Taylor expanded in y around 0 63.1%

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

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

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

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

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

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

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

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

    if 1.7999999999999999e46 < x

    1. Initial program 80.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. Simplified84.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)} \]
    3. Taylor expanded in x around inf 70.7%

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

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

Alternative 16: 36.2% accurate, 1.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.08 \cdot 10^{+148}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-224}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-314}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+78}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \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 (<= (* b c) -1.08e+148)
   (* b c)
   (if (<= (* b c) -7.2e-224)
     (* k (* j -27.0))
     (if (<= (* b c) -5e-314)
       (* t (* a -4.0))
       (if (<= (* b c) 2e+78) (* j (* k -27.0)) (* b c))))))
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 ((b * c) <= -1.08e+148) {
		tmp = b * c;
	} else if ((b * c) <= -7.2e-224) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= -5e-314) {
		tmp = t * (a * -4.0);
	} else if ((b * c) <= 2e+78) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	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 ((b * c) <= (-1.08d+148)) then
        tmp = b * c
    else if ((b * c) <= (-7.2d-224)) then
        tmp = k * (j * (-27.0d0))
    else if ((b * c) <= (-5d-314)) then
        tmp = t * (a * (-4.0d0))
    else if ((b * c) <= 2d+78) then
        tmp = j * (k * (-27.0d0))
    else
        tmp = b * c
    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 ((b * c) <= -1.08e+148) {
		tmp = b * c;
	} else if ((b * c) <= -7.2e-224) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= -5e-314) {
		tmp = t * (a * -4.0);
	} else if ((b * c) <= 2e+78) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	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 (b * c) <= -1.08e+148:
		tmp = b * c
	elif (b * c) <= -7.2e-224:
		tmp = k * (j * -27.0)
	elif (b * c) <= -5e-314:
		tmp = t * (a * -4.0)
	elif (b * c) <= 2e+78:
		tmp = j * (k * -27.0)
	else:
		tmp = b * c
	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(b * c) <= -1.08e+148)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -7.2e-224)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (Float64(b * c) <= -5e-314)
		tmp = Float64(t * Float64(a * -4.0));
	elseif (Float64(b * c) <= 2e+78)
		tmp = Float64(j * Float64(k * -27.0));
	else
		tmp = Float64(b * c);
	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 ((b * c) <= -1.08e+148)
		tmp = b * c;
	elseif ((b * c) <= -7.2e-224)
		tmp = k * (j * -27.0);
	elseif ((b * c) <= -5e-314)
		tmp = t * (a * -4.0);
	elseif ((b * c) <= 2e+78)
		tmp = j * (k * -27.0);
	else
		tmp = b * c;
	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[(b * c), $MachinePrecision], -1.08e+148], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.2e-224], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-314], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+78], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.08 \cdot 10^{+148}:\\
\;\;\;\;b \cdot c\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -1.07999999999999999e148 or 2.00000000000000002e78 < (*.f64 b c)

    1. Initial program 80.6%

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

      \[\leadsto \color{blue}{\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. Taylor expanded in b around inf 55.5%

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

    if -1.07999999999999999e148 < (*.f64 b c) < -7.1999999999999999e-224

    1. Initial program 86.5%

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

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

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

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

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

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

    if -7.1999999999999999e-224 < (*.f64 b c) < -4.99999999982e-314

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if -4.99999999982e-314 < (*.f64 b c) < 2.00000000000000002e78

    1. Initial program 86.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.08 \cdot 10^{+148}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-224}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-314}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+78}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 17: 77.3% accurate, 1.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.99999999999999993e79

    1. Initial program 70.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. Simplified73.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)} \]
    3. Taylor expanded in x around inf 66.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999993e79 < x

    1. Initial program 88.3%

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

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

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

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

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

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

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

Alternative 18: 47.9% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;t \leq 1050:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - t_2\\

\mathbf{elif}\;t \leq 6.6 \cdot 10^{+174}:\\
\;\;\;\;t_1 - t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.05000000000000005e105

    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. Simplified91.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)} \]
    3. Taylor expanded in x around inf 73.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000005e105 < t < -185000

    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 a around 0 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -185000 < t < 1050

    1. Initial program 84.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 a around 0 77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1050 < t < 6.6000000000000001e174

    1. Initial program 93.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 t around -inf 79.7%

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

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

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

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

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

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

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

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

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

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

    if 6.6000000000000001e174 < t < 1.94999999999999989e288

    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. Simplified81.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)} \]
    3. Taylor expanded in x around inf 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) \cdot x} \]
      6. *-commutative63.7%

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

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

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

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

    if 1.94999999999999989e288 < t

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+105}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -185000:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 1050:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+174}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+288}:\\ \;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \end{array} \]

Alternative 19: 64.4% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.1999999999999997e100 or 1.9199999999999999e31 < t

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999997e100 < t < 1.9199999999999999e31

    1. Initial program 85.0%

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

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

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

Alternative 20: 33.1% accurate, 1.8× speedup?

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

\mathbf{elif}\;k \leq 1.9 \cdot 10^{-280}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;k \leq 3.35 \cdot 10^{-233}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;k \leq 4.4 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;k \leq 2.9 \cdot 10^{+128}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

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


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

    1. Initial program 87.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. Simplified85.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. Taylor expanded in j around inf 39.5%

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

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

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

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

    if -2.1000000000000001e24 < k < 1.9000000000000001e-280 or 3.35000000000000011e-233 < k < 4.3999999999999998e-138

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e-280 < k < 3.35000000000000011e-233

    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. Simplified76.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)} \]
    3. Taylor expanded in b around inf 30.8%

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

    if 4.3999999999999998e-138 < k < 2.9e128

    1. Initial program 78.7%

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

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

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

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

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

    if 2.9e128 < k

    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. Simplified89.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)} \]
    3. Taylor expanded in j around inf 50.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -2.1 \cdot 10^{+24}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.9 \cdot 10^{-280}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;k \leq 3.35 \cdot 10^{-233}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 4.4 \cdot 10^{-138}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;k \leq 2.9 \cdot 10^{+128}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]

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

\mathbf{elif}\;k \leq 2.5 \cdot 10^{-281}:\\
\;\;\;\;t \cdot \left(18 \cdot t_1\right)\\

\mathbf{elif}\;k \leq 7.1 \cdot 10^{-230}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;k \leq 3.6 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if k < -7e18

    1. Initial program 87.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. Simplified85.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. Taylor expanded in j around inf 39.5%

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

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

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

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

    if -7e18 < k < 2.4999999999999999e-281

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4999999999999999e-281 < k < 7.10000000000000018e-230

    1. Initial program 89.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. Simplified78.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)} \]
    3. Taylor expanded in b around inf 29.3%

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

    if 7.10000000000000018e-230 < k < 1.85e-137

    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. Simplified92.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)} \]
    3. Taylor expanded in x around inf 85.0%

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

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

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

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

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

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

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

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

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

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

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

    if 1.85e-137 < k < 3.6000000000000003e125

    1. Initial program 78.7%

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

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

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

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

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

    if 3.6000000000000003e125 < k

    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. Simplified89.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)} \]
    3. Taylor expanded in j around inf 50.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -7 \cdot 10^{+18}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 2.5 \cdot 10^{-281}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;k \leq 7.1 \cdot 10^{-230}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 1.85 \cdot 10^{-137}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;k \leq 3.6 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 22: 32.9% accurate, 1.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;k \leq -3.65 \cdot 10^{+25}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 6.2 \cdot 10^{-282}:\\ \;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\ \mathbf{elif}\;k \leq 6.9 \cdot 10^{-227}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 8.2 \cdot 10^{-139}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;k \leq 4 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;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 (<= k -3.65e+25)
   (* j (* k -27.0))
   (if (<= k 6.2e-282)
     (* x (* (* y z) (* t 18.0)))
     (if (<= k 6.9e-227)
       (* b c)
       (if (<= k 8.2e-139)
         (* 18.0 (* t (* x (* y z))))
         (if (<= k 4e+126) (* x (* 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 (k <= -3.65e+25) {
		tmp = j * (k * -27.0);
	} else if (k <= 6.2e-282) {
		tmp = x * ((y * z) * (t * 18.0));
	} else if (k <= 6.9e-227) {
		tmp = b * c;
	} else if (k <= 8.2e-139) {
		tmp = 18.0 * (t * (x * (y * z)));
	} else if (k <= 4e+126) {
		tmp = x * (i * -4.0);
	} else {
		tmp = 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 (k <= (-3.65d+25)) then
        tmp = j * (k * (-27.0d0))
    else if (k <= 6.2d-282) then
        tmp = x * ((y * z) * (t * 18.0d0))
    else if (k <= 6.9d-227) then
        tmp = b * c
    else if (k <= 8.2d-139) then
        tmp = 18.0d0 * (t * (x * (y * z)))
    else if (k <= 4d+126) then
        tmp = x * (i * (-4.0d0))
    else
        tmp = 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 (k <= -3.65e+25) {
		tmp = j * (k * -27.0);
	} else if (k <= 6.2e-282) {
		tmp = x * ((y * z) * (t * 18.0));
	} else if (k <= 6.9e-227) {
		tmp = b * c;
	} else if (k <= 8.2e-139) {
		tmp = 18.0 * (t * (x * (y * z)));
	} else if (k <= 4e+126) {
		tmp = x * (i * -4.0);
	} else {
		tmp = 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 k <= -3.65e+25:
		tmp = j * (k * -27.0)
	elif k <= 6.2e-282:
		tmp = x * ((y * z) * (t * 18.0))
	elif k <= 6.9e-227:
		tmp = b * c
	elif k <= 8.2e-139:
		tmp = 18.0 * (t * (x * (y * z)))
	elif k <= 4e+126:
		tmp = x * (i * -4.0)
	else:
		tmp = 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 (k <= -3.65e+25)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (k <= 6.2e-282)
		tmp = Float64(x * Float64(Float64(y * z) * Float64(t * 18.0)));
	elseif (k <= 6.9e-227)
		tmp = Float64(b * c);
	elseif (k <= 8.2e-139)
		tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z))));
	elseif (k <= 4e+126)
		tmp = Float64(x * Float64(i * -4.0));
	else
		tmp = 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 (k <= -3.65e+25)
		tmp = j * (k * -27.0);
	elseif (k <= 6.2e-282)
		tmp = x * ((y * z) * (t * 18.0));
	elseif (k <= 6.9e-227)
		tmp = b * c;
	elseif (k <= 8.2e-139)
		tmp = 18.0 * (t * (x * (y * z)));
	elseif (k <= 4e+126)
		tmp = x * (i * -4.0);
	else
		tmp = 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[k, -3.65e+25], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.2e-282], N[(x * N[(N[(y * z), $MachinePrecision] * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.9e-227], N[(b * c), $MachinePrecision], If[LessEqual[k, 8.2e-139], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4e+126], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.65 \cdot 10^{+25}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

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

\mathbf{elif}\;k \leq 6.9 \cdot 10^{-227}:\\
\;\;\;\;b \cdot c\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if k < -3.6499999999999998e25

    1. Initial program 86.8%

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

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

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

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

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

    if -3.6499999999999998e25 < k < 6.20000000000000027e-282

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutative31.8%

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

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

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

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

        \[\leadsto \color{blue}{\left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) \cdot x} \]
      6. *-commutative32.0%

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

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

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

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

    if 6.20000000000000027e-282 < k < 6.89999999999999989e-227

    1. Initial program 89.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. Simplified78.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)} \]
    3. Taylor expanded in b around inf 29.3%

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

    if 6.89999999999999989e-227 < k < 8.20000000000000028e-139

    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. Simplified92.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)} \]
    3. Taylor expanded in x around inf 85.0%

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

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

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

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

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

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

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

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

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

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

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

    if 8.20000000000000028e-139 < k < 3.9999999999999997e126

    1. Initial program 78.7%

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

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

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

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

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

    if 3.9999999999999997e126 < k

    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. Simplified89.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)} \]
    3. Taylor expanded in j around inf 50.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -3.65 \cdot 10^{+25}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 6.2 \cdot 10^{-282}:\\ \;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\ \mathbf{elif}\;k \leq 6.9 \cdot 10^{-227}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 8.2 \cdot 10^{-139}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;k \leq 4 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 23: 45.3% accurate, 1.8× speedup?

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

\mathbf{elif}\;x \leq 5.2 \cdot 10^{-64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 9.6 \cdot 10^{+65}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{+102}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.69999999999999995e65 or 5.2e-64 < x < 9.6000000000000007e65

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutative50.2%

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

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

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

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

        \[\leadsto \color{blue}{\left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) \cdot x} \]
      6. *-commutative54.1%

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

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

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

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

    if -3.69999999999999995e65 < x < 5.2e-64 or 9.6000000000000007e65 < x < 3.8999999999999998e102

    1. Initial program 92.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. Taylor expanded in a around 0 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8999999999999998e102 < x

    1. Initial program 79.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. Simplified83.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)} \]
    3. Taylor expanded in i around inf 47.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{+65}:\\ \;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-64}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+65}:\\ \;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+102}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]

Alternative 24: 45.4% accurate, 1.8× speedup?

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

\mathbf{elif}\;x \leq 1.05 \cdot 10^{-63}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+66}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \leq 1.15 \cdot 10^{+103}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.20000000000000005e72 or 1.05e-63 < x < 1.35e66

    1. Initial program 76.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - -4 \cdot i\right)} \]
      2. cancel-sign-sub-inv69.2%

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

        \[\leadsto -x \cdot \left(-18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + \left(--4\right) \cdot i\right) \]
      4. metadata-eval73.2%

        \[\leadsto -x \cdot \left(-18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + \color{blue}{4} \cdot i\right) \]
      5. *-commutative73.2%

        \[\leadsto -x \cdot \left(-18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + \color{blue}{i \cdot 4}\right) \]
    8. Simplified73.2%

      \[\leadsto \color{blue}{-x \cdot \left(-18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + i \cdot 4\right)} \]
    9. Taylor expanded in t around inf 50.2%

      \[\leadsto -\color{blue}{-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    10. Step-by-step derivation
      1. *-commutative50.2%

        \[\leadsto -\color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \cdot -18} \]
      2. associate-*r*48.8%

        \[\leadsto -\color{blue}{\left(\left(t \cdot x\right) \cdot \left(y \cdot z\right)\right)} \cdot -18 \]
      3. associate-*l*48.8%

        \[\leadsto -\color{blue}{\left(t \cdot x\right) \cdot \left(\left(y \cdot z\right) \cdot -18\right)} \]
      4. associate-*r*50.2%

        \[\leadsto -\color{blue}{t \cdot \left(x \cdot \left(\left(y \cdot z\right) \cdot -18\right)\right)} \]
      5. *-commutative50.2%

        \[\leadsto -t \cdot \color{blue}{\left(\left(\left(y \cdot z\right) \cdot -18\right) \cdot x\right)} \]
      6. associate-*r*51.6%

        \[\leadsto -\color{blue}{\left(t \cdot \left(\left(y \cdot z\right) \cdot -18\right)\right) \cdot x} \]
      7. associate-*l*51.5%

        \[\leadsto -\color{blue}{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot -18\right)} \cdot x \]
      8. associate-*r*52.7%

        \[\leadsto -\left(\color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} \cdot -18\right) \cdot x \]
      9. *-commutative52.7%

        \[\leadsto -\left(\left(\color{blue}{\left(y \cdot t\right)} \cdot z\right) \cdot -18\right) \cdot x \]
      10. *-commutative52.7%

        \[\leadsto -\left(\color{blue}{\left(z \cdot \left(y \cdot t\right)\right)} \cdot -18\right) \cdot x \]
      11. *-commutative52.7%

        \[\leadsto -\color{blue}{x \cdot \left(\left(z \cdot \left(y \cdot t\right)\right) \cdot -18\right)} \]
      12. associate-*l*52.7%

        \[\leadsto -x \cdot \color{blue}{\left(z \cdot \left(\left(y \cdot t\right) \cdot -18\right)\right)} \]
      13. *-commutative52.7%

        \[\leadsto -x \cdot \left(z \cdot \left(\color{blue}{\left(t \cdot y\right)} \cdot -18\right)\right) \]
      14. associate-*l*52.7%

        \[\leadsto -x \cdot \left(z \cdot \color{blue}{\left(t \cdot \left(y \cdot -18\right)\right)}\right) \]
    11. Simplified52.7%

      \[\leadsto -\color{blue}{x \cdot \left(z \cdot \left(t \cdot \left(y \cdot -18\right)\right)\right)} \]

    if -1.20000000000000005e72 < x < 1.05e-63 or 1.35e66 < x < 1.15000000000000004e103

    1. Initial program 92.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. Taylor expanded in a around 0 73.6%

      \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. sub-neg73.6%

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(-4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      2. +-commutative73.6%

        \[\leadsto \left(\color{blue}{\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-+l+73.6%

        \[\leadsto \color{blue}{\left(b \cdot c + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      4. associate-*r*72.9%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      5. *-commutative72.9%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot x\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*73.0%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(\left(18 \cdot t\right) \cdot \left(y \cdot z\right)\right) \cdot x} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      7. associate-*r*73.7%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \cdot x + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. distribute-lft-neg-in73.7%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{\left(-4\right) \cdot \left(i \cdot x\right)}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. metadata-eval73.7%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{-4} \cdot \left(i \cdot x\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. associate-*r*74.4%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{\left(-4 \cdot i\right) \cdot x}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      11. distribute-rgt-in74.4%

        \[\leadsto \left(b \cdot c + \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      12. metadata-eval74.4%

        \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \color{blue}{\left(-4\right)} \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. cancel-sign-sub-inv74.4%

        \[\leadsto \left(b \cdot c + x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      14. +-commutative74.4%

        \[\leadsto \color{blue}{\left(x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) + b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
      15. fma-def75.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i, b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Simplified75.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(18, \left(y \cdot z\right) \cdot t, -4 \cdot i\right), b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
    5. Taylor expanded in x around 0 58.0%

      \[\leadsto \color{blue}{b \cdot c - 27 \cdot \left(j \cdot k\right)} \]

    if 1.15000000000000004e103 < x

    1. Initial program 79.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. Simplified83.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)} \]
    3. Taylor expanded in i around inf 47.6%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    4. Step-by-step derivation
      1. associate-*r*47.6%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} \]
      2. *-commutative47.6%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
    5. Simplified47.6%

      \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.2 \cdot 10^{+72}:\\ \;\;\;\;x \cdot \left(z \cdot \left(t \cdot \left(-18 \cdot \left(-y\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-63}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+66}:\\ \;\;\;\;x \cdot \left(z \cdot \left(t \cdot \left(-18 \cdot \left(-y\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+103}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]

Alternative 25: 46.1% accurate, 1.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+102}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -95000000:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\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 (<= t -1.05e+102)
   (* 18.0 (* t (* x (* y z))))
   (if (<= t -95000000.0)
     (- (* b c) (* 27.0 (* j k)))
     (if (<= t 6.2e+33)
       (- (* x (* i -4.0)) (* k (* j 27.0)))
       (* x (* (* y z) (* t 18.0)))))))
assert(y < z);
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (t <= -1.05e+102) {
		tmp = 18.0 * (t * (x * (y * z)));
	} else if (t <= -95000000.0) {
		tmp = (b * c) - (27.0 * (j * k));
	} else if (t <= 6.2e+33) {
		tmp = (x * (i * -4.0)) - (k * (j * 27.0));
	} else {
		tmp = x * ((y * z) * (t * 18.0));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t <= (-1.05d+102)) then
        tmp = 18.0d0 * (t * (x * (y * z)))
    else if (t <= (-95000000.0d0)) then
        tmp = (b * c) - (27.0d0 * (j * k))
    else if (t <= 6.2d+33) then
        tmp = (x * (i * (-4.0d0))) - (k * (j * 27.0d0))
    else
        tmp = x * ((y * z) * (t * 18.0d0))
    end if
    code = tmp
end function
assert y < z;
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (t <= -1.05e+102) {
		tmp = 18.0 * (t * (x * (y * z)));
	} else if (t <= -95000000.0) {
		tmp = (b * c) - (27.0 * (j * k));
	} else if (t <= 6.2e+33) {
		tmp = (x * (i * -4.0)) - (k * (j * 27.0));
	} else {
		tmp = x * ((y * z) * (t * 18.0));
	}
	return tmp;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if t <= -1.05e+102:
		tmp = 18.0 * (t * (x * (y * z)))
	elif t <= -95000000.0:
		tmp = (b * c) - (27.0 * (j * k))
	elif t <= 6.2e+33:
		tmp = (x * (i * -4.0)) - (k * (j * 27.0))
	else:
		tmp = x * ((y * z) * (t * 18.0))
	return tmp
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -1.05e+102)
		tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z))));
	elseif (t <= -95000000.0)
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	elseif (t <= 6.2e+33)
		tmp = Float64(Float64(x * Float64(i * -4.0)) - Float64(k * Float64(j * 27.0)));
	else
		tmp = Float64(x * Float64(Float64(y * z) * Float64(t * 18.0)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (t <= -1.05e+102)
		tmp = 18.0 * (t * (x * (y * z)));
	elseif (t <= -95000000.0)
		tmp = (b * c) - (27.0 * (j * k));
	elseif (t <= 6.2e+33)
		tmp = (x * (i * -4.0)) - (k * (j * 27.0));
	else
		tmp = x * ((y * z) * (t * 18.0));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.05e+102], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -95000000.0], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+33], N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * z), $MachinePrecision] * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+102}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{elif}\;t \leq -95000000:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) - k \cdot \left(j \cdot 27\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.05000000000000001e102

    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. Simplified91.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)} \]
    3. Taylor expanded in x around inf 73.1%

      \[\leadsto \left(\color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    4. Step-by-step derivation
      1. *-commutative73.1%

        \[\leadsto \left(18 \cdot \color{blue}{\left(\left(x \cdot \left(y \cdot z\right)\right) \cdot t\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      2. associate-*l*71.1%

        \[\leadsto \left(18 \cdot \color{blue}{\left(x \cdot \left(\left(y \cdot z\right) \cdot t\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*l*64.7%

        \[\leadsto \left(18 \cdot \left(x \cdot \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)}\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Simplified64.7%

      \[\leadsto \left(\color{blue}{18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. fma-def64.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(18, x \cdot \left(y \cdot \left(z \cdot t\right)\right), b \cdot c\right)} - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      2. associate-*r*71.1%

        \[\leadsto \mathsf{fma}\left(18, x \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)}, b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. *-commutative71.1%

        \[\leadsto \mathsf{fma}\left(18, \color{blue}{\left(\left(y \cdot z\right) \cdot t\right) \cdot x}, b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*r*64.8%

        \[\leadsto \mathsf{fma}\left(18, \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} \cdot x, b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Applied egg-rr64.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(18, \left(y \cdot \left(z \cdot t\right)\right) \cdot x, b \cdot c\right)} - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    8. Taylor expanded in y around inf 59.4%

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]

    if -1.05000000000000001e102 < t < -9.5e7

    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 a around 0 87.7%

      \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. sub-neg87.7%

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(-4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      2. +-commutative87.7%

        \[\leadsto \left(\color{blue}{\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-+l+87.7%

        \[\leadsto \color{blue}{\left(b \cdot c + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      4. associate-*r*87.7%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      5. *-commutative87.7%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot x\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*87.7%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(\left(18 \cdot t\right) \cdot \left(y \cdot z\right)\right) \cdot x} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      7. associate-*r*87.7%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \cdot x + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. distribute-lft-neg-in87.7%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{\left(-4\right) \cdot \left(i \cdot x\right)}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. metadata-eval87.7%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{-4} \cdot \left(i \cdot x\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. associate-*r*87.7%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{\left(-4 \cdot i\right) \cdot x}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      11. distribute-rgt-in87.7%

        \[\leadsto \left(b \cdot c + \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      12. metadata-eval87.7%

        \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \color{blue}{\left(-4\right)} \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. cancel-sign-sub-inv87.7%

        \[\leadsto \left(b \cdot c + x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      14. +-commutative87.7%

        \[\leadsto \color{blue}{\left(x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) + b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
      15. fma-def87.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i, b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Simplified87.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(18, \left(y \cdot z\right) \cdot t, -4 \cdot i\right), b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
    5. Taylor expanded in x around 0 69.5%

      \[\leadsto \color{blue}{b \cdot c - 27 \cdot \left(j \cdot k\right)} \]

    if -9.5e7 < t < 6.2e33

    1. Initial program 84.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Taylor expanded in a around 0 76.1%

      \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. sub-neg76.1%

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(-4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      2. +-commutative76.1%

        \[\leadsto \left(\color{blue}{\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-+l+76.1%

        \[\leadsto \color{blue}{\left(b \cdot c + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      4. associate-*r*76.1%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      5. *-commutative76.1%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot t\right) \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot x\right)} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*82.6%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(\left(18 \cdot t\right) \cdot \left(y \cdot z\right)\right) \cdot x} + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      7. associate-*r*82.6%

        \[\leadsto \left(b \cdot c + \left(\color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \cdot x + \left(-4 \cdot \left(i \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. distribute-lft-neg-in82.6%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{\left(-4\right) \cdot \left(i \cdot x\right)}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. metadata-eval82.6%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{-4} \cdot \left(i \cdot x\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. associate-*r*82.6%

        \[\leadsto \left(b \cdot c + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \color{blue}{\left(-4 \cdot i\right) \cdot x}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      11. distribute-rgt-in82.6%

        \[\leadsto \left(b \cdot c + \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      12. metadata-eval82.6%

        \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \color{blue}{\left(-4\right)} \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. cancel-sign-sub-inv82.6%

        \[\leadsto \left(b \cdot c + x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      14. +-commutative82.6%

        \[\leadsto \color{blue}{\left(x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) + b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
      15. fma-def82.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i, b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Simplified82.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(18, \left(y \cdot z\right) \cdot t, -4 \cdot i\right), b \cdot c\right)} - \left(j \cdot 27\right) \cdot k \]
    5. Taylor expanded in i around inf 60.4%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. associate-*r*60.4%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative60.4%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    7. Simplified60.4%

      \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]

    if 6.2e33 < t

    1. Initial program 86.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified86.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)} \]
    3. Taylor expanded in x around inf 65.9%

      \[\leadsto \left(\color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    4. Step-by-step derivation
      1. *-commutative65.9%

        \[\leadsto \left(18 \cdot \color{blue}{\left(\left(x \cdot \left(y \cdot z\right)\right) \cdot t\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      2. associate-*l*65.9%

        \[\leadsto \left(18 \cdot \color{blue}{\left(x \cdot \left(\left(y \cdot z\right) \cdot t\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. associate-*l*59.2%

        \[\leadsto \left(18 \cdot \left(x \cdot \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)}\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Simplified59.2%

      \[\leadsto \left(\color{blue}{18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    6. Step-by-step derivation
      1. fma-def59.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(18, x \cdot \left(y \cdot \left(z \cdot t\right)\right), b \cdot c\right)} - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      2. associate-*r*65.9%

        \[\leadsto \mathsf{fma}\left(18, x \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)}, b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. *-commutative65.9%

        \[\leadsto \mathsf{fma}\left(18, \color{blue}{\left(\left(y \cdot z\right) \cdot t\right) \cdot x}, b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*r*59.2%

        \[\leadsto \mathsf{fma}\left(18, \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} \cdot x, b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    7. Applied egg-rr59.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(18, \left(y \cdot \left(z \cdot t\right)\right) \cdot x, b \cdot c\right)} - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    8. Taylor expanded in y around inf 44.0%

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutative44.0%

        \[\leadsto 18 \cdot \left(t \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot x\right)}\right) \]
      2. associate-*r*46.0%

        \[\leadsto 18 \cdot \color{blue}{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot x\right)} \]
      3. *-commutative46.0%

        \[\leadsto 18 \cdot \left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot x\right) \]
      4. associate-*r*46.0%

        \[\leadsto 18 \cdot \left(\color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} \cdot x\right) \]
      5. associate-*r*46.0%

        \[\leadsto \color{blue}{\left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) \cdot x} \]
      6. *-commutative46.0%

        \[\leadsto \color{blue}{\left(\left(y \cdot \left(z \cdot t\right)\right) \cdot 18\right)} \cdot x \]
      7. associate-*r*46.0%

        \[\leadsto \left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot 18\right) \cdot x \]
      8. associate-*l*46.0%

        \[\leadsto \color{blue}{\left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)} \cdot x \]
    10. Simplified46.0%

      \[\leadsto \color{blue}{\left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right) \cdot x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification57.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+102}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -95000000:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\ \end{array} \]

Alternative 26: 36.3% accurate, 2.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+148}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+77}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \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 (<= (* b c) -5e+148)
   (* b c)
   (if (<= (* b c) 1.15e+77) (* j (* k -27.0)) (* b c))))
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 ((b * c) <= -5e+148) {
		tmp = b * c;
	} else if ((b * c) <= 1.15e+77) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	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 ((b * c) <= (-5d+148)) then
        tmp = b * c
    else if ((b * c) <= 1.15d+77) then
        tmp = j * (k * (-27.0d0))
    else
        tmp = b * c
    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 ((b * c) <= -5e+148) {
		tmp = b * c;
	} else if ((b * c) <= 1.15e+77) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	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 (b * c) <= -5e+148:
		tmp = b * c
	elif (b * c) <= 1.15e+77:
		tmp = j * (k * -27.0)
	else:
		tmp = b * c
	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(b * c) <= -5e+148)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= 1.15e+77)
		tmp = Float64(j * Float64(k * -27.0));
	else
		tmp = Float64(b * c);
	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 ((b * c) <= -5e+148)
		tmp = b * c;
	elseif ((b * c) <= 1.15e+77)
		tmp = j * (k * -27.0);
	else
		tmp = b * c;
	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[(b * c), $MachinePrecision], -5e+148], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.15e+77], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+148}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+77}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -5.00000000000000024e148 or 1.14999999999999997e77 < (*.f64 b c)

    1. Initial program 80.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified82.0%

      \[\leadsto \color{blue}{\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. Taylor expanded in b around inf 55.5%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -5.00000000000000024e148 < (*.f64 b c) < 1.14999999999999997e77

    1. Initial program 87.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. Simplified88.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)} \]
    3. Taylor expanded in j around inf 27.5%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    4. Step-by-step derivation
      1. *-commutative27.5%

        \[\leadsto \color{blue}{\left(j \cdot k\right) \cdot -27} \]
      2. associate-*l*27.5%

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification35.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+148}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+77}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 27: 36.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}\;b \cdot c \leq -1.3 \cdot 10^{+146}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{+76}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \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 (<= (* b c) -1.3e+146)
   (* b c)
   (if (<= (* b c) 9.8e+76) (* k (* j -27.0)) (* b c))))
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 ((b * c) <= -1.3e+146) {
		tmp = b * c;
	} else if ((b * c) <= 9.8e+76) {
		tmp = k * (j * -27.0);
	} else {
		tmp = b * c;
	}
	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 ((b * c) <= (-1.3d+146)) then
        tmp = b * c
    else if ((b * c) <= 9.8d+76) then
        tmp = k * (j * (-27.0d0))
    else
        tmp = b * c
    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 ((b * c) <= -1.3e+146) {
		tmp = b * c;
	} else if ((b * c) <= 9.8e+76) {
		tmp = k * (j * -27.0);
	} else {
		tmp = b * c;
	}
	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 (b * c) <= -1.3e+146:
		tmp = b * c
	elif (b * c) <= 9.8e+76:
		tmp = k * (j * -27.0)
	else:
		tmp = b * c
	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(b * c) <= -1.3e+146)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= 9.8e+76)
		tmp = Float64(k * Float64(j * -27.0));
	else
		tmp = Float64(b * c);
	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 ((b * c) <= -1.3e+146)
		tmp = b * c;
	elseif ((b * c) <= 9.8e+76)
		tmp = k * (j * -27.0);
	else
		tmp = b * c;
	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[(b * c), $MachinePrecision], -1.3e+146], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.8e+76], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.3 \cdot 10^{+146}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{+76}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.30000000000000007e146 or 9.80000000000000053e76 < (*.f64 b c)

    1. Initial program 80.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified82.0%

      \[\leadsto \color{blue}{\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. Taylor expanded in b around inf 55.5%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -1.30000000000000007e146 < (*.f64 b c) < 9.80000000000000053e76

    1. Initial program 87.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. Simplified88.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)} \]
    3. Taylor expanded in j around inf 27.5%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    4. Step-by-step derivation
      1. *-commutative27.5%

        \[\leadsto \color{blue}{\left(j \cdot k\right) \cdot -27} \]
      2. *-commutative27.5%

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 \]
      3. associate-*l*27.5%

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
    5. Simplified27.5%

      \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification35.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.3 \cdot 10^{+146}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{+76}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 28: 32.9% accurate, 2.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ \begin{array}{l} \mathbf{if}\;k \leq -2.5 \cdot 10^{-96}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.8 \cdot 10^{-168}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 4.8 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;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 (<= k -2.5e-96)
   (* j (* k -27.0))
   (if (<= k 1.8e-168)
     (* b c)
     (if (<= k 4.8e+125) (* x (* 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 (k <= -2.5e-96) {
		tmp = j * (k * -27.0);
	} else if (k <= 1.8e-168) {
		tmp = b * c;
	} else if (k <= 4.8e+125) {
		tmp = x * (i * -4.0);
	} else {
		tmp = 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 (k <= (-2.5d-96)) then
        tmp = j * (k * (-27.0d0))
    else if (k <= 1.8d-168) then
        tmp = b * c
    else if (k <= 4.8d+125) then
        tmp = x * (i * (-4.0d0))
    else
        tmp = 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 (k <= -2.5e-96) {
		tmp = j * (k * -27.0);
	} else if (k <= 1.8e-168) {
		tmp = b * c;
	} else if (k <= 4.8e+125) {
		tmp = x * (i * -4.0);
	} else {
		tmp = 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 k <= -2.5e-96:
		tmp = j * (k * -27.0)
	elif k <= 1.8e-168:
		tmp = b * c
	elif k <= 4.8e+125:
		tmp = x * (i * -4.0)
	else:
		tmp = 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 (k <= -2.5e-96)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (k <= 1.8e-168)
		tmp = Float64(b * c);
	elseif (k <= 4.8e+125)
		tmp = Float64(x * Float64(i * -4.0));
	else
		tmp = 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 (k <= -2.5e-96)
		tmp = j * (k * -27.0);
	elseif (k <= 1.8e-168)
		tmp = b * c;
	elseif (k <= 4.8e+125)
		tmp = x * (i * -4.0);
	else
		tmp = 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[k, -2.5e-96], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.8e-168], N[(b * c), $MachinePrecision], If[LessEqual[k, 4.8e+125], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.5 \cdot 10^{-96}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;k \leq 1.8 \cdot 10^{-168}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;k \leq 4.8 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -2.49999999999999997e-96

    1. Initial program 87.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. 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)} \]
    3. Taylor expanded in j around inf 34.6%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    4. Step-by-step derivation
      1. *-commutative34.6%

        \[\leadsto \color{blue}{\left(j \cdot k\right) \cdot -27} \]
      2. associate-*l*34.6%

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
    5. Simplified34.6%

      \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]

    if -2.49999999999999997e-96 < k < 1.7999999999999999e-168

    1. Initial program 87.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified85.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)} \]
    3. Taylor expanded in b around inf 25.6%

      \[\leadsto \color{blue}{b \cdot c} \]

    if 1.7999999999999999e-168 < k < 4.7999999999999999e125

    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. Simplified84.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)} \]
    3. Taylor expanded in i around inf 31.5%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    4. Step-by-step derivation
      1. associate-*r*31.5%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} \]
      2. *-commutative31.5%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
    5. Simplified31.5%

      \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]

    if 4.7999999999999999e125 < k

    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. Simplified89.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)} \]
    3. Taylor expanded in j around inf 50.2%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    4. Step-by-step derivation
      1. *-commutative50.2%

        \[\leadsto \color{blue}{\left(j \cdot k\right) \cdot -27} \]
      2. *-commutative50.2%

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 \]
      3. associate-*l*50.2%

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
    5. Simplified50.2%

      \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification33.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -2.5 \cdot 10^{-96}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.8 \cdot 10^{-168}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 4.8 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 29: 23.1% accurate, 10.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ [j, k] = \mathsf{sort}([j, k])\\ \\ b \cdot c \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 (* b c))
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 b * c;
}
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 = b * c
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 b * c;
}
[y, z] = sort([y, z])
[j, k] = sort([j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	return b * c
y, z = sort([y, z])
j, k = sort([j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(b * c)
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 = b * c;
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[(b * c), $MachinePrecision]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
b \cdot c
\end{array}
Derivation
  1. Initial program 85.3%

    \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
  2. Simplified86.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)} \]
  3. Taylor expanded in b around inf 19.6%

    \[\leadsto \color{blue}{b \cdot c} \]
  4. Final simplification19.6%

    \[\leadsto b \cdot c \]

Developer target: 90.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\ t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
        (t_2
         (-
          (- (* (* 18.0 t) (* (* x y) z)) t_1)
          (- (* (* k j) 27.0) (* c b)))))
   (if (< t -1.6210815397541398e-69)
     t_2
     (if (< t 165.68027943805222)
       (+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((a * t) + (i * x)) * 4.0d0
    t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
    if (t < (-1.6210815397541398d-69)) then
        tmp = t_2
    else if (t < 165.68027943805222d0) then
        tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((a * t) + (i * x)) * 4.0
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b))
	tmp = 0
	if t < -1.6210815397541398e-69:
		tmp = t_2
	elif t < 165.68027943805222:
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0)
	t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b)))
	tmp = 0.0
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((a * t) + (i * x)) * 4.0;
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	tmp = 0.0;
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023290 
(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)))