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

Percentage Accurate: 85.4% → 91.3%
Time: 33.4s
Alternatives: 24
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 24 alternatives:

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

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

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


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

    1. Initial program 94.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. Simplified94.9%

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

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

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

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

        \[\leadsto \left(k \cdot -27\right) \cdot j + \mathsf{fma}\left(t, \mathsf{fma}\left(x, \color{blue}{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) \]
      5. fma-def95.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, \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)} \]
      6. *-commutative95.8%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \mathsf{fma}\left(x, \color{blue}{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) \]
      10. associate-*r*95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \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) \]
      11. associate-*r*95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \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-rr95.7%

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

    1. Initial program 0.0%

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

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

      \[\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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+30.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.7% accurate, 0.1× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.7% accurate, 0.2× speedup?

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

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


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

    1. Initial program 96.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*96.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+96.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--96.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*96.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*96.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. Simplified96.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)} \]

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.7% accurate, 0.5× speedup?

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

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


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

    1. Initial program 96.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*96.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+96.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--96.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*96.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*96.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. Simplified96.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)} \]

    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*3.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+3.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--26.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*30.0%

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

      \[\leadsto \color{blue}{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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.3%

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

Alternative 5: 34.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \cdot c \leq -4.5 \cdot 10^{-71}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-318}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{-83}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 b c) < -5.60000000000000037e46 or 6.9999999999999998e227 < (*.f64 b c)

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

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

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

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

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

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

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

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

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

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

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

    if -5.60000000000000037e46 < (*.f64 b c) < -8.00000000000000029e-10 or -4.5000000000000002e-71 < (*.f64 b c) < -8.4999999999999996e-174 or -3.8999999999999999e-265 < (*.f64 b c) < 2.0000024e-318 or 2.0999999999999999e-83 < (*.f64 b c) < 2.1e21

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \left(x \cdot i\right) \cdot -4\right)} + j \cdot \left(k \cdot -27\right) \]
      5. associate-*l*60.2%

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

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

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

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

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

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

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

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

    if -8.00000000000000029e-10 < (*.f64 b c) < -4.5000000000000002e-71 or 2.90000000000000014e-211 < (*.f64 b c) < 2.0999999999999999e-83

    1. Initial program 89.0%

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

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

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

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

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

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

    if -8.4999999999999996e-174 < (*.f64 b c) < -3.8999999999999999e-265

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

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

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

    if 2.0000024e-318 < (*.f64 b c) < 2.90000000000000014e-211

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Taylor expanded in a around 0 90.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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e21 < (*.f64 b c) < 6.9999999999999998e227

    1. Initial program 88.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. Simplified92.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.6 \cdot 10^{+46}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -8 \cdot 10^{-10}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -4.5 \cdot 10^{-71}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-174}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -3.9 \cdot 10^{-265}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-318}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2.9 \cdot 10^{-211}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{-83}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{+21}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 7 \cdot 10^{+227}:\\ \;\;\;\;k \cdot \left(-27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 6: 45.8% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-309}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{+40}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -3.5499999999999999e252 or 1.29999999999999991e227 < (*.f64 b c)

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \left(x \cdot i\right) \cdot -4\right)} + j \cdot \left(k \cdot -27\right) \]
      5. associate-*l*77.7%

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

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

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

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

    if -3.5499999999999999e252 < (*.f64 b c) < -1.25e-175 or -1.1499999999999999e-273 < (*.f64 b c) < 1.9999999999999988e-309 or 5.99999999999999972e-208 < (*.f64 b c) < 1.6499999999999999e40

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv54.1%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + \left(-4\right) \cdot \left(i \cdot x\right)} \]
      2. *-commutative54.1%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval54.1%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative54.1%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out54.1%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative54.1%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified54.1%

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

    if -1.25e-175 < (*.f64 b c) < -1.1499999999999999e-273

    1. Initial program 85.4%

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

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

      \[\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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999988e-309 < (*.f64 b c) < 5.99999999999999972e-208

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Taylor expanded in a around 0 90.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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6499999999999999e40 < (*.f64 b c) < 1.29999999999999991e227

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.55 \cdot 10^{+252}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.25 \cdot 10^{-175}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.15 \cdot 10^{-273}:\\ \;\;\;\;t \cdot \left(\left(18 \cdot z\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-309}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 6 \cdot 10^{-208}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{+40}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{+227}:\\ \;\;\;\;k \cdot \left(-27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 7: 47.4% accurate, 0.9× speedup?

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

\mathbf{elif}\;b \cdot c \leq -1.9 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{-309}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{+41}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 b c) < -1.52000000000000002e41

    1. Initial program 82.1%

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

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

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

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

        \[\leadsto \left(b \cdot c + \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      3. cancel-sign-sub-inv78.9%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(t \cdot a\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      9. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative78.9%

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

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

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

    if -1.52000000000000002e41 < (*.f64 b c) < -1.9000000000000001e-174 or -1.29999999999999992e-273 < (*.f64 b c) < 3.000000000000001e-309 or 4.8000000000000002e-209 < (*.f64 b c) < 3.2000000000000001e41

    1. Initial program 88.4%

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv57.9%

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

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval57.9%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative57.9%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out57.9%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative57.9%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified57.9%

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

    if -1.9000000000000001e-174 < (*.f64 b c) < -1.29999999999999992e-273

    1. Initial program 85.4%

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

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

      \[\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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.000000000000001e-309 < (*.f64 b c) < 4.8000000000000002e-209

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Taylor expanded in a around 0 90.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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2000000000000001e41 < (*.f64 b c) < 1.29999999999999991e227

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

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

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

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

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

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

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

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

    if 1.29999999999999991e227 < (*.f64 b c)

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.52 \cdot 10^{+41}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -1.9 \cdot 10^{-174}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-273}:\\ \;\;\;\;t \cdot \left(\left(18 \cdot z\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{-309}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-209}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{+41}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{+227}:\\ \;\;\;\;k \cdot \left(-27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 8: 50.9% accurate, 0.9× speedup?

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

\mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-175}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-213}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 82.1%

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

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

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

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

        \[\leadsto \left(b \cdot c + \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      3. cancel-sign-sub-inv78.9%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(t \cdot a\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      9. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative78.9%

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

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

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

    if -7.2000000000000002e43 < (*.f64 b c) < -1.3e-175 or -5.99999999999999976e-276 < (*.f64 b c) < 1.000000000000002e-309 or 3.6000000000000001e-213 < (*.f64 b c) < 1.30000000000000003e35

    1. Initial program 88.2%

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv58.8%

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

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval58.8%

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out58.8%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative58.8%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified58.8%

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

    if -1.3e-175 < (*.f64 b c) < -5.99999999999999976e-276

    1. Initial program 85.4%

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

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

      \[\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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.000000000000002e-309 < (*.f64 b c) < 3.6000000000000001e-213

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Taylor expanded in a around 0 90.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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.30000000000000003e35 < (*.f64 b c)

    1. Initial program 77.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -7.2 \cdot 10^{+43}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-175}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -6 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \left(\left(18 \cdot z\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 10^{-309}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-213}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{+35}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \end{array} \]

Alternative 9: 53.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \cdot c \leq -4.1 \cdot 10^{-280}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 82.1%

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

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

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

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

        \[\leadsto \left(b \cdot c + \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      3. cancel-sign-sub-inv78.9%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(t \cdot a\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      9. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative78.9%

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

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

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

    if -2.3499999999999998e46 < (*.f64 b c) < -6.99999999999999975e-174

    1. Initial program 86.3%

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv57.6%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + \left(-4\right) \cdot \left(i \cdot x\right)} \]
      2. *-commutative57.6%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval57.6%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative57.6%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out57.6%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative57.6%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified57.6%

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

    if -6.99999999999999975e-174 < (*.f64 b c) < -4.1000000000000002e-280 or 6.49999999999999998e-127 < (*.f64 b c) < 7.99999999999999982e38

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

    if -4.1000000000000002e-280 < (*.f64 b c) < 6.49999999999999998e-127

    1. Initial program 92.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. Simplified94.0%

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

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

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

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

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

    if 7.99999999999999982e38 < (*.f64 b c)

    1. Initial program 77.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.35 \cdot 10^{+46}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-174}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -4.1 \cdot 10^{-280}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;b \cdot c \leq 6.5 \cdot 10^{-127}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \end{array} \]

Alternative 10: 53.0% accurate, 1.1× speedup?

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

\mathbf{elif}\;b \cdot c \leq -2.8 \cdot 10^{-174}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{-260}:\\
\;\;\;\;t_2 + t_1\\

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

\mathbf{elif}\;b \cdot c \leq 8.5 \cdot 10^{+32}:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 82.1%

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

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

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

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

        \[\leadsto \left(b \cdot c + \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      3. cancel-sign-sub-inv78.9%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(t \cdot a\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      9. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative78.9%

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

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

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

    if -3.05e45 < (*.f64 b c) < -2.79999999999999999e-174 or 7.59999999999999983e-205 < (*.f64 b c) < 8.4999999999999998e32

    1. Initial program 88.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv58.2%

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

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval58.2%

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out58.2%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative58.2%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified58.2%

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

    if -2.79999999999999999e-174 < (*.f64 b c) < -2.5000000000000002e-260

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

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

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

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

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

    if -2.5000000000000002e-260 < (*.f64 b c) < 7.59999999999999983e-205

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Taylor expanded in x around 0 62.5%

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

    if 8.4999999999999998e32 < (*.f64 b c)

    1. Initial program 77.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.05 \cdot 10^{+45}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -2.8 \cdot 10^{-174}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{-260}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 7.6 \cdot 10^{-205}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 8.5 \cdot 10^{+32}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \end{array} \]

Alternative 11: 53.0% accurate, 1.1× speedup?

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

\mathbf{elif}\;b \cdot c \leq -6.8 \cdot 10^{-174}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \cdot c \leq -1.45 \cdot 10^{-265}:\\
\;\;\;\;t_2 + t_1\\

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

\mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{+34}:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 82.1%

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

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

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

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

        \[\leadsto \left(b \cdot c + \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      3. cancel-sign-sub-inv78.9%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(t \cdot a\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      9. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative78.9%

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

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

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

    if -2.64999999999999989e46 < (*.f64 b c) < -6.8000000000000004e-174 or 1.0999999999999999e-204 < (*.f64 b c) < 2.10000000000000017e34

    1. Initial program 88.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv58.2%

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

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval58.2%

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out58.2%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative58.2%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified58.2%

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

    if -6.8000000000000004e-174 < (*.f64 b c) < -1.44999999999999987e-265

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

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

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

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

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

    if -1.44999999999999987e-265 < (*.f64 b c) < 1.0999999999999999e-204

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

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

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

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

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

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

    if 2.10000000000000017e34 < (*.f64 b c)

    1. Initial program 77.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.65 \cdot 10^{+46}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -6.8 \cdot 10^{-174}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.45 \cdot 10^{-265}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 1.1 \cdot 10^{-204}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{+34}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \end{array} \]

Alternative 12: 53.3% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{-211}:\\
\;\;\;\;t_1 + 18 \cdot \left(t \cdot t_2\right)\\

\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+38}:\\
\;\;\;\;t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\\

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


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

    1. Initial program 82.1%

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

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

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

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

        \[\leadsto \left(b \cdot c + \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      3. cancel-sign-sub-inv78.9%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(t \cdot a\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      9. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative78.9%

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

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

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

    if -4.1e43 < (*.f64 b c) < -3.2e-174

    1. Initial program 86.3%

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv57.6%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + \left(-4\right) \cdot \left(i \cdot x\right)} \]
      2. *-commutative57.6%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval57.6%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative57.6%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out57.6%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative57.6%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified57.6%

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

    if -3.2e-174 < (*.f64 b c) < 3.80000000000000012e-211

    1. Initial program 88.7%

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

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

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

    if 3.80000000000000012e-211 < (*.f64 b c) < 7.99999999999999982e38

    1. Initial program 91.5%

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

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

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

    if 7.99999999999999982e38 < (*.f64 b c)

    1. Initial program 77.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -4.1 \cdot 10^{+43}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -3.2 \cdot 10^{-174}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{-211}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \end{array} \]

Alternative 13: 53.5% accurate, 1.1× speedup?

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

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

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

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

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


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

    1. Initial program 82.1%

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

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

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

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

        \[\leadsto \left(b \cdot c + \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      3. cancel-sign-sub-inv78.9%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(t \cdot a\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      9. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative78.9%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval78.9%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative78.9%

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

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

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

    if -2.35e41 < (*.f64 b c) < -6.50000000000000009e-174

    1. Initial program 86.3%

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv57.6%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + \left(-4\right) \cdot \left(i \cdot x\right)} \]
      2. *-commutative57.6%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval57.6%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + \color{blue}{-4} \cdot \left(i \cdot x\right) \]
      4. *-commutative57.6%

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out57.6%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative57.6%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified57.6%

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

    if -6.50000000000000009e-174 < (*.f64 b c) < 3.80000000000000012e-211

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000012e-211 < (*.f64 b c) < 7.80000000000000047e38

    1. Initial program 91.5%

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

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

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

    if 7.80000000000000047e38 < (*.f64 b c)

    1. Initial program 77.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.35 \cdot 10^{+41}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -6.5 \cdot 10^{-174}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{-211}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 7.8 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \end{array} \]

Alternative 14: 46.6% accurate, 1.2× speedup?

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

\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{-309}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+41}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -5.20000000000000019e255 or 1.31999999999999991e227 < (*.f64 b c)

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \left(x \cdot i\right) \cdot -4\right)} + j \cdot \left(k \cdot -27\right) \]
      5. associate-*l*77.7%

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

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

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

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

    if -5.20000000000000019e255 < (*.f64 b c) < 3.000000000000001e-309 or 6.60000000000000062e-213 < (*.f64 b c) < 5.00000000000000022e41

    1. Initial program 87.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv51.2%

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

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(-4\right) \cdot \left(i \cdot x\right) \]
      3. metadata-eval51.2%

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

        \[\leadsto -4 \cdot \left(t \cdot a\right) + -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      5. distribute-lft-out51.2%

        \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} \]
      6. *-commutative51.2%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{i \cdot x}\right) \]
    8. Simplified51.2%

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

    if 3.000000000000001e-309 < (*.f64 b c) < 6.60000000000000062e-213

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Taylor expanded in a around 0 90.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)} + j \cdot \left(k \cdot -27\right) \]
    4. Step-by-step derivation
      1. associate-+r+90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000022e41 < (*.f64 b c) < 1.31999999999999991e227

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.2 \cdot 10^{+255}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{-309}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 6.6 \cdot 10^{-213}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+41}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.32 \cdot 10^{+227}:\\ \;\;\;\;k \cdot \left(-27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 15: 78.5% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.0000000000000001e113

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

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

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

    if -9.0000000000000001e113 < z < 9.1999999999999993e149

    1. Initial program 87.0%

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

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

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

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

    if 9.1999999999999993e149 < z

    1. Initial program 83.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*83.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+83.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--92.7%

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

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

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

Alternative 16: 72.3% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;t \leq -7.2 \cdot 10^{+46} \lor \neg \left(t \leq 2.7 \cdot 10^{+24}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.79999999999999967e121 or -2.5000000000000001e93 < t < -7.1999999999999997e46 or 2.7e24 < t

    1. Initial program 78.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*79.9%

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

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

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

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

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

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

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

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

    if -7.79999999999999967e121 < t < -2.5000000000000001e93

    1. Initial program 99.8%

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

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

    if -7.1999999999999997e46 < t < 2.7e24

    1. Initial program 88.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*88.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+88.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{+121}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{+93}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{+46} \lor \neg \left(t \leq 2.7 \cdot 10^{+24}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \end{array} \]

Alternative 17: 76.2% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.50000000000000023e45 or 5.2e-28 < t

    1. Initial program 81.2%

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

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

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

      \[\leadsto \color{blue}{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) \]

    if -3.50000000000000023e45 < t < 5.2e-28

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

Alternative 18: 35.9% accurate, 1.5× speedup?

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

\mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-207}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+227}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.89999999999999999e80 or 2.99999999999999986e227 < (*.f64 b c)

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999999e80 < (*.f64 b c) < 4.79999999999999978e-207 or 2e13 < (*.f64 b c) < 2.99999999999999986e227

    1. Initial program 87.2%

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

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

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

    if 4.79999999999999978e-207 < (*.f64 b c) < 2e13

    1. Initial program 89.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.9 \cdot 10^{+80}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-207}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \mathbf{elif}\;b \cdot c \leq 20000000000000:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+227}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 19: 35.9% accurate, 1.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -8.59999999999999983e77 or 2.99999999999999986e227 < (*.f64 b c)

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

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

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

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

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

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

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

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

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

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

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

    if -8.59999999999999983e77 < (*.f64 b c) < 7.1999999999999998e-211

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

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

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

    if 7.1999999999999998e-211 < (*.f64 b c) < 2.5e13

    1. Initial program 89.8%

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

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

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

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

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

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

    if 2.5e13 < (*.f64 b c) < 2.99999999999999986e227

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.6 \cdot 10^{+77}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 7.2 \cdot 10^{-211}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \mathbf{elif}\;b \cdot c \leq 25000000000000:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+227}:\\ \;\;\;\;k \cdot \left(-27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 20: 72.5% accurate, 1.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.99999999999999974e44 or 1.29999999999999996e23 < t

    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*81.6%

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

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

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

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

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

    if -5.99999999999999974e44 < t < 1.29999999999999996e23

    1. Initial program 88.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*88.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+88.6%

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

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

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

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

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

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

Alternative 21: 52.5% accurate, 2.0× speedup?

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

\mathbf{elif}\;k \leq 1.38 \cdot 10^{-275}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -4.2e-54 or 2.49999999999999989e110 < k

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

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

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

    if -4.2e-54 < k < 1.37999999999999997e-275

    1. Initial program 87.6%

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

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

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

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

        \[\leadsto \left(b \cdot c + \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      3. cancel-sign-sub-inv53.6%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*53.6%

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

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative53.6%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in53.6%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval53.6%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative53.6%

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \color{blue}{\left(t \cdot a\right)}\right) + j \cdot \left(k \cdot -27\right) \]
    5. Simplified53.6%

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

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

    if 1.37999999999999997e-275 < k < 2.49999999999999989e110

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

Alternative 22: 49.0% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -7.40000000000000019e79

    1. Initial program 76.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. Simplified78.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \left(x \cdot i\right) \cdot -4\right)} + j \cdot \left(k \cdot -27\right) \]
      5. associate-*l*75.7%

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

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

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

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

    if -7.40000000000000019e79 < c < 6.5000000000000001e40

    1. Initial program 89.9%

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Taylor expanded in x around 0 52.6%

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

    if 6.5000000000000001e40 < c

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, -t \cdot \left(a \cdot 4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      8. associate-*r*66.3%

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

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{\left(a \cdot t\right)} \cdot 4\right) + j \cdot \left(k \cdot -27\right) \]
      10. *-commutative66.3%

        \[\leadsto \mathsf{fma}\left(b, c, -\color{blue}{4 \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      11. distribute-lft-neg-in66.3%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(-4\right) \cdot \left(a \cdot t\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      12. metadata-eval66.3%

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right)\right) + j \cdot \left(k \cdot -27\right) \]
      13. *-commutative66.3%

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

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

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

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

Alternative 23: 36.2% accurate, 2.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.05000000000000001e80 or 1.31999999999999991e227 < (*.f64 b c)

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

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000001e80 < (*.f64 b c) < 1.31999999999999991e227

    1. Initial program 87.8%

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

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

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

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

Alternative 24: 24.1% accurate, 10.3× speedup?

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \left(x \cdot i\right) \cdot -4\right)} + j \cdot \left(k \cdot -27\right) \]
    5. associate-*l*63.9%

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)} + j \cdot \left(k \cdot -27\right) \]
  6. Taylor expanded in b around inf 24.0%

    \[\leadsto \color{blue}{b \cdot c} \]
  7. Final simplification24.0%

    \[\leadsto b \cdot c \]

Developer target: 89.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\ t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
        (t_2
         (-
          (- (* (* 18.0 t) (* (* x y) z)) t_1)
          (- (* (* k j) 27.0) (* c b)))))
   (if (< t -1.6210815397541398e-69)
     t_2
     (if (< t 165.68027943805222)
       (+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((a * t) + (i * x)) * 4.0d0
    t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
    if (t < (-1.6210815397541398d-69)) then
        tmp = t_2
    else if (t < 165.68027943805222d0) then
        tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((a * t) + (i * x)) * 4.0
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b))
	tmp = 0
	if t < -1.6210815397541398e-69:
		tmp = t_2
	elif t < 165.68027943805222:
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0)
	t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b)))
	tmp = 0.0
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((a * t) + (i * x)) * 4.0;
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	tmp = 0.0;
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023310 
(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)))