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

Percentage Accurate: 84.8% → 92.7%
Time: 29.3s
Alternatives: 21
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 84.8% 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: 92.7% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 95.2%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 32.2%

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 60.0%

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

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

Alternative 2: 91.7% accurate, 0.5× speedup?

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 32.2%

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 60.0%

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

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

Alternative 3: 86.7% accurate, 0.9× speedup?

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

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


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

    1. Initial program 85.0%

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 b c)

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 79.5% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25000000000000002e115

    1. Initial program 74.9%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Step-by-step derivation
      1. expm1-log1p-u44.8%

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

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

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

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

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

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

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

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

    if -1.25000000000000002e115 < y

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

Alternative 5: 50.6% accurate, 1.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if c < -1.5499999999999999e-27

    1. Initial program 81.2%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 63.5%

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in t around 0 53.2%

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

    if -1.5499999999999999e-27 < c < 9.5000000000000005e-5

    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. Simplified93.2%

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

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

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

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

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

    if 9.5000000000000005e-5 < c < 6.39999999999999985e103

    1. Initial program 85.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 62.0%

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

    if 6.39999999999999985e103 < c < 3.99999999999999993e109

    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. Simplified89.4%

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

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

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

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

    if 3.99999999999999993e109 < c < 2.50000000000000009e200

    1. Initial program 90.3%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 67.0%

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

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

    if 2.50000000000000009e200 < c

    1. Initial program 66.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. Simplified81.6%

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

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

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

Alternative 6: 50.6% accurate, 1.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if c < -4.10000000000000036e-15

    1. Initial program 81.2%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 63.5%

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in t around 0 53.2%

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

    if -4.10000000000000036e-15 < c < 1.9000000000000001e-5

    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. Simplified93.2%

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

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

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

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

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

    if 1.9000000000000001e-5 < c < 1.0200000000000001e93

    1. Initial program 83.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 64.1%

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

    if 1.0200000000000001e93 < c < 2.3e107

    1. Initial program 99.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. Simplified99.2%

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

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

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

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

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

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

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

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

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

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

    if 2.3e107 < c < 1.00000000000000004e201

    1. Initial program 90.3%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 67.0%

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

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

    if 1.00000000000000004e201 < c

    1. Initial program 66.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. Simplified81.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4.1 \cdot 10^{-15}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq 1.9 \cdot 10^{-5}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;c \leq 1.02 \cdot 10^{+93}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;c \leq 2.3 \cdot 10^{+107}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right) + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;c \leq 10^{+201}:\\ \;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 7: 64.2% accurate, 1.3× speedup?

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

\mathbf{elif}\;y \leq -3.1 \cdot 10^{-137} \lor \neg \left(y \leq -1.05 \cdot 10^{-237}\right) \land y \leq -6 \cdot 10^{-304}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\

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


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

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

    if -1.7e130 < y < -3.09999999999999978e-137 or -1.0500000000000001e-237 < y < -6.0000000000000002e-304

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

    if -3.09999999999999978e-137 < y < -1.0500000000000001e-237 or -6.0000000000000002e-304 < y

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+130}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-137} \lor \neg \left(y \leq -1.05 \cdot 10^{-237}\right) \land y \leq -6 \cdot 10^{-304}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\ \end{array} \]

Alternative 8: 62.1% accurate, 1.3× speedup?

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

\mathbf{elif}\;x \leq -9 \cdot 10^{-52}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 2.45 \cdot 10^{+106}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.9999999999999998e197 or 2.44999999999999999e106 < x

    1. Initial program 73.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 76.3%

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

    if -3.9999999999999998e197 < x < -9.0000000000000001e-52 or 1.16e-116 < x < 2.44999999999999999e106

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

    if -9.0000000000000001e-52 < x < 1.16e-116

    1. Initial program 93.8%

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

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

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

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

Alternative 9: 76.9% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.4999999999999995e153

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

    if -9.4999999999999995e153 < y

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

Alternative 10: 49.0% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;x \leq -1.6 \cdot 10^{-42}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 3.9 \cdot 10^{+108} \lor \neg \left(x \leq 9.6 \cdot 10^{+168}\right):\\
\;\;\;\;t_1\\

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


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

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000022e247 < x < -4.79999999999999989e148

    1. Initial program 82.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 69.4%

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999989e148 < x < -1.60000000000000012e-42 or 2.00000000000000008e-108 < x < 3.89999999999999985e108 or 9.60000000000000037e168 < x

    1. Initial program 81.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in t around 0 54.6%

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

    if -1.60000000000000012e-42 < x < 2.00000000000000008e-108

    1. Initial program 93.8%

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

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

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

    if 3.89999999999999985e108 < x < 9.60000000000000037e168

    1. Initial program 76.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 70.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{+247}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{+148}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(18 \cdot \left(x \cdot z\right)\right)\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-42}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-108}:\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+108} \lor \neg \left(x \leq 9.6 \cdot 10^{+168}\right):\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 11: 36.1% accurate, 1.5× speedup?

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

\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-182}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 4.1 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -5.5000000000000003e73 or 4.1e52 < (*.f64 b c)

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

    if -5.5000000000000003e73 < (*.f64 b c) < -1e-182 or 7.50000000000000005e-256 < (*.f64 b c) < 4.1e52

    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. Simplified91.5%

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

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

    if -1e-182 < (*.f64 b c) < 7.50000000000000005e-256

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-182}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{-256}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 4.1 \cdot 10^{+52}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 12: 36.1% accurate, 1.5× speedup?

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

