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

Percentage Accurate: 85.6% → 89.5%
Time: 36.1s
Alternatives: 27
Speedup: 1.1×

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 27 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 89.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.35e-167

    1. Initial program 81.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

    if -1.35e-167 < x < 8.19999999999999987e-85

    1. Initial program 97.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l+N/A

        \[\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)} - \left(j \cdot 27\right) \cdot k \]
      2. sub-negN/A

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

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

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

        \[\leadsto \left(\color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right) \cdot z} + \left(\left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      6. accelerator-lowering-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot y\right)}, z, \left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. associate-*l*N/A

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

        \[\leadsto \mathsf{fma}\left(t \cdot \color{blue}{\left(x \cdot \left(18 \cdot y\right)\right)}, z, \left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right), z, \left(\mathsf{neg}\left(\color{blue}{t \cdot \left(a \cdot 4\right)}\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right), z, \color{blue}{t \cdot \left(\mathsf{neg}\left(a \cdot 4\right)\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right), z, \color{blue}{\mathsf{fma}\left(t, \mathsf{neg}\left(a \cdot 4\right), b \cdot c - \left(x \cdot 4\right) \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      14. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right), z, \mathsf{fma}\left(t, \color{blue}{a \cdot \left(\mathsf{neg}\left(4\right)\right)}, b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      15. *-lowering-*.f64N/A

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

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

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

    if 8.19999999999999987e-85 < x

    1. Initial program 75.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{-167}:\\ \;\;\;\;\mathsf{fma}\left(c, b, t \cdot \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right) - \mathsf{fma}\left(x, 4 \cdot i, 27 \cdot \left(j \cdot k\right)\right)\right)\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{-85}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right), z, \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right) - k \cdot \left(27 \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right), \mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.9% accurate, 0.5× speedup?

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

\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \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 #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0

    1. Initial program 95.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-negN/A

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{k \cdot \left(j \cdot 27\right)}\right)\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(k \cdot j\right) \cdot 27}\right)\right) + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      5. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(k \cdot j\right) \cdot \left(\mathsf{neg}\left(27\right)\right)} + \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      6. accelerator-lowering-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \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) \]
      11. accelerator-lowering-fma.f64N/A

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

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

    if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) 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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      8. *-lowering-*.f6460.5

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right) \]
    5. Simplified60.5%

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

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

