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

Percentage Accurate: 85.1% → 89.2%
Time: 27.7s
Alternatives: 23
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 85.1% accurate, 1.0× speedup?

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

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

Alternative 1: 89.2% accurate, 0.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{-65} \lor \neg \left(t \leq 8 \cdot 10^{-156}\right):\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(t, \mathsf{fma}\left(x, \left(z \cdot 18\right) \cdot y, a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, t \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right), b \cdot c\right) + \left(j \cdot -27\right) \cdot k\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= t -2.9e-65) (not (<= t 8e-156)))
   (fma
    (* j -27.0)
    k
    (fma t (fma x (* (* z 18.0) y) (* a -4.0)) (fma b c (* -4.0 (* x i)))))
   (+ (fma x (fma -4.0 i (* t (* z (* 18.0 y)))) (* b c)) (* (* j -27.0) k))))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((t <= -2.9e-65) || !(t <= 8e-156)) {
		tmp = fma((j * -27.0), k, fma(t, fma(x, ((z * 18.0) * y), (a * -4.0)), fma(b, c, (-4.0 * (x * i)))));
	} else {
		tmp = fma(x, fma(-4.0, i, (t * (z * (18.0 * y)))), (b * c)) + ((j * -27.0) * k);
	}
	return tmp;
}
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((t <= -2.9e-65) || !(t <= 8e-156))
		tmp = fma(Float64(j * -27.0), k, fma(t, fma(x, Float64(Float64(z * 18.0) * y), Float64(a * -4.0)), fma(b, c, Float64(-4.0 * Float64(x * i)))));
	else
		tmp = Float64(fma(x, fma(-4.0, i, Float64(t * Float64(z * Float64(18.0 * y)))), Float64(b * c)) + Float64(Float64(j * -27.0) * k));
	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_] := If[Or[LessEqual[t, -2.9e-65], N[Not[LessEqual[t, 8e-156]], $MachinePrecision]], N[(N[(j * -27.0), $MachinePrecision] * k + N[(t * N[(x * N[(N[(z * 18.0), $MachinePrecision] * y), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-4.0 * i + N[(t * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + N[(N[(j * -27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-65} \lor \neg \left(t \leq 8 \cdot 10^{-156}\right):\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(t, \mathsf{fma}\left(x, \left(z \cdot 18\right) \cdot y, a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.8999999999999998e-65 or 8.00000000000000032e-156 < t

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if -2.8999999999999998e-65 < t < 8.00000000000000032e-156

    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. Simplified76.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 a around 0 78.1%

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

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

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

Alternative 2: 89.1% accurate, 0.1× speedup?

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

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


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

    1. Initial program 95.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 \]

    if 1.0000000000000001e299 < (-.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 59.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. Simplified69.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 a around 0 63.4%

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

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

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

Alternative 3: 86.8% accurate, 0.2× speedup?

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

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


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

    1. Initial program 95.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 \]

    if 1.0000000000000001e299 < (-.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 59.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. Simplified69.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 x around -inf 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.4% accurate, 0.2× speedup?

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

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


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

    1. Initial program 93.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*93.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+93.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--93.2%

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

    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. Simplified30.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 z around inf 40.5%

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

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

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

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

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

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

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

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

Alternative 5: 89.1% accurate, 0.5× speedup?

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

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


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

    1. Initial program 93.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*93.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+93.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--93.2%

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

    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--13.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*13.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*13.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. Simplified13.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 i around 0 33.3%

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

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

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

Alternative 6: 55.3% accurate, 1.0× speedup?

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

\mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{-168}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \cdot c \leq 1.85 \cdot 10^{+40}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -8.0000000000000002e30

    1. Initial program 75.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*75.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+75.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--75.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*74.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*74.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. Simplified74.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 t around 0 71.3%

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

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

    if -8.0000000000000002e30 < (*.f64 b c) < -3.3000000000000001e-168 or 5.20000000000000025e-282 < (*.f64 b c) < 1.85e40

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

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

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

    if -3.3000000000000001e-168 < (*.f64 b c) < 5.20000000000000025e-282

    1. Initial program 87.7%

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

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

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

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

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

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

    if 1.85e40 < (*.f64 b c)

    1. Initial program 84.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8 \cdot 10^{+30}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{-168}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 5.2 \cdot 10^{-282}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.85 \cdot 10^{+40}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 7: 55.5% accurate, 1.0× speedup?

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

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

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

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

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


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

    1. Initial program 75.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*75.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+75.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--75.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*74.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*74.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. Simplified74.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 t around 0 71.3%

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

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

    if -5.89999999999999965e32 < (*.f64 b c) < -1.8500000000000001e-167

    1. Initial program 83.0%

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

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

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

        \[\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-udef46.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. *-commutative46.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) \]
    5. Applied egg-rr46.8%

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

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

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

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

      \[\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 -1.8500000000000001e-167 < (*.f64 b c) < 2.74999999999999976e-283

    1. Initial program 87.7%

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

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

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

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

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

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

    if 2.74999999999999976e-283 < (*.f64 b c) < 1.05000000000000005e40

    1. Initial program 84.0%

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

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

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

    if 1.05000000000000005e40 < (*.f64 b c)

    1. Initial program 84.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.9 \cdot 10^{+32}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.85 \cdot 10^{-167}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 2.75 \cdot 10^{-283}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.05 \cdot 10^{+40}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 8: 55.3% accurate, 1.0× speedup?

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

\mathbf{elif}\;b \cdot c \leq -2.7 \cdot 10^{-166}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \cdot c \leq 2.85 \cdot 10^{+107}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -4.2000000000000001e32

    1. Initial program 75.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*75.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+75.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--75.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*74.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*74.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. Simplified74.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 t around 0 71.3%

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

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

    if -4.2000000000000001e32 < (*.f64 b c) < -2.70000000000000006e-166 or 4.3000000000000002e-308 < (*.f64 b c) < 2.84999999999999986e107

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000006e-166 < (*.f64 b c) < 4.3000000000000002e-308

    1. Initial program 88.8%

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

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

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

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

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

    if 2.84999999999999986e107 < (*.f64 b c)

    1. Initial program 85.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -4.2 \cdot 10^{+32}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -2.7 \cdot 10^{-166}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(x \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{-308}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 2.85 \cdot 10^{+107}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(x \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(j \cdot -27\right) \cdot k\\ \end{array} \]

Alternative 9: 55.5% accurate, 1.0× speedup?

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

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

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

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

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


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

    1. Initial program 75.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*75.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+75.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--75.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*74.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*74.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. Simplified74.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 t around 0 71.3%

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

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

    if -5.2000000000000004e32 < (*.f64 b c) < -1.6999999999999999e-166

    1. Initial program 83.0%

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

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

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

        \[\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-udef46.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. *-commutative46.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) \]
    5. Applied egg-rr46.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6999999999999999e-166 < (*.f64 b c) < 1.2599999999999999e-307

    1. Initial program 88.8%

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

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

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

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

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

    if 1.2599999999999999e-307 < (*.f64 b c) < 1.7499999999999999e107

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7499999999999999e107 < (*.f64 b c)

    1. Initial program 85.2%

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

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

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

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

Alternative 10: 55.4% accurate, 1.0× speedup?

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

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

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

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

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


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

    1. Initial program 75.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*75.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+75.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--75.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*74.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*74.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. Simplified74.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 t around 0 71.3%

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

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

    if -6.19999999999999986e32 < (*.f64 b c) < -3.0000000000000003e-166

    1. Initial program 83.0%

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

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

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

        \[\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-udef46.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. *-commutative46.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) \]
    5. Applied egg-rr46.8%

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

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

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

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

      \[\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) \]
    8. Taylor expanded in t around 0 62.7%

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

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

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

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

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

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

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

    if -3.0000000000000003e-166 < (*.f64 b c) < 3.2000000000000001e-308

    1. Initial program 88.8%

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

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

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

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

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

    if 3.2000000000000001e-308 < (*.f64 b c) < 4.2000000000000001e106

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000001e106 < (*.f64 b c)

    1. Initial program 85.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+32}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -3 \cdot 10^{-166}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(\left(x \cdot z\right) \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{-308}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 4.2 \cdot 10^{+106}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(x \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(j \cdot -27\right) \cdot k\\ \end{array} \]

Alternative 11: 55.4% accurate, 1.0× speedup?

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

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

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

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

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


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

    1. Initial program 75.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*75.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+75.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--75.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*74.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*74.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. Simplified74.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 t around 0 71.3%

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

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

    if -1.00000000000000005e32 < (*.f64 b c) < -1.6000000000000001e-167

    1. Initial program 83.0%

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

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

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

        \[\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-udef46.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. *-commutative46.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) \]
    5. Applied egg-rr46.8%

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

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

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

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

      \[\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) \]
    8. Taylor expanded in t around 0 62.7%

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

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

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

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

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

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

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

    if -1.6000000000000001e-167 < (*.f64 b c) < 8.5000000000000002e-306

    1. Initial program 88.8%

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

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

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

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

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

    if 8.5000000000000002e-306 < (*.f64 b c) < 1.06e107

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.06e107 < (*.f64 b c)

    1. Initial program 85.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+32}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.6 \cdot 10^{-167}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(\left(x \cdot z\right) \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 8.5 \cdot 10^{-306}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.06 \cdot 10^{+107}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(t \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(j \cdot -27\right) \cdot k\\ \end{array} \]

Alternative 12: 65.1% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := \left(j \cdot -27\right) \cdot k\\ t_2 := t_1 + x \cdot \left(-4 \cdot i\right)\\ \mathbf{if}\;x \leq -1.45 \cdot 10^{+252}:\\ \;\;\;\;t_1 + \left(t \cdot 18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+214}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{+191}:\\ \;\;\;\;t_1 + 18 \cdot \left(x \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{+80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+56}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+232}:\\ \;\;\;\;t_1 + x \cdot \left(t \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\ \mathbf{elif}\;x \leq 4.9 \cdot 10^{+287}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\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 (* (* j -27.0) k)) (t_2 (+ t_1 (* x (* -4.0 i)))))
   (if (<= x -1.45e+252)
     (+ t_1 (* (* t 18.0) (* z (* x y))))
     (if (<= x -1.4e+214)
       (- (* b c) (* 4.0 (* x i)))
       (if (<= x -2.9e+191)
         (+ t_1 (* 18.0 (* x (* t (* z y)))))
         (if (<= x -8.5e+80)
           t_2
           (if (<= x 1.1e+56)
             (- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0)))
             (if (<= x 1.7e+232)
               (+ t_1 (* x (* t (* z (* 18.0 y)))))
               (if (<= x 4.9e+287)
                 t_2
                 (+ t_1 (* 18.0 (* t (* x (* z y))))))))))))))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * -27.0) * k;
	double t_2 = t_1 + (x * (-4.0 * i));
	double tmp;
	if (x <= -1.45e+252) {
		tmp = t_1 + ((t * 18.0) * (z * (x * y)));
	} else if (x <= -1.4e+214) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (x <= -2.9e+191) {
		tmp = t_1 + (18.0 * (x * (t * (z * y))));
	} else if (x <= -8.5e+80) {
		tmp = t_2;
	} else if (x <= 1.1e+56) {
		tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
	} else if (x <= 1.7e+232) {
		tmp = t_1 + (x * (t * (z * (18.0 * y))));
	} else if (x <= 4.9e+287) {
		tmp = t_2;
	} else {
		tmp = t_1 + (18.0 * (t * (x * (z * y))));
	}
	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 = t_1 + (x * ((-4.0d0) * i))
    if (x <= (-1.45d+252)) then
        tmp = t_1 + ((t * 18.0d0) * (z * (x * y)))
    else if (x <= (-1.4d+214)) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else if (x <= (-2.9d+191)) then
        tmp = t_1 + (18.0d0 * (x * (t * (z * y))))
    else if (x <= (-8.5d+80)) then
        tmp = t_2
    else if (x <= 1.1d+56) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (j * 27.0d0))
    else if (x <= 1.7d+232) then
        tmp = t_1 + (x * (t * (z * (18.0d0 * y))))
    else if (x <= 4.9d+287) then
        tmp = t_2
    else
        tmp = t_1 + (18.0d0 * (t * (x * (z * y))))
    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 = t_1 + (x * (-4.0 * i));
	double tmp;
	if (x <= -1.45e+252) {
		tmp = t_1 + ((t * 18.0) * (z * (x * y)));
	} else if (x <= -1.4e+214) {
		tmp = (b * c) - (4.0 * (x * i));
	} else if (x <= -2.9e+191) {
		tmp = t_1 + (18.0 * (x * (t * (z * y))));
	} else if (x <= -8.5e+80) {
		tmp = t_2;
	} else if (x <= 1.1e+56) {
		tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
	} else if (x <= 1.7e+232) {
		tmp = t_1 + (x * (t * (z * (18.0 * y))));
	} else if (x <= 4.9e+287) {
		tmp = t_2;
	} else {
		tmp = t_1 + (18.0 * (t * (x * (z * y))));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (j * -27.0) * k
	t_2 = t_1 + (x * (-4.0 * i))
	tmp = 0
	if x <= -1.45e+252:
		tmp = t_1 + ((t * 18.0) * (z * (x * y)))
	elif x <= -1.4e+214:
		tmp = (b * c) - (4.0 * (x * i))
	elif x <= -2.9e+191:
		tmp = t_1 + (18.0 * (x * (t * (z * y))))
	elif x <= -8.5e+80:
		tmp = t_2
	elif x <= 1.1e+56:
		tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0))
	elif x <= 1.7e+232:
		tmp = t_1 + (x * (t * (z * (18.0 * y))))
	elif x <= 4.9e+287:
		tmp = t_2
	else:
		tmp = t_1 + (18.0 * (t * (x * (z * y))))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * -27.0) * k)
	t_2 = Float64(t_1 + Float64(x * Float64(-4.0 * i)))
	tmp = 0.0
	if (x <= -1.45e+252)
		tmp = Float64(t_1 + Float64(Float64(t * 18.0) * Float64(z * Float64(x * y))));
	elseif (x <= -1.4e+214)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	elseif (x <= -2.9e+191)
		tmp = Float64(t_1 + Float64(18.0 * Float64(x * Float64(t * Float64(z * y)))));
	elseif (x <= -8.5e+80)
		tmp = t_2;
	elseif (x <= 1.1e+56)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0)));
	elseif (x <= 1.7e+232)
		tmp = Float64(t_1 + Float64(x * Float64(t * Float64(z * Float64(18.0 * y)))));
	elseif (x <= 4.9e+287)
		tmp = t_2;
	else
		tmp = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(z * y)))));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (j * -27.0) * k;
	t_2 = t_1 + (x * (-4.0 * i));
	tmp = 0.0;
	if (x <= -1.45e+252)
		tmp = t_1 + ((t * 18.0) * (z * (x * y)));
	elseif (x <= -1.4e+214)
		tmp = (b * c) - (4.0 * (x * i));
	elseif (x <= -2.9e+191)
		tmp = t_1 + (18.0 * (x * (t * (z * y))));
	elseif (x <= -8.5e+80)
		tmp = t_2;
	elseif (x <= 1.1e+56)
		tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
	elseif (x <= 1.7e+232)
		tmp = t_1 + (x * (t * (z * (18.0 * y))));
	elseif (x <= 4.9e+287)
		tmp = t_2;
	else
		tmp = t_1 + (18.0 * (t * (x * (z * y))));
	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[(j * -27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e+252], N[(t$95$1 + N[(N[(t * 18.0), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.4e+214], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9e+191], N[(t$95$1 + N[(18.0 * N[(x * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8.5e+80], t$95$2, If[LessEqual[x, 1.1e+56], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+232], N[(t$95$1 + N[(x * N[(t * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.9e+287], t$95$2, N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot -27\right) \cdot k\\
t_2 := t_1 + x \cdot \left(-4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+252}:\\
\;\;\;\;t_1 + \left(t \cdot 18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\

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

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

\mathbf{elif}\;x \leq -8.5 \cdot 10^{+80}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;x \leq 4.9 \cdot 10^{+287}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if x < -1.44999999999999998e252

    1. Initial program 77.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. Simplified77.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 z around inf 73.3%

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

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

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

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

    if -1.44999999999999998e252 < x < -1.3999999999999999e214

    1. Initial program 62.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*62.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+62.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--62.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*69.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*69.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. Simplified69.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 t around 0 62.9%

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

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

    if -1.3999999999999999e214 < x < -2.9000000000000001e191

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9000000000000001e191 < x < -8.50000000000000007e80 or 1.6999999999999999e232 < x < 4.89999999999999993e287

    1. Initial program 79.1%

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

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

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

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

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

    if -8.50000000000000007e80 < x < 1.10000000000000008e56

    1. Initial program 90.6%

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

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

    if 1.10000000000000008e56 < x < 1.6999999999999999e232

    1. Initial program 59.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. Simplified69.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 z around inf 53.4%

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

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

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

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

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

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

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

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

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

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

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

    if 4.89999999999999993e287 < x

    1. Initial program 75.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified75.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 z around inf 63.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) \]
  3. Recombined 7 regimes into one program.
  4. Final simplification73.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+252}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + \left(t \cdot 18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+214}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{+191}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(x \cdot \left(t \cdot \left(z \cdot y\right)\right)\right)\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{+80}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+56}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+232}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(t \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\ \mathbf{elif}\;x \leq 4.9 \cdot 10^{+287}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + x \cdot \left(-4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot -27\right) \cdot k + 18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\ \end{array} \]

Alternative 13: 81.7% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.50000000000000008e-72 or 5.3999999999999999e-96 < t

    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.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+84.3%

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + \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.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*85.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*85.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. Simplified85.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 i around 0 78.3%

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

    if -8.50000000000000008e-72 < t < 5.3999999999999999e-96

    1. Initial program 78.7%

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

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

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

Alternative 14: 64.4% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.8e-112

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

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

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

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

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

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

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

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

        \[\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*52.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. Simplified52.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) \]
    8. Taylor expanded in t around 0 53.5%

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

        \[\leadsto 18 \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(z \cdot y\right)}\right)\right) + k \cdot \left(j \cdot -27\right) \]
      2. associate-*r*52.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) \]
      3. associate-*l*57.3%

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

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

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

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

    if -1.8e-112 < z < 4.29999999999999998e189

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

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

    if 4.29999999999999998e189 < z < 2.24999999999999989e240

    1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.24999999999999989e240 < z

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

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

      \[\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-u35.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-udef35.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. *-commutative35.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) \]
    5. Applied egg-rr35.8%

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

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

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

      \[\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) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification64.0%

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

Alternative 15: 74.8% accurate, 1.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.2599999999999999e-59 or 3.59999999999999966e-86 < t

    1. Initial program 84.0%

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

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

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

    if -1.2599999999999999e-59 < t < 3.59999999999999966e-86

    1. Initial program 79.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*79.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+79.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--79.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*81.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*81.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. Simplified81.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 82.0%

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

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

Alternative 16: 54.8% accurate, 1.6× speedup?

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

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

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


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

    1. Initial program 75.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*75.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+75.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--75.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*74.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*74.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. Simplified74.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 t around 0 68.9%

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

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

    if -5.8e11 < (*.f64 b c) < 4.0999999999999998e75

    1. Initial program 85.1%

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

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

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

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

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

    if 4.0999999999999998e75 < (*.f64 b c)

    1. Initial program 84.7%

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

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

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

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

Alternative 17: 35.5% accurate, 1.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.1 \cdot 10^{+120}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-130}:\\ \;\;\;\;x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 2.02 \cdot 10^{+49}:\\ \;\;\;\;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) -1.1e+120)
   (* b c)
   (if (<= (* b c) 3.6e-130)
     (* x (* -4.0 i))
     (if (<= (* b c) 2.02e+49) (* 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) <= -1.1e+120) {
		tmp = b * c;
	} else if ((b * c) <= 3.6e-130) {
		tmp = x * (-4.0 * i);
	} else if ((b * c) <= 2.02e+49) {
		tmp = j * (-27.0 * k);
	} 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) :: tmp
    if ((b * c) <= (-1.1d+120)) then
        tmp = b * c
    else if ((b * c) <= 3.6d-130) then
        tmp = x * ((-4.0d0) * i)
    else if ((b * c) <= 2.02d+49) then
        tmp = j * ((-27.0d0) * k)
    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 tmp;
	if ((b * c) <= -1.1e+120) {
		tmp = b * c;
	} else if ((b * c) <= 3.6e-130) {
		tmp = x * (-4.0 * i);
	} else if ((b * c) <= 2.02e+49) {
		tmp = 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) <= -1.1e+120:
		tmp = b * c
	elif (b * c) <= 3.6e-130:
		tmp = x * (-4.0 * i)
	elif (b * c) <= 2.02e+49:
		tmp = 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) <= -1.1e+120)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= 3.6e-130)
		tmp = Float64(x * Float64(-4.0 * i));
	elseif (Float64(b * c) <= 2.02e+49)
		tmp = 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) <= -1.1e+120)
		tmp = b * c;
	elseif ((b * c) <= 3.6e-130)
		tmp = x * (-4.0 * i);
	elseif ((b * c) <= 2.02e+49)
		tmp = 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], -1.1e+120], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.6e-130], N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.02e+49], N[(j * N[(-27.0 * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.1 \cdot 10^{+120}:\\
\;\;\;\;b \cdot c\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.1000000000000001e120 or 2.02000000000000004e49 < (*.f64 b c)

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

    if -1.1000000000000001e120 < (*.f64 b c) < 3.6000000000000001e-130

    1. Initial program 83.1%

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot i\right) \cdot x \]
      3. distribute-lft-neg-in34.2%

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

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
      5. distribute-lft-neg-in34.2%

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

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

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

    if 3.6000000000000001e-130 < (*.f64 b c) < 2.02000000000000004e49

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.1 \cdot 10^{+120}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-130}:\\ \;\;\;\;x \cdot \left(-4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 2.02 \cdot 10^{+49}:\\ \;\;\;\;j \cdot \left(-27 \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 18: 48.9% accurate, 2.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.7999999999999998e110 or 5.99999999999999967e33 < a

    1. Initial program 76.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. Simplified85.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 56.3%

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

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

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

    if -1.7999999999999998e110 < a < 5.99999999999999967e33

    1. Initial program 85.3%

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

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

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

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

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

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

Alternative 19: 37.3% accurate, 2.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -24000000000 \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+49}\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) -24000000000.0) (not (<= (* b c) 2e+49)))
   (* 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) <= -24000000000.0) || !((b * c) <= 2e+49)) {
		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) <= (-24000000000.0d0)) .or. (.not. ((b * c) <= 2d+49))) 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) <= -24000000000.0) || !((b * c) <= 2e+49)) {
		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) <= -24000000000.0) or not ((b * c) <= 2e+49):
		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) <= -24000000000.0) || !(Float64(b * c) <= 2e+49))
		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) <= -24000000000.0) || ~(((b * c) <= 2e+49)))
		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], -24000000000.0], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2e+49]], $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 -24000000000 \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+49}\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) < -2.4e10 or 1.99999999999999989e49 < (*.f64 b c)

    1. Initial program 78.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*78.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+78.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--79.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*78.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*78.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. Simplified78.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 i around 0 72.0%

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

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

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

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

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

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

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

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

    if -2.4e10 < (*.f64 b c) < 1.99999999999999989e49

    1. Initial program 85.6%

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

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

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