\mathbf{elif}\;b \cdot c \leq -1.8 \cdot 10^{-182}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 9.2 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -3.50000000000000002e73 or 9.1999999999999999e52 < (*.f64 b c)

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

    if -3.50000000000000002e73 < (*.f64 b c) < -1.79999999999999988e-182 or 7.80000000000000008e-258 < (*.f64 b c) < 9.1999999999999999e52

    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. Simplified91.5%

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

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

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

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

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

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

    if -1.79999999999999988e-182 < (*.f64 b c) < 7.80000000000000008e-258

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.5 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.8 \cdot 10^{-182}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 7.8 \cdot 10^{-258}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 9.2 \cdot 10^{+52}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 13: 42.2% accurate, 1.6× speedup?

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

\mathbf{elif}\;y \leq -2.15 \cdot 10^{+98} \lor \neg \left(y \leq -8.5 \cdot 10^{-14}\right) \land \left(y \leq -2.4 \cdot 10^{-249} \lor \neg \left(y \leq -1.12 \cdot 10^{-304}\right)\right):\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\

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


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

    1. Initial program 78.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 65.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.7e187 < y < -2.1500000000000001e98 or -8.50000000000000038e-14 < y < -2.40000000000000013e-249 or -1.12000000000000006e-304 < y

    1. Initial program 86.0%

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

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

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

    if -2.1500000000000001e98 < y < -8.50000000000000038e-14 or -2.40000000000000013e-249 < y < -1.12000000000000006e-304

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+187}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(18 \cdot \left(x \cdot z\right)\right)\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{+98} \lor \neg \left(y \leq -8.5 \cdot 10^{-14}\right) \land \left(y \leq -2.4 \cdot 10^{-249} \lor \neg \left(y \leq -1.12 \cdot 10^{-304}\right)\right):\\ \;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(t \cdot -4\right)\\ \end{array} \]

Alternative 14: 50.2% accurate, 1.6× speedup?

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

\mathbf{elif}\;c \leq 0.02:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -2.54999999999999991e-18

    1. Initial program 81.2%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 63.5%

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in t around 0 53.2%

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

    if -2.54999999999999991e-18 < c < 0.0200000000000000004

    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. Simplified93.2%

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

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

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

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

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

    if 0.0200000000000000004 < c < 1.94999999999999985e157

    1. Initial program 82.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 64.0%

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

    if 1.94999999999999985e157 < c

    1. Initial program 76.8%

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

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

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

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

Alternative 15: 66.4% accurate, 1.6× speedup?

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

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+101}:\\
\;\;\;\;\left(b \cdot c - t_2\right) - j \cdot \left(27 \cdot k\right)\\

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

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


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

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

    if -155000 < t < 1.95e101

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

    if 1.95e101 < t < 7.50000000000000055e209

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

    if 7.50000000000000055e209 < t

    1. Initial program 91.5%

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

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

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

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

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

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

Alternative 16: 54.3% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.04999999999999993e89

    1. Initial program 77.3%

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

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

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

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

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

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 72.3%

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in t around 0 69.3%

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

    if -1.04999999999999993e89 < (*.f64 b c) < 2e9

    1. Initial program 87.9%

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

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

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

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

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

    if 2e9 < (*.f64 b c)

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

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

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

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

Alternative 17: 32.1% accurate, 2.0× speedup?

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

\mathbf{elif}\;i \leq -2.2 \cdot 10^{-277}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;i \leq 2.4 \cdot 10^{-166}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;i \leq 1.15 \cdot 10^{+148}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -5.29999999999999991e45 or 1.15e148 < i

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.29999999999999991e45 < i < -2.19999999999999996e-277 or 1.20000000000000007e-261 < i < 2.3999999999999999e-166

    1. Initial program 81.7%

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

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

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

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

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

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

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

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

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

    if -2.19999999999999996e-277 < i < 1.20000000000000007e-261

    1. Initial program 94.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in x around inf 36.2%

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

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

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

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

    if 2.3999999999999999e-166 < i < 1.15e148

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -5.3 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;i \leq -2.2 \cdot 10^{-277}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;i \leq 1.2 \cdot 10^{-261}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \mathbf{elif}\;i \leq 2.4 \cdot 10^{-166}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;i \leq 1.15 \cdot 10^{+148}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]

Alternative 18: 50.3% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.52000000000000003e-31

    1. Initial program 81.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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)} \]
    6. Taylor expanded in t around 0 53.2%

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

    if -1.52000000000000003e-31 < c < 4.2000000000000002e96

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

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

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

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

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

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

    if 4.2000000000000002e96 < c

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

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

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

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

Alternative 19: 37.1% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -3.5999999999999999e73 or 1.2e53 < (*.f64 b c)

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

    if -3.5999999999999999e73 < (*.f64 b c) < 1.2e53

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.6 \cdot 10^{+73} \lor \neg \left(b \cdot c \leq 1.2 \cdot 10^{+53}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 20: 31.9% accurate, 2.8× speedup?

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

\mathbf{elif}\;i \leq 7.5 \cdot 10^{-163}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;i \leq 3.2 \cdot 10^{+147}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -1.9000000000000001e31 or 3.19999999999999979e147 < i

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e31 < i < 7.49999999999999996e-163

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

    if 7.49999999999999996e-163 < i < 3.19999999999999979e147

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.9 \cdot 10^{+31}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;i \leq 7.5 \cdot 10^{-163}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;i \leq 3.2 \cdot 10^{+147}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]

Alternative 21: 24.0% accurate, 10.3× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{b \cdot c} \]
  6. Final simplification23.7%

    \[\leadsto b \cdot c \]

Developer target: 89.2% 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 2023311 
(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)))