Alternative 3: 54.0% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := k \cdot \left(27 \cdot j\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (<= t_1 -1e+136)
     (fma (* k -27.0) j (* c b))
     (if (<= t_1 -2e+35)
       (* y (* z (* x (* t 18.0))))
       (if (<= t_1 2e+87)
         (fma t (* a -4.0) (* c b))
         (fma (* x i) -4.0 (* (* j k) -27.0)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (t_1 <= -1e+136) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t_1 <= -2e+35) {
		tmp = y * (z * (x * (t * 18.0)));
	} else if (t_1 <= 2e+87) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else {
		tmp = fma((x * i), -4.0, ((j * k) * -27.0));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(27.0 * j))
	tmp = 0.0
	if (t_1 <= -1e+136)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t_1 <= -2e+35)
		tmp = Float64(y * Float64(z * Float64(x * Float64(t * 18.0))));
	elseif (t_1 <= 2e+87)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	else
		tmp = fma(Float64(x * i), -4.0, Float64(Float64(j * k) * -27.0));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+136], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e+35], N[(y * N[(z * N[(x * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+87], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], N[(N[(x * i), $MachinePrecision] * -4.0 + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000006e136

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified73.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr73.1%

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

    if -1.00000000000000006e136 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.9999999999999999e35

    1. Initial program 83.7%

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. *-lowering-*.f6444.7

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right)} \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      7. *-lowering-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      8. *-lowering-*.f6448.5

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right)} \cdot y \]
      6. *-commutativeN/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      7. *-lowering-*.f64N/A

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

        \[\leadsto \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot 18\right)}\right)\right) \cdot y \]
    9. Applied egg-rr48.8%

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

    if -1.9999999999999999e35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e87

    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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6460.6

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6456.2

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified56.2%

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

    if 1.9999999999999999e87 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 79.8%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      2. *-commutativeN/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right) + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(x \cdot i\right) \cdot -4} + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot i}, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{\left(27 \cdot j\right)} \cdot k\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{27 \cdot \left(j \cdot k\right)}\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      10. *-lowering-*.f6470.1

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, -27 \cdot \color{blue}{\left(j \cdot k\right)}\right) \]
    7. Applied egg-rr70.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(27 \cdot j\right) \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq -2 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq 2 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 54.0% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := k \cdot \left(27 \cdot j\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+128}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(j, k \cdot -27, t \cdot \left(a \cdot -4\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (<= t_1 -1e+136)
     (fma (* k -27.0) j (* c b))
     (if (<= t_1 -2e+35)
       (* y (* z (* x (* t 18.0))))
       (if (<= t_1 5e+128)
         (fma t (* a -4.0) (* c b))
         (fma j (* k -27.0) (* t (* a -4.0))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (t_1 <= -1e+136) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t_1 <= -2e+35) {
		tmp = y * (z * (x * (t * 18.0)));
	} else if (t_1 <= 5e+128) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else {
		tmp = fma(j, (k * -27.0), (t * (a * -4.0)));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(27.0 * j))
	tmp = 0.0
	if (t_1 <= -1e+136)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t_1 <= -2e+35)
		tmp = Float64(y * Float64(z * Float64(x * Float64(t * 18.0))));
	elseif (t_1 <= 5e+128)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	else
		tmp = fma(j, Float64(k * -27.0), Float64(t * Float64(a * -4.0)));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+136], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e+35], N[(y * N[(z * N[(x * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+128], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+128}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000006e136

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified73.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr73.1%

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

    if -1.00000000000000006e136 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.9999999999999999e35

    1. Initial program 83.7%

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. *-lowering-*.f6444.7

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right)} \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      7. *-lowering-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      8. *-lowering-*.f6448.5

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right)} \cdot y \]
      6. *-commutativeN/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      7. *-lowering-*.f64N/A

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

        \[\leadsto \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot 18\right)}\right)\right) \cdot y \]
    9. Applied egg-rr48.8%

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

    if -1.9999999999999999e35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5e128

    1. Initial program 85.8%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6460.3

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6455.5

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified55.5%

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

    if 5e128 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 77.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6476.0

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

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

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

        \[\leadsto \color{blue}{\left(j \cdot k\right) \cdot -27} + -4 \cdot \left(a \cdot t\right) \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} + -4 \cdot \left(a \cdot t\right) \]
      3. *-commutativeN/A

        \[\leadsto j \cdot \color{blue}{\left(-27 \cdot k\right)} + -4 \cdot \left(a \cdot t\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(j, -27 \cdot k, -4 \cdot \left(a \cdot t\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(j, \color{blue}{k \cdot -27}, -4 \cdot \left(a \cdot t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, \color{blue}{k \cdot -27}, -4 \cdot \left(a \cdot t\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{\left(-4 \cdot a\right) \cdot t}\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{t \cdot \left(-4 \cdot a\right)}\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, k \cdot -27, \color{blue}{t \cdot \left(-4 \cdot a\right)}\right) \]
      10. *-lowering-*.f6472.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(27 \cdot j\right) \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq -2 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq 5 \cdot 10^{+128}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(j, k \cdot -27, t \cdot \left(a \cdot -4\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 54.1% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := k \cdot \left(27 \cdot j\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (<= t_1 -1e+136)
     (fma (* k -27.0) j (* c b))
     (if (<= t_1 -2e+35)
       (* y (* z (* x (* t 18.0))))
       (if (<= t_1 4e+79)
         (fma t (* a -4.0) (* c b))
         (fma k (* j -27.0) (* c b)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (t_1 <= -1e+136) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t_1 <= -2e+35) {
		tmp = y * (z * (x * (t * 18.0)));
	} else if (t_1 <= 4e+79) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else {
		tmp = fma(k, (j * -27.0), (c * b));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(27.0 * j))
	tmp = 0.0
	if (t_1 <= -1e+136)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t_1 <= -2e+35)
		tmp = Float64(y * Float64(z * Float64(x * Float64(t * 18.0))));
	elseif (t_1 <= 4e+79)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	else
		tmp = fma(k, Float64(j * -27.0), Float64(c * b));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+136], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e+35], N[(y * N[(z * N[(x * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+79], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

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

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000006e136

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified73.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr73.1%

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

    if -1.00000000000000006e136 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.9999999999999999e35

    1. Initial program 83.7%

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. *-lowering-*.f6444.7

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right)} \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      7. *-lowering-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      8. *-lowering-*.f6448.5

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right)} \cdot y \]
      6. *-commutativeN/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      7. *-lowering-*.f64N/A

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

        \[\leadsto \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot 18\right)}\right)\right) \cdot y \]
    9. Applied egg-rr48.8%

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

    if -1.9999999999999999e35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999987e79

    1. Initial program 85.8%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6459.7

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6455.9

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified55.9%

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

    if 3.99999999999999987e79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6475.4

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6461.8

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(27 \cdot j\right) \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq -2 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq 4 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 54.1% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := k \cdot \left(27 \cdot j\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+35}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (<= t_1 -1e+136)
     (fma (* k -27.0) j (* c b))
     (if (<= t_1 -2e+35)
       (* 18.0 (* y (* z (* x t))))
       (if (<= t_1 4e+79)
         (fma t (* a -4.0) (* c b))
         (fma k (* j -27.0) (* c b)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (t_1 <= -1e+136) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t_1 <= -2e+35) {
		tmp = 18.0 * (y * (z * (x * t)));
	} else if (t_1 <= 4e+79) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else {
		tmp = fma(k, (j * -27.0), (c * b));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(27.0 * j))
	tmp = 0.0
	if (t_1 <= -1e+136)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t_1 <= -2e+35)
		tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t))));
	elseif (t_1 <= 4e+79)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	else
		tmp = fma(k, Float64(j * -27.0), Float64(c * b));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+136], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e+35], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+79], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

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

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000006e136

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified73.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr73.1%

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

    if -1.00000000000000006e136 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.9999999999999999e35

    1. Initial program 83.7%

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. *-lowering-*.f6444.7

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

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

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(\left(\left(t \cdot x\right) \cdot z\right) \cdot y\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(\left(\left(t \cdot x\right) \cdot z\right) \cdot y\right)} \]
      5. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \left(\color{blue}{\left(\left(t \cdot x\right) \cdot z\right)} \cdot y\right) \]
      6. *-lowering-*.f6448.8

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

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

    if -1.9999999999999999e35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999987e79

    1. Initial program 85.8%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6459.7

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6455.9

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified55.9%

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

    if 3.99999999999999987e79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6475.4

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6461.8

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(27 \cdot j\right) \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq -2 \cdot 10^{+35}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq 4 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 58.8% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-61}:\\ \;\;\;\;\mathsf{fma}\left(c, b, 18 \cdot \left(z \cdot \left(x \cdot \left(t \cdot y\right)\right)\right)\right)\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-145}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-199}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+57}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (fma -4.0 a (* 18.0 (* x (* y z)))))))
   (if (<= t -1.25e+91)
     t_1
     (if (<= t -7.4e-61)
       (fma c b (* 18.0 (* z (* x (* t y)))))
       (if (<= t -9.8e-145)
         (* x (fma (* y z) (* t 18.0) (* -4.0 i)))
         (if (<= t 2.3e-199)
           (fma (* k -27.0) j (* c b))
           (if (<= t 1.25e-116)
             (fma (* x i) -4.0 (* (* j k) -27.0))
             (if (<= t 2.5e+57) (fma i (* x -4.0) (* c b)) t_1))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 * fma(-4.0, a, (18.0 * (x * (y * z))));
	double tmp;
	if (t <= -1.25e+91) {
		tmp = t_1;
	} else if (t <= -7.4e-61) {
		tmp = fma(c, b, (18.0 * (z * (x * (t * y)))));
	} else if (t <= -9.8e-145) {
		tmp = x * fma((y * z), (t * 18.0), (-4.0 * i));
	} else if (t <= 2.3e-199) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t <= 1.25e-116) {
		tmp = fma((x * i), -4.0, ((j * k) * -27.0));
	} else if (t <= 2.5e+57) {
		tmp = fma(i, (x * -4.0), (c * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))))
	tmp = 0.0
	if (t <= -1.25e+91)
		tmp = t_1;
	elseif (t <= -7.4e-61)
		tmp = fma(c, b, Float64(18.0 * Float64(z * Float64(x * Float64(t * y)))));
	elseif (t <= -9.8e-145)
		tmp = Float64(x * fma(Float64(y * z), Float64(t * 18.0), Float64(-4.0 * i)));
	elseif (t <= 2.3e-199)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t <= 1.25e-116)
		tmp = fma(Float64(x * i), -4.0, Float64(Float64(j * k) * -27.0));
	elseif (t <= 2.5e+57)
		tmp = fma(i, Float64(x * -4.0), Float64(c * b));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, 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[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+91], t$95$1, If[LessEqual[t, -7.4e-61], N[(c * b + N[(18.0 * N[(z * N[(x * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.8e-145], N[(x * N[(N[(y * z), $MachinePrecision] * N[(t * 18.0), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-199], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-116], N[(N[(x * i), $MachinePrecision] * -4.0 + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+57], N[(i * N[(x * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -7.4 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(c, b, 18 \cdot \left(z \cdot \left(x \cdot \left(t \cdot y\right)\right)\right)\right)\\

\mathbf{elif}\;t \leq -9.8 \cdot 10^{-145}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right)\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-199}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.2500000000000001e91 or 2.49999999999999986e57 < t

    1. Initial program 84.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      8. *-lowering-*.f6472.5

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right) \]
    5. Simplified72.5%

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

    if -1.2500000000000001e91 < t < -7.3999999999999999e-61

    1. Initial program 89.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(c, b, 18 \cdot \left(t \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(c, b, 18 \cdot \color{blue}{\left(\left(t \cdot \left(x \cdot y\right)\right) \cdot z\right)}\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right) \cdot z}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{z \cdot \left(18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(c, b, z \cdot \color{blue}{\left(\left(t \cdot \left(x \cdot y\right)\right) \cdot 18\right)}\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{\left(z \cdot \left(t \cdot \left(x \cdot y\right)\right)\right) \cdot 18}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{\left(z \cdot \left(t \cdot \left(x \cdot y\right)\right)\right) \cdot 18}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{\left(z \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \cdot 18\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(z \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot t\right)}\right) \cdot 18\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(z \cdot \color{blue}{\left(x \cdot \left(y \cdot t\right)\right)}\right) \cdot 18\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot y\right)}\right)\right) \cdot 18\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot y\right)\right)}\right) \cdot 18\right) \]
      13. *-lowering-*.f6457.0

        \[\leadsto \mathsf{fma}\left(c, b, \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot y\right)}\right)\right) \cdot 18\right) \]
    7. Simplified57.0%

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

    if -7.3999999999999999e-61 < t < -9.79999999999999934e-145

    1. Initial program 63.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
      2. metadata-evalN/A

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

        \[\leadsto x \cdot \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)} \]
      6. associate-*r*N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(18 \cdot t\right) \cdot \left(y \cdot z\right)} + -4 \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto x \cdot \left(\color{blue}{\left(y \cdot z\right) \cdot \left(18 \cdot t\right)} + -4 \cdot i\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y \cdot z, 18 \cdot t, -4 \cdot i\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(\color{blue}{y \cdot z}, 18 \cdot t, -4 \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot 18}, -4 \cdot i\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot 18}, -4 \cdot i\right) \]
      12. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, \color{blue}{i \cdot -4}\right) \]
      13. *-lowering-*.f6468.2

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, \color{blue}{i \cdot -4}\right) \]
    7. Simplified68.2%

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

    if -9.79999999999999934e-145 < t < 2.3000000000000001e-199

    1. Initial program 85.0%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6477.1

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6473.8

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified73.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6473.8

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr73.8%

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

    if 2.3000000000000001e-199 < t < 1.2500000000000001e-116

    1. Initial program 86.6%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      2. *-commutativeN/A

        \[\leadsto -4 \cdot \color{blue}{\left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
      3. *-lowering-*.f6478.6

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

      \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right) + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(x \cdot i\right) \cdot -4} + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot i}, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{\left(27 \cdot j\right)} \cdot k\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{27 \cdot \left(j \cdot k\right)}\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      10. *-lowering-*.f6478.8

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, -27 \cdot \color{blue}{\left(j \cdot k\right)}\right) \]
    7. Applied egg-rr78.8%

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

    if 1.2500000000000001e-116 < t < 2.49999999999999986e57

    1. Initial program 87.9%

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6463.4

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified63.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, x \cdot -4, b \cdot c\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification69.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-61}:\\ \;\;\;\;\mathsf{fma}\left(c, b, 18 \cdot \left(z \cdot \left(x \cdot \left(t \cdot y\right)\right)\right)\right)\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-145}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-199}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+57}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 58.2% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;t \leq -7 \cdot 10^{+77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-38}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-145}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-199}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (fma -4.0 a (* 18.0 (* x (* y z)))))))
   (if (<= t -7e+77)
     t_1
     (if (<= t -5e-38)
       (fma t (* a -4.0) (* c b))
       (if (<= t -3.1e-145)
         (* x (fma (* y z) (* t 18.0) (* -4.0 i)))
         (if (<= t 2.4e-199)
           (fma (* k -27.0) j (* c b))
           (if (<= t 1.26e-116)
             (fma (* x i) -4.0 (* (* j k) -27.0))
             (if (<= t 6e+55) (fma i (* x -4.0) (* c b)) t_1))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 * fma(-4.0, a, (18.0 * (x * (y * z))));
	double tmp;
	if (t <= -7e+77) {
		tmp = t_1;
	} else if (t <= -5e-38) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else if (t <= -3.1e-145) {
		tmp = x * fma((y * z), (t * 18.0), (-4.0 * i));
	} else if (t <= 2.4e-199) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t <= 1.26e-116) {
		tmp = fma((x * i), -4.0, ((j * k) * -27.0));
	} else if (t <= 6e+55) {
		tmp = fma(i, (x * -4.0), (c * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))))
	tmp = 0.0
	if (t <= -7e+77)
		tmp = t_1;
	elseif (t <= -5e-38)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	elseif (t <= -3.1e-145)
		tmp = Float64(x * fma(Float64(y * z), Float64(t * 18.0), Float64(-4.0 * i)));
	elseif (t <= 2.4e-199)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t <= 1.26e-116)
		tmp = fma(Float64(x * i), -4.0, Float64(Float64(j * k) * -27.0));
	elseif (t <= 6e+55)
		tmp = fma(i, Float64(x * -4.0), Float64(c * b));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, 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[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+77], t$95$1, If[LessEqual[t, -5e-38], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.1e-145], N[(x * N[(N[(y * z), $MachinePrecision] * N[(t * 18.0), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-199], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e-116], N[(N[(x * i), $MachinePrecision] * -4.0 + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+55], N[(i * N[(x * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -3.1 \cdot 10^{-145}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right)\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-199}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

\mathbf{elif}\;t \leq 1.26 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\

\mathbf{elif}\;t \leq 6 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -7.0000000000000003e77 or 6.00000000000000033e55 < t

    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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      8. *-lowering-*.f6471.8

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right) \]
    5. Simplified71.8%

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

    if -7.0000000000000003e77 < t < -5.00000000000000033e-38

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6472.6

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6462.8

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified62.8%

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

    if -5.00000000000000033e-38 < t < -3.1e-145

    1. Initial program 67.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
      2. metadata-evalN/A

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

        \[\leadsto x \cdot \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)} \]
      6. associate-*r*N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(18 \cdot t\right) \cdot \left(y \cdot z\right)} + -4 \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto x \cdot \left(\color{blue}{\left(y \cdot z\right) \cdot \left(18 \cdot t\right)} + -4 \cdot i\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y \cdot z, 18 \cdot t, -4 \cdot i\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(\color{blue}{y \cdot z}, 18 \cdot t, -4 \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot 18}, -4 \cdot i\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot 18}, -4 \cdot i\right) \]
      12. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, \color{blue}{i \cdot -4}\right) \]
      13. *-lowering-*.f6466.5

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, \color{blue}{i \cdot -4}\right) \]
    7. Simplified66.5%

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

    if -3.1e-145 < t < 2.39999999999999996e-199

    1. Initial program 85.0%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6477.1

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6473.8

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified73.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6473.8

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr73.8%

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

    if 2.39999999999999996e-199 < t < 1.2599999999999999e-116

    1. Initial program 86.6%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      2. *-commutativeN/A

        \[\leadsto -4 \cdot \color{blue}{\left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
      3. *-lowering-*.f6478.6

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

      \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right) + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(x \cdot i\right) \cdot -4} + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot i}, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{\left(27 \cdot j\right)} \cdot k\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{27 \cdot \left(j \cdot k\right)}\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      10. *-lowering-*.f6478.8

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, -27 \cdot \color{blue}{\left(j \cdot k\right)}\right) \]
    7. Applied egg-rr78.8%

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

    if 1.2599999999999999e-116 < t < 6.00000000000000033e55

    1. Initial program 87.9%

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6463.4

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified63.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, x \cdot -4, b \cdot c\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification70.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+77}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-38}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-145}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-199}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 58.3% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;t \leq -5.4 \cdot 10^{+77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-36}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-145}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-199}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+58}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (fma -4.0 a (* 18.0 (* x (* y z)))))))
   (if (<= t -5.4e+77)
     t_1
     (if (<= t -1.1e-36)
       (fma t (* a -4.0) (* c b))
       (if (<= t -9.8e-145)
         (* x (fma -4.0 i (* t (* 18.0 (* y z)))))
         (if (<= t 2.4e-199)
           (fma (* k -27.0) j (* c b))
           (if (<= t 5.5e-116)
             (fma (* x i) -4.0 (* (* j k) -27.0))
             (if (<= t 4e+58) (fma i (* x -4.0) (* c b)) t_1))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 * fma(-4.0, a, (18.0 * (x * (y * z))));
	double tmp;
	if (t <= -5.4e+77) {
		tmp = t_1;
	} else if (t <= -1.1e-36) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else if (t <= -9.8e-145) {
		tmp = x * fma(-4.0, i, (t * (18.0 * (y * z))));
	} else if (t <= 2.4e-199) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t <= 5.5e-116) {
		tmp = fma((x * i), -4.0, ((j * k) * -27.0));
	} else if (t <= 4e+58) {
		tmp = fma(i, (x * -4.0), (c * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))))
	tmp = 0.0
	if (t <= -5.4e+77)
		tmp = t_1;
	elseif (t <= -1.1e-36)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	elseif (t <= -9.8e-145)
		tmp = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z)))));
	elseif (t <= 2.4e-199)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t <= 5.5e-116)
		tmp = fma(Float64(x * i), -4.0, Float64(Float64(j * k) * -27.0));
	elseif (t <= 4e+58)
		tmp = fma(i, Float64(x * -4.0), Float64(c * b));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, 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[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.4e+77], t$95$1, If[LessEqual[t, -1.1e-36], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.8e-145], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-199], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-116], N[(N[(x * i), $MachinePrecision] * -4.0 + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+58], N[(i * N[(x * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.1 \cdot 10^{-36}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

\mathbf{elif}\;t \leq -9.8 \cdot 10^{-145}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-199}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

\mathbf{elif}\;t \leq 5.5 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\

\mathbf{elif}\;t \leq 4 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -5.3999999999999997e77 or 3.99999999999999978e58 < t

    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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      8. *-lowering-*.f6471.8

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right) \]
    5. Simplified71.8%

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

    if -5.3999999999999997e77 < t < -1.1e-36

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6472.6

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6462.8

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified62.8%

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

    if -1.1e-36 < t < -9.79999999999999934e-145

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto x \cdot \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, \color{blue}{\left(t \cdot \left(y \cdot z\right)\right) \cdot 18}\right) \]
      7. associate-*l*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot 18\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot 18\right)}\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, t \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot 18\right)}\right) \]
      10. *-lowering-*.f6466.5

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(\color{blue}{\left(y \cdot z\right)} \cdot 18\right)\right) \]
    5. Simplified66.5%

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

    if -9.79999999999999934e-145 < t < 2.39999999999999996e-199

    1. Initial program 85.0%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6477.1

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6473.8

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified73.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6473.8

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr73.8%

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

    if 2.39999999999999996e-199 < t < 5.4999999999999998e-116

    1. Initial program 86.6%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      2. *-commutativeN/A

        \[\leadsto -4 \cdot \color{blue}{\left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
      3. *-lowering-*.f6478.6

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

      \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right) + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(x \cdot i\right) \cdot -4} + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot i}, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{\left(27 \cdot j\right)} \cdot k\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{27 \cdot \left(j \cdot k\right)}\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      10. *-lowering-*.f6478.8

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, -27 \cdot \color{blue}{\left(j \cdot k\right)}\right) \]
    7. Applied egg-rr78.8%

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

    if 5.4999999999999998e-116 < t < 3.99999999999999978e58

    1. Initial program 87.9%

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6463.4

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified63.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, x \cdot -4, b \cdot c\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification70.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.4 \cdot 10^{+77}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-36}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-145}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-199}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+58}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 88.7% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.54999999999999994e-39

    1. Initial program 87.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

    if 2.54999999999999994e-39 < x

    1. Initial program 73.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

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

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

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