Alternative 20: 47.8% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.4999999999999998e80 or 4.50000000000000042e174 < x

    1. Initial program 73.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*73.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+73.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--74.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*76.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*76.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. Simplified76.7%

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

      \[\leadsto \color{blue}{\left(b \cdot c - 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. associate-*r*49.8%

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

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot i\right) \cdot x \]
      3. distribute-lft-neg-in49.8%

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

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
      5. distribute-lft-neg-in49.8%

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

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

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

    if -6.4999999999999998e80 < x < 4.50000000000000042e174

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{+80} \lor \neg \left(x \leq 4.5 \cdot 10^{+174}\right):\\ \;\;\;\;x \cdot \left(-4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(j \cdot -27\right) \cdot k\\ \end{array} \]

Alternative 21: 50.9% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -2.5999999999999997e33 or 6.99999999999999973e-81 < i

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

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

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

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

    if -2.5999999999999997e33 < i < 6.99999999999999973e-81

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2.6 \cdot 10^{+33} \lor \neg \left(i \leq 7 \cdot 10^{-81}\right):\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(j \cdot -27\right) \cdot k\\ \end{array} \]

Alternative 22: 50.9% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -4.60000000000000021e33 or 3.50000000000000015e-80 < i

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

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

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

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

    if -4.60000000000000021e33 < i < 3.50000000000000015e-80

    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.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+83.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--85.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 i around 0 84.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -4.6 \cdot 10^{+33} \lor \neg \left(i \leq 3.5 \cdot 10^{-80}\right):\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]

Alternative 23: 23.7% 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 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.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+82.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--83.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*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 i around 0 71.3%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{b \cdot c} \]
  8. Final simplification22.8%

    \[\leadsto b \cdot c \]

Developer target: 88.8% 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 2023336 
(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)))