Alternative 11: 78.6% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\right)\\ \mathbf{if}\;x \leq -9.6 \cdot 10^{-47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-66}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{+177}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right) - k \cdot \left(27 \cdot j\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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
         (fma
          -4.0
          (* x i)
          (fma t (fma -4.0 a (* 18.0 (* x (* y z)))) (* c b)))))
   (if (<= x -9.6e-47)
     t_1
     (if (<= x 8.5e-66)
       (fma b c (fma -4.0 (* t a) (* j (* k -27.0))))
       (if (<= x 5.5e+177)
         t_1
         (- (* x (fma -4.0 i (* t (* 18.0 (* y z))))) (* k (* 27.0 j))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 = fma(-4.0, (x * i), fma(t, fma(-4.0, a, (18.0 * (x * (y * z)))), (c * b)));
	double tmp;
	if (x <= -9.6e-47) {
		tmp = t_1;
	} else if (x <= 8.5e-66) {
		tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
	} else if (x <= 5.5e+177) {
		tmp = t_1;
	} else {
		tmp = (x * fma(-4.0, i, (t * (18.0 * (y * z))))) - (k * (27.0 * j));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(-4.0, Float64(x * i), fma(t, fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))), Float64(c * b)))
	tmp = 0.0
	if (x <= -9.6e-47)
		tmp = t_1;
	elseif (x <= 8.5e-66)
		tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0))));
	elseif (x <= 5.5e+177)
		tmp = t_1;
	else
		tmp = Float64(Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))) - Float64(k * Float64(27.0 * j)));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision] + N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.6e-47], t$95$1, If[LessEqual[x, 8.5e-66], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.5e+177], t$95$1, N[(N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\right)\\
\mathbf{if}\;x \leq -9.6 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 8.5 \cdot 10^{-66}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\

\mathbf{elif}\;x \leq 5.5 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.5999999999999998e-47 or 8.49999999999999966e-66 < x < 5.49999999999999993e177

    1. Initial program 78.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. Add Preprocessing
    3. Taylor expanded in j around 0

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

    if -9.5999999999999998e-47 < x < 8.49999999999999966e-66

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6485.5

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

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

    if 5.49999999999999993e177 < x

    1. Initial program 59.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. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
      2. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
      3. metadata-evalN/A

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

        \[\leadsto x \cdot \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, \color{blue}{\left(t \cdot \left(y \cdot z\right)\right) \cdot 18}\right) - \left(j \cdot 27\right) \cdot k \]
      7. associate-*l*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot 18\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      8. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot 18\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(-4, i, t \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot 18\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      10. *-lowering-*.f6490.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.6 \cdot 10^{-47}:\\ \;\;\;\;\mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\right)\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-66}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{+177}:\\ \;\;\;\;\mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right) - k \cdot \left(27 \cdot j\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 80.6% accurate, 1.2× speedup?

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

\mathbf{elif}\;x \leq 1.85 \cdot 10^{-134}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.00000000000000002e-46

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in j around 0

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

    if -1.00000000000000002e-46 < x < 1.85e-134

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

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

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

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

    if 1.85e-134 < x

    1. Initial program 78.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{-46}:\\ \;\;\;\;\mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\right)\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-134}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right), \mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 80.6% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;x \leq -1.3 \cdot 10^{-46}:\\ \;\;\;\;\mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-135}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, t\_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right), \mathsf{fma}\left(b, c, t\_1\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 -1.3e-46)
     (fma -4.0 (* x i) (fma t (fma -4.0 a (* 18.0 (* x (* y z)))) (* c b)))
     (if (<= x 5.5e-135)
       (fma b c (fma -4.0 (* t a) t_1))
       (fma x (fma -4.0 i (* t (* 18.0 (* y z)))) (fma b c t_1))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 <= -1.3e-46) {
		tmp = fma(-4.0, (x * i), fma(t, fma(-4.0, a, (18.0 * (x * (y * z)))), (c * b)));
	} else if (x <= 5.5e-135) {
		tmp = fma(b, c, fma(-4.0, (t * a), t_1));
	} else {
		tmp = fma(x, fma(-4.0, i, (t * (18.0 * (y * z)))), fma(b, c, t_1));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, 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 (x <= -1.3e-46)
		tmp = fma(-4.0, Float64(x * i), fma(t, fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))), Float64(c * b)));
	elseif (x <= 5.5e-135)
		tmp = fma(b, c, fma(-4.0, Float64(t * a), t_1));
	else
		tmp = fma(x, fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z)))), fma(b, c, t_1));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, 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[x, -1.3e-46], N[(-4.0 * N[(x * i), $MachinePrecision] + N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.5e-135], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{-46}:\\
\;\;\;\;\mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\right)\\

\mathbf{elif}\;x \leq 5.5 \cdot 10^{-135}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, t\_1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.3000000000000001e-46

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in j around 0

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

    if -1.3000000000000001e-46 < x < 5.4999999999999999e-135

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

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

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

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

    if 5.4999999999999999e-135 < x

    1. Initial program 78.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. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
      3. metadata-evalN/A

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

        \[\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)} - 27 \cdot \left(j \cdot k\right) \]
      5. associate-+r+N/A

        \[\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)} - 27 \cdot \left(j \cdot k\right) \]
      6. associate--l+N/A

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{-46}:\\ \;\;\;\;\mathsf{fma}\left(-4, x \cdot i, \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\right)\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-135}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right), \mathsf{fma}\left(b, c, j \cdot \left(k \cdot -27\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 59.6% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+58}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-199}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (fma -4.0 a (* 18.0 (* x (* y z)))))))
   (if (<= t -1.25e+58)
     t_1
     (if (<= t 2.7e-199)
       (fma (* k -27.0) j (* c b))
       (if (<= t 4.5e-116)
         (fma (* x i) -4.0 (* (* j k) -27.0))
         (if (<= t 1.3e+55) (fma i (* x -4.0) (* c b)) t_1))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 * fma(-4.0, a, (18.0 * (x * (y * z))));
	double tmp;
	if (t <= -1.25e+58) {
		tmp = t_1;
	} else if (t <= 2.7e-199) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t <= 4.5e-116) {
		tmp = fma((x * i), -4.0, ((j * k) * -27.0));
	} else if (t <= 1.3e+55) {
		tmp = fma(i, (x * -4.0), (c * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))))
	tmp = 0.0
	if (t <= -1.25e+58)
		tmp = t_1;
	elseif (t <= 2.7e-199)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t <= 4.5e-116)
		tmp = fma(Float64(x * i), -4.0, Float64(Float64(j * k) * -27.0));
	elseif (t <= 1.3e+55)
		tmp = fma(i, Float64(x * -4.0), Float64(c * b));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, 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[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+58], t$95$1, If[LessEqual[t, 2.7e-199], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-116], N[(N[(x * i), $MachinePrecision] * -4.0 + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+55], N[(i * N[(x * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-199}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.24999999999999996e58 or 1.3e55 < t

    1. Initial program 84.0%

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      8. *-lowering-*.f6470.8

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right) \]
    5. Simplified70.8%

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

    if -1.24999999999999996e58 < t < 2.69999999999999989e-199

    1. Initial program 83.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6464.1

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6459.7

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified59.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6459.7

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr59.7%

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

    if 2.69999999999999989e-199 < t < 4.50000000000000012e-116

    1. Initial program 86.6%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      2. *-commutativeN/A

        \[\leadsto -4 \cdot \color{blue}{\left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
      3. *-lowering-*.f6478.6

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

      \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{-4 \cdot \left(x \cdot i\right) + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(x \cdot i\right) \cdot -4} + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot i}, -4, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{\left(27 \cdot j\right)} \cdot k\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \mathsf{neg}\left(\color{blue}{27 \cdot \left(j \cdot k\right)}\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      10. *-lowering-*.f6478.8

        \[\leadsto \mathsf{fma}\left(x \cdot i, -4, -27 \cdot \color{blue}{\left(j \cdot k\right)}\right) \]
    7. Applied egg-rr78.8%

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

    if 4.50000000000000012e-116 < t < 1.3e55

    1. Initial program 87.9%

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6463.4

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified63.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-199}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot i, -4, \left(j \cdot k\right) \cdot -27\right)\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 72.1% accurate, 1.4× speedup?

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

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\

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


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

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} - \left(j \cdot 27\right) \cdot k \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      7. *-lowering-*.f64N/A

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

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

      \[\leadsto \color{blue}{t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \cdot t} + \left(\mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right), t, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}, t, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right), t, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right), t, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right), t, \mathsf{neg}\left(\left(j \cdot 27\right) \cdot k\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), t, \mathsf{neg}\left(\color{blue}{\left(27 \cdot j\right)} \cdot k\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), t, \mathsf{neg}\left(\color{blue}{27 \cdot \left(j \cdot k\right)}\right)\right) \]
      10. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), t, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), t, \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right), t, \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      13. *-lowering-*.f6474.1

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

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

    if -1.02e117 < x < 4.20000000000000016e-68

    1. Initial program 93.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6481.3

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

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

    if 4.20000000000000016e-68 < x

    1. Initial program 74.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(y \cdot z, t \cdot 18, i \cdot -4\right), \color{blue}{-27 \cdot \left(j \cdot k\right)}\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

Alternative 16: 71.0% accurate, 1.4× speedup?

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

\mathbf{elif}\;x \leq 3.6 \cdot 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\

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


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

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      8. *-lowering-*.f6472.3

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right) \]
    5. Simplified72.3%

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

    if -1.14999999999999994e117 < x < 3.60000000000000007e-68

    1. Initial program 93.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6481.3

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

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

    if 3.60000000000000007e-68 < x

    1. Initial program 74.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(y \cdot z, t \cdot 18, i \cdot -4\right), \color{blue}{-27 \cdot \left(j \cdot k\right)}\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

Alternative 17: 55.2% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := k \cdot \left(27 \cdot j\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (<= t_1 -1e+136)
     (fma (* k -27.0) j (* c b))
     (if (<= t_1 4e+79)
       (fma t (* a -4.0) (* c b))
       (fma k (* j -27.0) (* c b))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 (t_1 <= -1e+136) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (t_1 <= 4e+79) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else {
		tmp = fma(k, (j * -27.0), (c * b));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(27.0 * j))
	tmp = 0.0
	if (t_1 <= -1e+136)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (t_1 <= 4e+79)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	else
		tmp = fma(k, Float64(j * -27.0), Float64(c * b));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+136], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+79], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000006e136

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified73.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6473.1

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr73.1%

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

    if -1.00000000000000006e136 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999987e79

    1. Initial program 85.5%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6457.3

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6452.8

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified52.8%

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

    if 3.99999999999999987e79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6475.4

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6461.8

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(27 \cdot j\right) \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq 4 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 55.2% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ t_2 := k \cdot \left(27 \cdot j\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (fma k (* j -27.0) (* c b))) (t_2 (* k (* 27.0 j))))
   (if (<= t_2 -1e+136)
     t_1
     (if (<= t_2 4e+79) (fma t (* a -4.0) (* c b)) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 = fma(k, (j * -27.0), (c * b));
	double t_2 = k * (27.0 * j);
	double tmp;
	if (t_2 <= -1e+136) {
		tmp = t_1;
	} else if (t_2 <= 4e+79) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(k, Float64(j * -27.0), Float64(c * b))
	t_2 = Float64(k * Float64(27.0 * j))
	tmp = 0.0
	if (t_2 <= -1e+136)
		tmp = t_1;
	elseif (t_2 <= 4e+79)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+136], t$95$1, If[LessEqual[t$95$2, 4e+79], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\
t_2 := k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000006e136 or 3.99999999999999987e79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 82.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6474.2

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6467.3

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified67.3%

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

    if -1.00000000000000006e136 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999987e79

    1. Initial program 85.5%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6457.3

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6452.8

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified52.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(27 \cdot j\right) \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq 4 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 55.5% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ t_2 := k \cdot \left(27 \cdot j\right)\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+154}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+37}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 (fma k (* j -27.0) (* c b))) (t_2 (* k (* 27.0 j))))
   (if (<= t_2 -2e+154)
     t_1
     (if (<= t_2 2e+37) (fma i (* x -4.0) (* c b)) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 = fma(k, (j * -27.0), (c * b));
	double t_2 = k * (27.0 * j);
	double tmp;
	if (t_2 <= -2e+154) {
		tmp = t_1;
	} else if (t_2 <= 2e+37) {
		tmp = fma(i, (x * -4.0), (c * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(k, Float64(j * -27.0), Float64(c * b))
	t_2 = Float64(k * Float64(27.0 * j))
	tmp = 0.0
	if (t_2 <= -2e+154)
		tmp = t_1;
	elseif (t_2 <= 2e+37)
		tmp = fma(i, Float64(x * -4.0), Float64(c * b));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+154], t$95$1, If[LessEqual[t$95$2, 2e+37], N[(i * N[(x * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\
t_2 := k \cdot \left(27 \cdot j\right)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000007e154 or 1.99999999999999991e37 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 83.9%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6476.3

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6466.2

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified66.2%

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

    if -2.00000000000000007e154 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999991e37

    1. Initial program 84.9%

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6445.2

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified45.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(27 \cdot j\right) \leq -2 \cdot 10^{+154}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \mathbf{elif}\;k \cdot \left(27 \cdot j\right) \leq 2 \cdot 10^{+37}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(k, j \cdot -27, c \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 68.9% accurate, 1.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;x \leq -1.42 \cdot 10^{+119}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-85}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, t\_1\right)\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+208}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, t\_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 -1.42e+119)
     (* t (fma -4.0 a (* 18.0 (* x (* y z)))))
     (if (<= x 6.2e-85)
       (fma b c (fma -4.0 (* t a) t_1))
       (if (<= x 3.3e+208)
         (fma b c (fma -4.0 (* x i) t_1))
         (* x (fma (* y z) (* t 18.0) (* -4.0 i))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 <= -1.42e+119) {
		tmp = t * fma(-4.0, a, (18.0 * (x * (y * z))));
	} else if (x <= 6.2e-85) {
		tmp = fma(b, c, fma(-4.0, (t * a), t_1));
	} else if (x <= 3.3e+208) {
		tmp = fma(b, c, fma(-4.0, (x * i), t_1));
	} else {
		tmp = x * fma((y * z), (t * 18.0), (-4.0 * i));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, 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 (x <= -1.42e+119)
		tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))));
	elseif (x <= 6.2e-85)
		tmp = fma(b, c, fma(-4.0, Float64(t * a), t_1));
	elseif (x <= 3.3e+208)
		tmp = fma(b, c, fma(-4.0, Float64(x * i), t_1));
	else
		tmp = Float64(x * fma(Float64(y * z), Float64(t * 18.0), Float64(-4.0 * i)));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, 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[x, -1.42e+119], N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e-85], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3e+208], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * z), $MachinePrecision] * N[(t * 18.0), $MachinePrecision] + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -1.42 \cdot 10^{+119}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{elif}\;x \leq 6.2 \cdot 10^{-85}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, t\_1\right)\right)\\

\mathbf{elif}\;x \leq 3.3 \cdot 10^{+208}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, t\_1\right)\right)\\

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


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

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      8. *-lowering-*.f6472.3

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right) \]
    5. Simplified72.3%

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

    if -1.4199999999999999e119 < x < 6.2000000000000005e-85

    1. Initial program 93.2%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6480.6

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

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

    if 6.2000000000000005e-85 < x < 3.3e208

    1. Initial program 83.0%

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

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(i \cdot x\right)\right)\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)}\right) \]
      4. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(i \cdot x\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(i \cdot x\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(i \cdot x\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\mathsf{fma}\left(-4, i \cdot x, -27 \cdot \left(j \cdot k\right)\right)}\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, -27 \cdot \left(j \cdot k\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, -27 \cdot \left(j \cdot k\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      16. *-lowering-*.f6470.9

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

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

    if 3.3e208 < x

    1. Initial program 53.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
      2. metadata-evalN/A

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

        \[\leadsto x \cdot \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)} \]
      6. associate-*r*N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(18 \cdot t\right) \cdot \left(y \cdot z\right)} + -4 \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto x \cdot \left(\color{blue}{\left(y \cdot z\right) \cdot \left(18 \cdot t\right)} + -4 \cdot i\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y \cdot z, 18 \cdot t, -4 \cdot i\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(\color{blue}{y \cdot z}, 18 \cdot t, -4 \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot 18}, -4 \cdot i\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot 18}, -4 \cdot i\right) \]
      12. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, \color{blue}{i \cdot -4}\right) \]
      13. *-lowering-*.f6493.3

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.42 \cdot 10^{+119}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-85}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+208}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, j \cdot \left(k \cdot -27\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, -4 \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 49.5% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq 2 \cdot 10^{-217}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

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

\mathbf{elif}\;x \leq 2.05 \cdot 10^{+212}:\\
\;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\

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


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

    1. Initial program 69.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. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right)} \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      7. *-lowering-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      8. *-lowering-*.f6455.1

        \[\leadsto \left(\left(t \cdot 18\right) \cdot \color{blue}{\left(x \cdot y\right)}\right) \cdot z \]
    7. Applied egg-rr55.1%

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

        \[\leadsto \color{blue}{\left(\left(\left(t \cdot 18\right) \cdot x\right) \cdot y\right)} \cdot z \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \left(\color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)} \cdot y\right) \cdot z \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \left(\left(x \cdot \color{blue}{\left(t \cdot 18\right)}\right) \cdot y\right) \cdot z \]
    9. Applied egg-rr59.6%

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

    if -4.9999999999999996e158 < x < 2.00000000000000016e-217

    1. Initial program 91.9%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6478.4

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6457.4

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified57.4%

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

    if 2.00000000000000016e-217 < x < 7.5000000000000004e-37

    1. Initial program 96.9%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6478.6

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6466.0

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified66.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6466.0

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr66.0%

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

    if 7.5000000000000004e-37 < x < 2.04999999999999995e212

    1. Initial program 80.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. Add Preprocessing
    3. Taylor expanded in j around 0

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6464.4

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified64.4%

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

    if 2.04999999999999995e212 < x

    1. Initial program 53.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. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. *-lowering-*.f6459.8

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right)} \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      7. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right)} \cdot y \]
      6. *-commutativeN/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      7. *-lowering-*.f64N/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      8. *-lowering-*.f6465.9

        \[\leadsto \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot 18\right)}\right)\right) \cdot y \]
    9. Applied egg-rr65.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+158}:\\ \;\;\;\;z \cdot \left(y \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-217}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-37}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{+212}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 49.5% accurate, 1.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+158}:\\ \;\;\;\;z \cdot \left(\left(t \cdot 18\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-218}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{-34}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+217}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 -8.8e+158)
   (* z (* (* t 18.0) (* x y)))
   (if (<= x 8e-218)
     (fma t (* a -4.0) (* c b))
     (if (<= x 5.6e-34)
       (fma (* k -27.0) j (* c b))
       (if (<= x 9e+217)
         (fma i (* x -4.0) (* c b))
         (* y (* z (* x (* t 18.0)))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 <= -8.8e+158) {
		tmp = z * ((t * 18.0) * (x * y));
	} else if (x <= 8e-218) {
		tmp = fma(t, (a * -4.0), (c * b));
	} else if (x <= 5.6e-34) {
		tmp = fma((k * -27.0), j, (c * b));
	} else if (x <= 9e+217) {
		tmp = fma(i, (x * -4.0), (c * b));
	} else {
		tmp = y * (z * (x * (t * 18.0)));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (x <= -8.8e+158)
		tmp = Float64(z * Float64(Float64(t * 18.0) * Float64(x * y)));
	elseif (x <= 8e-218)
		tmp = fma(t, Float64(a * -4.0), Float64(c * b));
	elseif (x <= 5.6e-34)
		tmp = fma(Float64(k * -27.0), j, Float64(c * b));
	elseif (x <= 9e+217)
		tmp = fma(i, Float64(x * -4.0), Float64(c * b));
	else
		tmp = Float64(y * Float64(z * Float64(x * Float64(t * 18.0))));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -8.8e+158], N[(z * N[(N[(t * 18.0), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e-218], N[(t * N[(a * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.6e-34], N[(N[(k * -27.0), $MachinePrecision] * j + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e+217], N[(i * N[(x * -4.0), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision], N[(y * N[(z * N[(x * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+158}:\\
\;\;\;\;z \cdot \left(\left(t \cdot 18\right) \cdot \left(x \cdot y\right)\right)\\

\mathbf{elif}\;x \leq 8 \cdot 10^{-218}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

\mathbf{elif}\;x \leq 5.6 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

\mathbf{elif}\;x \leq 9 \cdot 10^{+217}:\\
\;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\

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


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

    1. Initial program 69.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. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right)} \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      7. *-lowering-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      8. *-lowering-*.f6455.1

        \[\leadsto \left(\left(t \cdot 18\right) \cdot \color{blue}{\left(x \cdot y\right)}\right) \cdot z \]
    7. Applied egg-rr55.1%

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

    if -8.8000000000000005e158 < x < 8.0000000000000003e-218

    1. Initial program 91.9%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6478.4

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6457.4

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified57.4%

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

    if 8.0000000000000003e-218 < x < 5.59999999999999994e-34

    1. Initial program 96.9%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6478.6

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6466.0

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified66.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6466.0

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr66.0%

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

    if 5.59999999999999994e-34 < x < 8.99999999999999976e217

    1. Initial program 80.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. Add Preprocessing
    3. Taylor expanded in j around 0

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6464.4

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified64.4%

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

    if 8.99999999999999976e217 < x

    1. Initial program 53.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. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. *-lowering-*.f6459.8

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right)} \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      7. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right)} \cdot y \]
      6. *-commutativeN/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      7. *-lowering-*.f64N/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      8. *-lowering-*.f6465.9

        \[\leadsto \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot 18\right)}\right)\right) \cdot y \]
    9. Applied egg-rr65.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+158}:\\ \;\;\;\;z \cdot \left(\left(t \cdot 18\right) \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-218}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{-34}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+217}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 49.3% accurate, 1.5× speedup?

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

\mathbf{elif}\;x \leq 8.4 \cdot 10^{-218}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\

\mathbf{elif}\;x \leq 1.25 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+213}:\\
\;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\

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


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

    1. Initial program 69.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right) \cdot z} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{z \cdot \left(18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \]
      5. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(z \cdot \left(t \cdot \left(x \cdot y\right)\right)\right) \cdot 18} \]
      7. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(t \cdot \left(x \cdot y\right)\right)\right) \cdot 18} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)} \cdot 18 \]
      9. *-commutativeN/A

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

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(y \cdot t\right)\right)}\right) \cdot 18 \]
      11. *-commutativeN/A

        \[\leadsto \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot y\right)}\right)\right) \cdot 18 \]
      12. *-lowering-*.f64N/A

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

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

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

    if -9.49999999999999913e158 < x < 8.39999999999999976e-218

    1. Initial program 91.9%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6478.4

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-4 \cdot a\right) \cdot t} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -4 \cdot a, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{-4 \cdot a}, b \cdot c\right) \]
      5. *-lowering-*.f6457.4

        \[\leadsto \mathsf{fma}\left(t, -4 \cdot a, \color{blue}{b \cdot c}\right) \]
    8. Simplified57.4%

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

    if 8.39999999999999976e-218 < x < 1.2500000000000001e-34

    1. Initial program 96.9%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6478.6

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} + b \cdot c \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k, -27 \cdot j, b \cdot c\right)} \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(k, \color{blue}{j \cdot -27}, b \cdot c\right) \]
      6. *-lowering-*.f6466.0

        \[\leadsto \mathsf{fma}\left(k, j \cdot -27, \color{blue}{b \cdot c}\right) \]
    8. Simplified66.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k, j \cdot -27, b \cdot c\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto k \cdot \color{blue}{\left(-27 \cdot j\right)} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + b \cdot c \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, b \cdot c\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{k \cdot -27}, j, b \cdot c\right) \]
      5. *-lowering-*.f6466.0

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \color{blue}{b \cdot c}\right) \]
    10. Applied egg-rr66.0%

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

    if 1.2500000000000001e-34 < x < 9.49999999999999993e213

    1. Initial program 80.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. Add Preprocessing
    3. Taylor expanded in j around 0

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6464.4

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified64.4%

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

    if 9.49999999999999993e213 < x

    1. Initial program 53.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. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      4. *-lowering-*.f6459.8

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right) \cdot z} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot t\right) \cdot \left(x \cdot y\right)\right)} \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(t \cdot 18\right)} \cdot \left(x \cdot y\right)\right) \cdot z \]
      7. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right) \cdot y} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(z \cdot \left(\left(t \cdot 18\right) \cdot x\right)\right)} \cdot y \]
      6. *-commutativeN/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      7. *-lowering-*.f64N/A

        \[\leadsto \left(z \cdot \color{blue}{\left(x \cdot \left(t \cdot 18\right)\right)}\right) \cdot y \]
      8. *-lowering-*.f6465.9

        \[\leadsto \left(z \cdot \left(x \cdot \color{blue}{\left(t \cdot 18\right)}\right)\right) \cdot y \]
    9. Applied egg-rr65.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+158}:\\ \;\;\;\;18 \cdot \left(z \cdot \left(x \cdot \left(t \cdot y\right)\right)\right)\\ \mathbf{elif}\;x \leq 8.4 \cdot 10^{-218}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, c \cdot b\right)\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-34}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, c \cdot b\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+213}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 67.3% accurate, 1.7× speedup?

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

\mathbf{elif}\;x \leq 2.1 \cdot 10^{-64}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\

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


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

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto t \cdot \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot a\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto t \cdot \color{blue}{\left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto t \cdot \color{blue}{\mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
      6. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, \color{blue}{18 \cdot \left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right) \]
      8. *-lowering-*.f6472.3

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right) \]
    5. Simplified72.3%

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

    if -8.6000000000000006e118 < x < 2.10000000000000011e-64

    1. Initial program 92.9%

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, c, \mathsf{neg}\left(\left(4 \cdot \left(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. distribute-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)} + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, \color{blue}{-4} \cdot \left(a \cdot t\right) + \left(\mathsf{neg}\left(27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)}\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \left(a \cdot t\right) + \color{blue}{-27} \cdot \left(j \cdot k\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(k \cdot -27\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(-27 \cdot k\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, \color{blue}{j \cdot \left(-27 \cdot k\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, a \cdot t, j \cdot \color{blue}{\left(k \cdot -27\right)}\right)\right) \]
      15. *-lowering-*.f6481.0

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

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

    if 2.10000000000000011e-64 < x

    1. Initial program 74.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate--l-N/A

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

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

        \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
      6. --lowering--.f64N/A

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

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

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
      2. metadata-evalN/A

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

        \[\leadsto x \cdot \color{blue}{\left(-4 \cdot i + 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)} \]
      6. associate-*r*N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(18 \cdot t\right) \cdot \left(y \cdot z\right)} + -4 \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto x \cdot \left(\color{blue}{\left(y \cdot z\right) \cdot \left(18 \cdot t\right)} + -4 \cdot i\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y \cdot z, 18 \cdot t, -4 \cdot i\right)} \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(\color{blue}{y \cdot z}, 18 \cdot t, -4 \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot 18}, -4 \cdot i\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot 18}, -4 \cdot i\right) \]
      12. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, \color{blue}{i \cdot -4}\right) \]
      13. *-lowering-*.f6463.7

        \[\leadsto x \cdot \mathsf{fma}\left(y \cdot z, t \cdot 18, \color{blue}{i \cdot -4}\right) \]
    7. Simplified63.7%

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

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

Alternative 25: 34.2% accurate, 2.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;c \cdot b \leq -7.4 \cdot 10^{+186}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \cdot b \leq 3.4 \cdot 10^{+89}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, 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 b) -7.4e+186)
   (* c b)
   (if (<= (* c b) 3.4e+89) (* -4.0 (* t a)) (* c b))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 * b) <= -7.4e+186) {
		tmp = c * b;
	} else if ((c * b) <= 3.4e+89) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = c * b;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, 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 * b) <= (-7.4d+186)) then
        tmp = c * b
    else if ((c * b) <= 3.4d+89) then
        tmp = (-4.0d0) * (t * a)
    else
        tmp = c * b
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 * b) <= -7.4e+186) {
		tmp = c * b;
	} else if ((c * b) <= 3.4e+89) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = c * b;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (c * b) <= -7.4e+186:
		tmp = c * b
	elif (c * b) <= 3.4e+89:
		tmp = -4.0 * (t * a)
	else:
		tmp = c * b
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (Float64(c * b) <= -7.4e+186)
		tmp = Float64(c * b);
	elseif (Float64(c * b) <= 3.4e+89)
		tmp = Float64(-4.0 * Float64(t * a));
	else
		tmp = Float64(c * b);
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((c * b) <= -7.4e+186)
		tmp = c * b;
	elseif ((c * b) <= 3.4e+89)
		tmp = -4.0 * (t * a);
	else
		tmp = c * b;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, 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[(c * b), $MachinePrecision], -7.4e+186], N[(c * b), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 3.4e+89], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(c * b), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot b \leq -7.4 \cdot 10^{+186}:\\
\;\;\;\;c \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -7.4e186 or 3.4000000000000002e89 < (*.f64 b c)

    1. Initial program 75.0%

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

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6459.1

        \[\leadsto \color{blue}{b \cdot c} \]
    5. Simplified59.1%

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

    if -7.4e186 < (*.f64 b c) < 3.4000000000000002e89

    1. Initial program 89.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. Add Preprocessing
    3. Taylor expanded in a around inf

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot b \leq -7.4 \cdot 10^{+186}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \cdot b \leq 3.4 \cdot 10^{+89}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 43.7% accurate, 3.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.59999999999999997e68

    1. Initial program 84.9%

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

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

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)} \]
      3. metadata-evalN/A

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

        \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-4, i \cdot x, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \color{blue}{x \cdot i}, \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right)}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, x \cdot i, \color{blue}{\left(\mathsf{neg}\left(4 \cdot \left(a \cdot t\right)\right)\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right)}\right) \]
      10. associate-+r+N/A

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + b \cdot c} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot x\right) \cdot -4} + b \cdot c \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{i \cdot \left(x \cdot -4\right)} + b \cdot c \]
      3. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + b \cdot c \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, -4 \cdot x, b \cdot c\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i, \color{blue}{x \cdot -4}, b \cdot c\right) \]
      7. *-lowering-*.f6444.1

        \[\leadsto \mathsf{fma}\left(i, x \cdot -4, \color{blue}{b \cdot c}\right) \]
    8. Simplified44.1%

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

    if 1.59999999999999997e68 < t

    1. Initial program 83.0%

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.6 \cdot 10^{+68}:\\ \;\;\;\;\mathsf{fma}\left(i, x \cdot -4, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 24.0% accurate, 11.3× speedup?

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

    \[\leadsto \color{blue}{b \cdot c} \]
  4. Step-by-step derivation
    1. *-lowering-*.f6424.9

      \[\leadsto \color{blue}{b \cdot c} \]
  5. Simplified24.9%

    \[\leadsto \color{blue}{b \cdot c} \]
  6. Final simplification24.9%

    \[\leadsto c \cdot b \]
  7. Add Preprocessing

Developer Target 1: 89.6% 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 2024198 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))

  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))