ENA, Section 1.4, Exercise 4b, n=5

Percentage Accurate: 87.7% → 98.0%
Time: 7.3s
Alternatives: 11
Speedup: 4.2×

Specification

?
\[\left(-1000000000 \leq x \land x \leq 1000000000\right) \land \left(-1 \leq \varepsilon \land \varepsilon \leq 1\right)\]
\[\begin{array}{l} \\ {\left(x + \varepsilon\right)}^{5} - {x}^{5} \end{array} \]
(FPCore (x eps) :precision binary64 (- (pow (+ x eps) 5.0) (pow x 5.0)))
double code(double x, double eps) {
	return pow((x + eps), 5.0) - pow(x, 5.0);
}
real(8) function code(x, eps)
    real(8), intent (in) :: x
    real(8), intent (in) :: eps
    code = ((x + eps) ** 5.0d0) - (x ** 5.0d0)
end function
public static double code(double x, double eps) {
	return Math.pow((x + eps), 5.0) - Math.pow(x, 5.0);
}
def code(x, eps):
	return math.pow((x + eps), 5.0) - math.pow(x, 5.0)
function code(x, eps)
	return Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0))
end
function tmp = code(x, eps)
	tmp = ((x + eps) ^ 5.0) - (x ^ 5.0);
end
code[x_, eps_] := N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(x + \varepsilon\right)}^{5} - {x}^{5}
\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 11 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: 87.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ {\left(x + \varepsilon\right)}^{5} - {x}^{5} \end{array} \]
(FPCore (x eps) :precision binary64 (- (pow (+ x eps) 5.0) (pow x 5.0)))
double code(double x, double eps) {
	return pow((x + eps), 5.0) - pow(x, 5.0);
}
real(8) function code(x, eps)
    real(8), intent (in) :: x
    real(8), intent (in) :: eps
    code = ((x + eps) ** 5.0d0) - (x ** 5.0d0)
end function
public static double code(double x, double eps) {
	return Math.pow((x + eps), 5.0) - Math.pow(x, 5.0);
}
def code(x, eps):
	return math.pow((x + eps), 5.0) - math.pow(x, 5.0)
function code(x, eps)
	return Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0))
end
function tmp = code(x, eps)
	tmp = ((x + eps) ^ 5.0) - (x ^ 5.0);
end
code[x_, eps_] := N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(x + \varepsilon\right)}^{5} - {x}^{5}
\end{array}

Alternative 1: 98.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-53}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\varepsilon + x\right) \cdot 10, x, \left(5 \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot x, \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
(FPCore (x eps)
 :precision binary64
 (if (<= x -8.2e-53)
   (*
    (fma
     (* (fma (* (+ eps x) 10.0) x (* (* 5.0 eps) eps)) x)
     eps
     (* (pow x 4.0) 5.0))
    eps)
   (if (<= x 5e-60)
     (* (fma (/ x eps) 5.0 1.0) (pow eps 5.0))
     (*
      (fma (* (* x x) eps) 5.0 (* (* (* eps eps) (+ eps x)) 10.0))
      (* x x)))))
double code(double x, double eps) {
	double tmp;
	if (x <= -8.2e-53) {
		tmp = fma((fma(((eps + x) * 10.0), x, ((5.0 * eps) * eps)) * x), eps, (pow(x, 4.0) * 5.0)) * eps;
	} else if (x <= 5e-60) {
		tmp = fma((x / eps), 5.0, 1.0) * pow(eps, 5.0);
	} else {
		tmp = fma(((x * x) * eps), 5.0, (((eps * eps) * (eps + x)) * 10.0)) * (x * x);
	}
	return tmp;
}
function code(x, eps)
	tmp = 0.0
	if (x <= -8.2e-53)
		tmp = Float64(fma(Float64(fma(Float64(Float64(eps + x) * 10.0), x, Float64(Float64(5.0 * eps) * eps)) * x), eps, Float64((x ^ 4.0) * 5.0)) * eps);
	elseif (x <= 5e-60)
		tmp = Float64(fma(Float64(x / eps), 5.0, 1.0) * (eps ^ 5.0));
	else
		tmp = Float64(fma(Float64(Float64(x * x) * eps), 5.0, Float64(Float64(Float64(eps * eps) * Float64(eps + x)) * 10.0)) * Float64(x * x));
	end
	return tmp
end
code[x_, eps_] := If[LessEqual[x, -8.2e-53], N[(N[(N[(N[(N[(N[(eps + x), $MachinePrecision] * 10.0), $MachinePrecision] * x + N[(N[(5.0 * eps), $MachinePrecision] * eps), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * eps + N[(N[Power[x, 4.0], $MachinePrecision] * 5.0), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision], If[LessEqual[x, 5e-60], N[(N[(N[(x / eps), $MachinePrecision] * 5.0 + 1.0), $MachinePrecision] * N[Power[eps, 5.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * eps), $MachinePrecision] * 5.0 + N[(N[(N[(eps * eps), $MachinePrecision] * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\varepsilon + x\right) \cdot 10, x, \left(5 \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot x, \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon\\

\mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\\


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

    1. Initial program 32.2%

      \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
    2. Add Preprocessing
    3. Taylor expanded in eps around 0

      \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + \left(8 \cdot {x}^{2} + \varepsilon \cdot \left(x + 4 \cdot x\right)\right)\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
    4. Applied rewrites95.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(10, x \cdot x, \left(5 \cdot x\right) \cdot \varepsilon\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
    5. Taylor expanded in x around 0

      \[\leadsto \mathsf{fma}\left(x \cdot \left(5 \cdot {\varepsilon}^{2} + x \cdot \left(10 \cdot \varepsilon + 10 \cdot x\right)\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon \]
    6. Step-by-step derivation
      1. Applied rewrites95.0%

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(\varepsilon + x\right) \cdot 10, x, \left(5 \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot x, \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon \]

      if -8.2000000000000001e-53 < x < 5.0000000000000001e-60

      1. Initial program 100.0%

        \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
      2. Add Preprocessing
      3. Taylor expanded in eps around inf

        \[\leadsto \color{blue}{{\varepsilon}^{5} \cdot \left(1 + \left(4 \cdot \frac{x}{\varepsilon} + \frac{x}{\varepsilon}\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(1 + \left(4 \cdot \frac{x}{\varepsilon} + \frac{x}{\varepsilon}\right)\right) \cdot {\varepsilon}^{5}} \]
        2. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(1 + \left(4 \cdot \frac{x}{\varepsilon} + \frac{x}{\varepsilon}\right)\right) \cdot {\varepsilon}^{5}} \]
        3. +-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(4 \cdot \frac{x}{\varepsilon} + \frac{x}{\varepsilon}\right) + 1\right)} \cdot {\varepsilon}^{5} \]
        4. distribute-lft1-inN/A

          \[\leadsto \left(\color{blue}{\left(4 + 1\right) \cdot \frac{x}{\varepsilon}} + 1\right) \cdot {\varepsilon}^{5} \]
        5. metadata-evalN/A

          \[\leadsto \left(\color{blue}{5} \cdot \frac{x}{\varepsilon} + 1\right) \cdot {\varepsilon}^{5} \]
        6. *-commutativeN/A

          \[\leadsto \left(\color{blue}{\frac{x}{\varepsilon} \cdot 5} + 1\right) \cdot {\varepsilon}^{5} \]
        7. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right)} \cdot {\varepsilon}^{5} \]
        8. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{\varepsilon}}, 5, 1\right) \cdot {\varepsilon}^{5} \]
        9. lower-pow.f64100.0

          \[\leadsto \mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot \color{blue}{{\varepsilon}^{5}} \]
      5. Applied rewrites100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}} \]

      if 5.0000000000000001e-60 < x

      1. Initial program 41.4%

        \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
      2. Add Preprocessing
      3. Taylor expanded in eps around 0

        \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
        2. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
      5. Applied rewrites89.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
      6. Taylor expanded in x around 0

        \[\leadsto \left(10 \cdot \left({\varepsilon}^{2} \cdot {x}^{2}\right)\right) \cdot \varepsilon \]
      7. Step-by-step derivation
        1. Applied rewrites25.5%

          \[\leadsto \left(\left(\left(\left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]
        2. Taylor expanded in x around 0

          \[\leadsto {x}^{2} \cdot \color{blue}{\left(10 \cdot {\varepsilon}^{3} + x \cdot \left(5 \cdot \left(\varepsilon \cdot x\right) + 10 \cdot {\varepsilon}^{2}\right)\right)} \]
        3. Step-by-step derivation
          1. Applied rewrites89.9%

            \[\leadsto \mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
        4. Recombined 3 regimes into one program.
        5. Add Preprocessing

        Alternative 2: 98.0% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-53}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
        (FPCore (x eps)
         :precision binary64
         (if (<= x -8.2e-53)
           (* (* (* (fma (* x x) 5.0 (* (* eps (+ eps x)) 10.0)) x) x) eps)
           (if (<= x 5e-60)
             (* (fma (/ x eps) 5.0 1.0) (pow eps 5.0))
             (*
              (fma (* (* x x) eps) 5.0 (* (* (* eps eps) (+ eps x)) 10.0))
              (* x x)))))
        double code(double x, double eps) {
        	double tmp;
        	if (x <= -8.2e-53) {
        		tmp = ((fma((x * x), 5.0, ((eps * (eps + x)) * 10.0)) * x) * x) * eps;
        	} else if (x <= 5e-60) {
        		tmp = fma((x / eps), 5.0, 1.0) * pow(eps, 5.0);
        	} else {
        		tmp = fma(((x * x) * eps), 5.0, (((eps * eps) * (eps + x)) * 10.0)) * (x * x);
        	}
        	return tmp;
        }
        
        function code(x, eps)
        	tmp = 0.0
        	if (x <= -8.2e-53)
        		tmp = Float64(Float64(Float64(fma(Float64(x * x), 5.0, Float64(Float64(eps * Float64(eps + x)) * 10.0)) * x) * x) * eps);
        	elseif (x <= 5e-60)
        		tmp = Float64(fma(Float64(x / eps), 5.0, 1.0) * (eps ^ 5.0));
        	else
        		tmp = Float64(fma(Float64(Float64(x * x) * eps), 5.0, Float64(Float64(Float64(eps * eps) * Float64(eps + x)) * 10.0)) * Float64(x * x));
        	end
        	return tmp
        end
        
        code[x_, eps_] := If[LessEqual[x, -8.2e-53], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0 + N[(N[(eps * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision], If[LessEqual[x, 5e-60], N[(N[(N[(x / eps), $MachinePrecision] * 5.0 + 1.0), $MachinePrecision] * N[Power[eps, 5.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * eps), $MachinePrecision] * 5.0 + N[(N[(N[(eps * eps), $MachinePrecision] * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -8.2 \cdot 10^{-53}:\\
        \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\
        
        \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -8.2000000000000001e-53

          1. Initial program 32.2%

            \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
          2. Add Preprocessing
          3. Taylor expanded in eps around 0

            \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
          5. Applied rewrites94.8%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
          6. Taylor expanded in x around 0

            \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
          7. Step-by-step derivation
            1. Applied rewrites94.9%

              \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]

            if -8.2000000000000001e-53 < x < 5.0000000000000001e-60

            1. Initial program 100.0%

              \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
            2. Add Preprocessing
            3. Taylor expanded in eps around inf

              \[\leadsto \color{blue}{{\varepsilon}^{5} \cdot \left(1 + \left(4 \cdot \frac{x}{\varepsilon} + \frac{x}{\varepsilon}\right)\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(1 + \left(4 \cdot \frac{x}{\varepsilon} + \frac{x}{\varepsilon}\right)\right) \cdot {\varepsilon}^{5}} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(1 + \left(4 \cdot \frac{x}{\varepsilon} + \frac{x}{\varepsilon}\right)\right) \cdot {\varepsilon}^{5}} \]
              3. +-commutativeN/A

                \[\leadsto \color{blue}{\left(\left(4 \cdot \frac{x}{\varepsilon} + \frac{x}{\varepsilon}\right) + 1\right)} \cdot {\varepsilon}^{5} \]
              4. distribute-lft1-inN/A

                \[\leadsto \left(\color{blue}{\left(4 + 1\right) \cdot \frac{x}{\varepsilon}} + 1\right) \cdot {\varepsilon}^{5} \]
              5. metadata-evalN/A

                \[\leadsto \left(\color{blue}{5} \cdot \frac{x}{\varepsilon} + 1\right) \cdot {\varepsilon}^{5} \]
              6. *-commutativeN/A

                \[\leadsto \left(\color{blue}{\frac{x}{\varepsilon} \cdot 5} + 1\right) \cdot {\varepsilon}^{5} \]
              7. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right)} \cdot {\varepsilon}^{5} \]
              8. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{\varepsilon}}, 5, 1\right) \cdot {\varepsilon}^{5} \]
              9. lower-pow.f64100.0

                \[\leadsto \mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot \color{blue}{{\varepsilon}^{5}} \]
            5. Applied rewrites100.0%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}} \]

            if 5.0000000000000001e-60 < x

            1. Initial program 41.4%

              \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
            2. Add Preprocessing
            3. Taylor expanded in eps around 0

              \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
            5. Applied rewrites89.7%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
            6. Taylor expanded in x around 0

              \[\leadsto \left(10 \cdot \left({\varepsilon}^{2} \cdot {x}^{2}\right)\right) \cdot \varepsilon \]
            7. Step-by-step derivation
              1. Applied rewrites25.5%

                \[\leadsto \left(\left(\left(\left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]
              2. Taylor expanded in x around 0

                \[\leadsto {x}^{2} \cdot \color{blue}{\left(10 \cdot {\varepsilon}^{3} + x \cdot \left(5 \cdot \left(\varepsilon \cdot x\right) + 10 \cdot {\varepsilon}^{2}\right)\right)} \]
              3. Step-by-step derivation
                1. Applied rewrites89.9%

                  \[\leadsto \mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
              4. Recombined 3 regimes into one program.
              5. Add Preprocessing

              Alternative 3: 98.0% accurate, 1.8× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{-53}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\ \;\;\;\;{\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
              (FPCore (x eps)
               :precision binary64
               (if (<= x -8e-53)
                 (* (* (* (fma (* x x) 5.0 (* (* eps (+ eps x)) 10.0)) x) x) eps)
                 (if (<= x 5e-60)
                   (pow eps 5.0)
                   (*
                    (fma (* (* x x) eps) 5.0 (* (* (* eps eps) (+ eps x)) 10.0))
                    (* x x)))))
              double code(double x, double eps) {
              	double tmp;
              	if (x <= -8e-53) {
              		tmp = ((fma((x * x), 5.0, ((eps * (eps + x)) * 10.0)) * x) * x) * eps;
              	} else if (x <= 5e-60) {
              		tmp = pow(eps, 5.0);
              	} else {
              		tmp = fma(((x * x) * eps), 5.0, (((eps * eps) * (eps + x)) * 10.0)) * (x * x);
              	}
              	return tmp;
              }
              
              function code(x, eps)
              	tmp = 0.0
              	if (x <= -8e-53)
              		tmp = Float64(Float64(Float64(fma(Float64(x * x), 5.0, Float64(Float64(eps * Float64(eps + x)) * 10.0)) * x) * x) * eps);
              	elseif (x <= 5e-60)
              		tmp = eps ^ 5.0;
              	else
              		tmp = Float64(fma(Float64(Float64(x * x) * eps), 5.0, Float64(Float64(Float64(eps * eps) * Float64(eps + x)) * 10.0)) * Float64(x * x));
              	end
              	return tmp
              end
              
              code[x_, eps_] := If[LessEqual[x, -8e-53], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0 + N[(N[(eps * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision], If[LessEqual[x, 5e-60], N[Power[eps, 5.0], $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * eps), $MachinePrecision] * 5.0 + N[(N[(N[(eps * eps), $MachinePrecision] * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;x \leq -8 \cdot 10^{-53}:\\
              \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\
              
              \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\
              \;\;\;\;{\varepsilon}^{5}\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if x < -8.00000000000000025e-53

                1. Initial program 32.2%

                  \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                2. Add Preprocessing
                3. Taylor expanded in eps around 0

                  \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                5. Applied rewrites94.8%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                6. Taylor expanded in x around 0

                  \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                7. Step-by-step derivation
                  1. Applied rewrites94.9%

                    \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]

                  if -8.00000000000000025e-53 < x < 5.0000000000000001e-60

                  1. Initial program 100.0%

                    \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around 0

                    \[\leadsto \color{blue}{{\varepsilon}^{5}} \]
                  4. Step-by-step derivation
                    1. lower-pow.f64100.0

                      \[\leadsto \color{blue}{{\varepsilon}^{5}} \]
                  5. Applied rewrites100.0%

                    \[\leadsto \color{blue}{{\varepsilon}^{5}} \]

                  if 5.0000000000000001e-60 < x

                  1. Initial program 41.4%

                    \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                  2. Add Preprocessing
                  3. Taylor expanded in eps around 0

                    \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                  5. Applied rewrites89.7%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                  6. Taylor expanded in x around 0

                    \[\leadsto \left(10 \cdot \left({\varepsilon}^{2} \cdot {x}^{2}\right)\right) \cdot \varepsilon \]
                  7. Step-by-step derivation
                    1. Applied rewrites25.5%

                      \[\leadsto \left(\left(\left(\left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]
                    2. Taylor expanded in x around 0

                      \[\leadsto {x}^{2} \cdot \color{blue}{\left(10 \cdot {\varepsilon}^{3} + x \cdot \left(5 \cdot \left(\varepsilon \cdot x\right) + 10 \cdot {\varepsilon}^{2}\right)\right)} \]
                    3. Step-by-step derivation
                      1. Applied rewrites89.9%

                        \[\leadsto \mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
                    4. Recombined 3 regimes into one program.
                    5. Add Preprocessing

                    Alternative 4: 97.9% accurate, 3.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-53}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
                    (FPCore (x eps)
                     :precision binary64
                     (if (<= x -8.2e-53)
                       (* (* (* (fma (* x x) 5.0 (* (* eps (+ eps x)) 10.0)) x) x) eps)
                       (if (<= x 5e-60)
                         (* (* (* (fma (fma x 5.0 eps) eps (* (* 10.0 x) x)) eps) eps) eps)
                         (*
                          (fma (* (* x x) eps) 5.0 (* (* (* eps eps) (+ eps x)) 10.0))
                          (* x x)))))
                    double code(double x, double eps) {
                    	double tmp;
                    	if (x <= -8.2e-53) {
                    		tmp = ((fma((x * x), 5.0, ((eps * (eps + x)) * 10.0)) * x) * x) * eps;
                    	} else if (x <= 5e-60) {
                    		tmp = ((fma(fma(x, 5.0, eps), eps, ((10.0 * x) * x)) * eps) * eps) * eps;
                    	} else {
                    		tmp = fma(((x * x) * eps), 5.0, (((eps * eps) * (eps + x)) * 10.0)) * (x * x);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, eps)
                    	tmp = 0.0
                    	if (x <= -8.2e-53)
                    		tmp = Float64(Float64(Float64(fma(Float64(x * x), 5.0, Float64(Float64(eps * Float64(eps + x)) * 10.0)) * x) * x) * eps);
                    	elseif (x <= 5e-60)
                    		tmp = Float64(Float64(Float64(fma(fma(x, 5.0, eps), eps, Float64(Float64(10.0 * x) * x)) * eps) * eps) * eps);
                    	else
                    		tmp = Float64(fma(Float64(Float64(x * x) * eps), 5.0, Float64(Float64(Float64(eps * eps) * Float64(eps + x)) * 10.0)) * Float64(x * x));
                    	end
                    	return tmp
                    end
                    
                    code[x_, eps_] := If[LessEqual[x, -8.2e-53], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0 + N[(N[(eps * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision], If[LessEqual[x, 5e-60], N[(N[(N[(N[(N[(x * 5.0 + eps), $MachinePrecision] * eps + N[(N[(10.0 * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * eps), $MachinePrecision] * 5.0 + N[(N[(N[(eps * eps), $MachinePrecision] * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \leq -8.2 \cdot 10^{-53}:\\
                    \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\
                    
                    \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\
                    \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if x < -8.2000000000000001e-53

                      1. Initial program 32.2%

                        \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                      2. Add Preprocessing
                      3. Taylor expanded in eps around 0

                        \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                        2. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                      5. Applied rewrites94.8%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                      6. Taylor expanded in x around 0

                        \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                      7. Step-by-step derivation
                        1. Applied rewrites94.9%

                          \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]

                        if -8.2000000000000001e-53 < x < 5.0000000000000001e-60

                        1. Initial program 100.0%

                          \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                        2. Add Preprocessing
                        3. Taylor expanded in eps around -inf

                          \[\leadsto \color{blue}{-1 \cdot \left({\varepsilon}^{5} \cdot \left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                        4. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \color{blue}{\mathsf{neg}\left({\varepsilon}^{5} \cdot \left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                          2. *-commutativeN/A

                            \[\leadsto \mathsf{neg}\left(\color{blue}{\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right) \cdot {\varepsilon}^{5}}\right) \]
                          3. distribute-lft-neg-inN/A

                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)\right) \cdot {\varepsilon}^{5}} \]
                          4. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)\right) \cdot {\varepsilon}^{5}} \]
                        5. Applied rewrites93.7%

                          \[\leadsto \color{blue}{\left(-\left(\frac{\mathsf{fma}\left(5, x, \frac{-10 \cdot \left(x \cdot x\right)}{-\varepsilon}\right)}{-\varepsilon} - 1\right)\right) \cdot {\varepsilon}^{5}} \]
                        6. Taylor expanded in x around 0

                          \[\leadsto x \cdot \left(5 \cdot {\varepsilon}^{4} + 10 \cdot \left({\varepsilon}^{3} \cdot x\right)\right) + \color{blue}{{\varepsilon}^{5}} \]
                        7. Step-by-step derivation
                          1. Applied rewrites99.9%

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \color{blue}{{\varepsilon}^{3}} \]
                          2. Step-by-step derivation
                            1. Applied rewrites99.8%

                              \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \varepsilon \]
                            2. Step-by-step derivation
                              1. Applied rewrites99.9%

                                \[\leadsto \left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]

                              if 5.0000000000000001e-60 < x

                              1. Initial program 41.4%

                                \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                              2. Add Preprocessing
                              3. Taylor expanded in eps around 0

                                \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                              4. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                              5. Applied rewrites89.7%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                              6. Taylor expanded in x around 0

                                \[\leadsto \left(10 \cdot \left({\varepsilon}^{2} \cdot {x}^{2}\right)\right) \cdot \varepsilon \]
                              7. Step-by-step derivation
                                1. Applied rewrites25.5%

                                  \[\leadsto \left(\left(\left(\left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto {x}^{2} \cdot \color{blue}{\left(10 \cdot {\varepsilon}^{3} + x \cdot \left(5 \cdot \left(\varepsilon \cdot x\right) + 10 \cdot {\varepsilon}^{2}\right)\right)} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites89.9%

                                    \[\leadsto \mathsf{fma}\left(\left(x \cdot x\right) \cdot \varepsilon, 5, \left(\left(\varepsilon \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
                                4. Recombined 3 regimes into one program.
                                5. Add Preprocessing

                                Alternative 5: 97.9% accurate, 4.0× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-53} \lor \neg \left(x \leq 5 \cdot 10^{-60}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \end{array} \end{array} \]
                                (FPCore (x eps)
                                 :precision binary64
                                 (if (or (<= x -8.2e-53) (not (<= x 5e-60)))
                                   (* (* (* (fma (* x x) 5.0 (* (* eps (+ eps x)) 10.0)) x) x) eps)
                                   (* (* (* (fma (fma x 5.0 eps) eps (* (* 10.0 x) x)) eps) eps) eps)))
                                double code(double x, double eps) {
                                	double tmp;
                                	if ((x <= -8.2e-53) || !(x <= 5e-60)) {
                                		tmp = ((fma((x * x), 5.0, ((eps * (eps + x)) * 10.0)) * x) * x) * eps;
                                	} else {
                                		tmp = ((fma(fma(x, 5.0, eps), eps, ((10.0 * x) * x)) * eps) * eps) * eps;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, eps)
                                	tmp = 0.0
                                	if ((x <= -8.2e-53) || !(x <= 5e-60))
                                		tmp = Float64(Float64(Float64(fma(Float64(x * x), 5.0, Float64(Float64(eps * Float64(eps + x)) * 10.0)) * x) * x) * eps);
                                	else
                                		tmp = Float64(Float64(Float64(fma(fma(x, 5.0, eps), eps, Float64(Float64(10.0 * x) * x)) * eps) * eps) * eps);
                                	end
                                	return tmp
                                end
                                
                                code[x_, eps_] := If[Or[LessEqual[x, -8.2e-53], N[Not[LessEqual[x, 5e-60]], $MachinePrecision]], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0 + N[(N[(eps * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision], N[(N[(N[(N[(N[(x * 5.0 + eps), $MachinePrecision] * eps + N[(N[(10.0 * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;x \leq -8.2 \cdot 10^{-53} \lor \neg \left(x \leq 5 \cdot 10^{-60}\right):\\
                                \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if x < -8.2000000000000001e-53 or 5.0000000000000001e-60 < x

                                  1. Initial program 35.6%

                                    \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in eps around 0

                                    \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                    2. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                  5. Applied rewrites92.9%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                                  6. Taylor expanded in x around 0

                                    \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites93.0%

                                      \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]

                                    if -8.2000000000000001e-53 < x < 5.0000000000000001e-60

                                    1. Initial program 100.0%

                                      \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in eps around -inf

                                      \[\leadsto \color{blue}{-1 \cdot \left({\varepsilon}^{5} \cdot \left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                    4. Step-by-step derivation
                                      1. mul-1-negN/A

                                        \[\leadsto \color{blue}{\mathsf{neg}\left({\varepsilon}^{5} \cdot \left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                      2. *-commutativeN/A

                                        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right) \cdot {\varepsilon}^{5}}\right) \]
                                      3. distribute-lft-neg-inN/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)\right) \cdot {\varepsilon}^{5}} \]
                                      4. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)\right) \cdot {\varepsilon}^{5}} \]
                                    5. Applied rewrites93.7%

                                      \[\leadsto \color{blue}{\left(-\left(\frac{\mathsf{fma}\left(5, x, \frac{-10 \cdot \left(x \cdot x\right)}{-\varepsilon}\right)}{-\varepsilon} - 1\right)\right) \cdot {\varepsilon}^{5}} \]
                                    6. Taylor expanded in x around 0

                                      \[\leadsto x \cdot \left(5 \cdot {\varepsilon}^{4} + 10 \cdot \left({\varepsilon}^{3} \cdot x\right)\right) + \color{blue}{{\varepsilon}^{5}} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites99.9%

                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \color{blue}{{\varepsilon}^{3}} \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites99.8%

                                          \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \varepsilon \]
                                        2. Step-by-step derivation
                                          1. Applied rewrites99.9%

                                            \[\leadsto \left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]
                                        3. Recombined 2 regimes into one program.
                                        4. Final simplification98.6%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-53} \lor \neg \left(x \leq 5 \cdot 10^{-60}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \end{array} \]
                                        5. Add Preprocessing

                                        Alternative 6: 97.9% accurate, 4.0× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right)\\ \mathbf{if}\;x \leq -8.2 \cdot 10^{-53}:\\ \;\;\;\;\left(\left(t\_0 \cdot x\right) \cdot x\right) \cdot \varepsilon\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\\ \end{array} \end{array} \]
                                        (FPCore (x eps)
                                         :precision binary64
                                         (let* ((t_0 (fma (* x x) 5.0 (* (* eps (+ eps x)) 10.0))))
                                           (if (<= x -8.2e-53)
                                             (* (* (* t_0 x) x) eps)
                                             (if (<= x 5e-60)
                                               (* (* (* (fma (fma x 5.0 eps) eps (* (* 10.0 x) x)) eps) eps) eps)
                                               (* (* t_0 (* x x)) eps)))))
                                        double code(double x, double eps) {
                                        	double t_0 = fma((x * x), 5.0, ((eps * (eps + x)) * 10.0));
                                        	double tmp;
                                        	if (x <= -8.2e-53) {
                                        		tmp = ((t_0 * x) * x) * eps;
                                        	} else if (x <= 5e-60) {
                                        		tmp = ((fma(fma(x, 5.0, eps), eps, ((10.0 * x) * x)) * eps) * eps) * eps;
                                        	} else {
                                        		tmp = (t_0 * (x * x)) * eps;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(x, eps)
                                        	t_0 = fma(Float64(x * x), 5.0, Float64(Float64(eps * Float64(eps + x)) * 10.0))
                                        	tmp = 0.0
                                        	if (x <= -8.2e-53)
                                        		tmp = Float64(Float64(Float64(t_0 * x) * x) * eps);
                                        	elseif (x <= 5e-60)
                                        		tmp = Float64(Float64(Float64(fma(fma(x, 5.0, eps), eps, Float64(Float64(10.0 * x) * x)) * eps) * eps) * eps);
                                        	else
                                        		tmp = Float64(Float64(t_0 * Float64(x * x)) * eps);
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[x_, eps_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * 5.0 + N[(N[(eps * N[(eps + x), $MachinePrecision]), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e-53], N[(N[(N[(t$95$0 * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision], If[LessEqual[x, 5e-60], N[(N[(N[(N[(N[(x * 5.0 + eps), $MachinePrecision] * eps + N[(N[(10.0 * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision], N[(N[(t$95$0 * N[(x * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_0 := \mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right)\\
                                        \mathbf{if}\;x \leq -8.2 \cdot 10^{-53}:\\
                                        \;\;\;\;\left(\left(t\_0 \cdot x\right) \cdot x\right) \cdot \varepsilon\\
                                        
                                        \mathbf{elif}\;x \leq 5 \cdot 10^{-60}:\\
                                        \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\left(t\_0 \cdot \left(x \cdot x\right)\right) \cdot \varepsilon\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if x < -8.2000000000000001e-53

                                          1. Initial program 32.2%

                                            \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in eps around 0

                                            \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                                          4. Step-by-step derivation
                                            1. *-commutativeN/A

                                              \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                            2. lower-*.f64N/A

                                              \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                          5. Applied rewrites94.8%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                                          6. Taylor expanded in x around 0

                                            \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites94.9%

                                              \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]

                                            if -8.2000000000000001e-53 < x < 5.0000000000000001e-60

                                            1. Initial program 100.0%

                                              \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in eps around -inf

                                              \[\leadsto \color{blue}{-1 \cdot \left({\varepsilon}^{5} \cdot \left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                            4. Step-by-step derivation
                                              1. mul-1-negN/A

                                                \[\leadsto \color{blue}{\mathsf{neg}\left({\varepsilon}^{5} \cdot \left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                              2. *-commutativeN/A

                                                \[\leadsto \mathsf{neg}\left(\color{blue}{\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right) \cdot {\varepsilon}^{5}}\right) \]
                                              3. distribute-lft-neg-inN/A

                                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)\right) \cdot {\varepsilon}^{5}} \]
                                              4. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)\right) \cdot {\varepsilon}^{5}} \]
                                            5. Applied rewrites93.7%

                                              \[\leadsto \color{blue}{\left(-\left(\frac{\mathsf{fma}\left(5, x, \frac{-10 \cdot \left(x \cdot x\right)}{-\varepsilon}\right)}{-\varepsilon} - 1\right)\right) \cdot {\varepsilon}^{5}} \]
                                            6. Taylor expanded in x around 0

                                              \[\leadsto x \cdot \left(5 \cdot {\varepsilon}^{4} + 10 \cdot \left({\varepsilon}^{3} \cdot x\right)\right) + \color{blue}{{\varepsilon}^{5}} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites99.9%

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \color{blue}{{\varepsilon}^{3}} \]
                                              2. Step-by-step derivation
                                                1. Applied rewrites99.8%

                                                  \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \varepsilon \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites99.9%

                                                    \[\leadsto \left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]

                                                  if 5.0000000000000001e-60 < x

                                                  1. Initial program 41.4%

                                                    \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in eps around 0

                                                    \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                                                  4. Step-by-step derivation
                                                    1. *-commutativeN/A

                                                      \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                    2. lower-*.f64N/A

                                                      \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                  5. Applied rewrites89.7%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                                                  6. Taylor expanded in x around 0

                                                    \[\leadsto \left(10 \cdot \left({\varepsilon}^{2} \cdot {x}^{2}\right)\right) \cdot \varepsilon \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites25.5%

                                                      \[\leadsto \left(\left(\left(\left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]
                                                    2. Taylor expanded in x around 0

                                                      \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites89.7%

                                                        \[\leadsto \left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot \left(x \cdot x\right)\right) \cdot \varepsilon \]
                                                    4. Recombined 3 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 7: 97.8% accurate, 4.2× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-53} \lor \neg \left(x \leq 5 \cdot 10^{-60}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot x\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \end{array} \end{array} \]
                                                    (FPCore (x eps)
                                                     :precision binary64
                                                     (if (or (<= x -8.2e-53) (not (<= x 5e-60)))
                                                       (* (* (* (fma (* x x) 5.0 (* (* eps x) 10.0)) x) x) eps)
                                                       (* (* (* (fma (fma x 5.0 eps) eps (* (* 10.0 x) x)) eps) eps) eps)))
                                                    double code(double x, double eps) {
                                                    	double tmp;
                                                    	if ((x <= -8.2e-53) || !(x <= 5e-60)) {
                                                    		tmp = ((fma((x * x), 5.0, ((eps * x) * 10.0)) * x) * x) * eps;
                                                    	} else {
                                                    		tmp = ((fma(fma(x, 5.0, eps), eps, ((10.0 * x) * x)) * eps) * eps) * eps;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    function code(x, eps)
                                                    	tmp = 0.0
                                                    	if ((x <= -8.2e-53) || !(x <= 5e-60))
                                                    		tmp = Float64(Float64(Float64(fma(Float64(x * x), 5.0, Float64(Float64(eps * x) * 10.0)) * x) * x) * eps);
                                                    	else
                                                    		tmp = Float64(Float64(Float64(fma(fma(x, 5.0, eps), eps, Float64(Float64(10.0 * x) * x)) * eps) * eps) * eps);
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[x_, eps_] := If[Or[LessEqual[x, -8.2e-53], N[Not[LessEqual[x, 5e-60]], $MachinePrecision]], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0 + N[(N[(eps * x), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision], N[(N[(N[(N[(N[(x * 5.0 + eps), $MachinePrecision] * eps + N[(N[(10.0 * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;x \leq -8.2 \cdot 10^{-53} \lor \neg \left(x \leq 5 \cdot 10^{-60}\right):\\
                                                    \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot x\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if x < -8.2000000000000001e-53 or 5.0000000000000001e-60 < x

                                                      1. Initial program 35.6%

                                                        \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in eps around 0

                                                        \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                                                      4. Step-by-step derivation
                                                        1. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                      5. Applied rewrites92.9%

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                                                      6. Taylor expanded in x around 0

                                                        \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites93.0%

                                                          \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                        2. Taylor expanded in x around inf

                                                          \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, 10 \cdot \left(\varepsilon \cdot x\right)\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites91.6%

                                                            \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot x\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]

                                                          if -8.2000000000000001e-53 < x < 5.0000000000000001e-60

                                                          1. Initial program 100.0%

                                                            \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in eps around -inf

                                                            \[\leadsto \color{blue}{-1 \cdot \left({\varepsilon}^{5} \cdot \left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                                          4. Step-by-step derivation
                                                            1. mul-1-negN/A

                                                              \[\leadsto \color{blue}{\mathsf{neg}\left({\varepsilon}^{5} \cdot \left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                                            2. *-commutativeN/A

                                                              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right) \cdot {\varepsilon}^{5}}\right) \]
                                                            3. distribute-lft-neg-inN/A

                                                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)\right) \cdot {\varepsilon}^{5}} \]
                                                            4. lower-*.f64N/A

                                                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \frac{x + \left(-1 \cdot \frac{-4 \cdot {x}^{2} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)\right) \cdot {\varepsilon}^{5}} \]
                                                          5. Applied rewrites93.7%

                                                            \[\leadsto \color{blue}{\left(-\left(\frac{\mathsf{fma}\left(5, x, \frac{-10 \cdot \left(x \cdot x\right)}{-\varepsilon}\right)}{-\varepsilon} - 1\right)\right) \cdot {\varepsilon}^{5}} \]
                                                          6. Taylor expanded in x around 0

                                                            \[\leadsto x \cdot \left(5 \cdot {\varepsilon}^{4} + 10 \cdot \left({\varepsilon}^{3} \cdot x\right)\right) + \color{blue}{{\varepsilon}^{5}} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites99.9%

                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \color{blue}{{\varepsilon}^{3}} \]
                                                            2. Step-by-step derivation
                                                              1. Applied rewrites99.8%

                                                                \[\leadsto \left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \varepsilon \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites99.9%

                                                                  \[\leadsto \left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]
                                                              3. Recombined 2 regimes into one program.
                                                              4. Final simplification98.3%

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-53} \lor \neg \left(x \leq 5 \cdot 10^{-60}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot x\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \end{array} \]
                                                              5. Add Preprocessing

                                                              Alternative 8: 83.2% accurate, 5.6× speedup?

                                                              \[\begin{array}{l} \\ \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot x\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \end{array} \]
                                                              (FPCore (x eps)
                                                               :precision binary64
                                                               (* (* (* (fma (* x x) 5.0 (* (* eps x) 10.0)) x) x) eps))
                                                              double code(double x, double eps) {
                                                              	return ((fma((x * x), 5.0, ((eps * x) * 10.0)) * x) * x) * eps;
                                                              }
                                                              
                                                              function code(x, eps)
                                                              	return Float64(Float64(Float64(fma(Float64(x * x), 5.0, Float64(Float64(eps * x) * 10.0)) * x) * x) * eps)
                                                              end
                                                              
                                                              code[x_, eps_] := N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0 + N[(N[(eps * x), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot x\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Initial program 87.7%

                                                                \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in eps around 0

                                                                \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                                                              4. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                                2. lower-*.f64N/A

                                                                  \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                              5. Applied rewrites84.2%

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                                                              6. Taylor expanded in x around 0

                                                                \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites84.3%

                                                                  \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                2. Taylor expanded in x around inf

                                                                  \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, 10 \cdot \left(\varepsilon \cdot x\right)\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites83.9%

                                                                    \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot x\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                  2. Add Preprocessing

                                                                  Alternative 9: 83.2% accurate, 6.5× speedup?

                                                                  \[\begin{array}{l} \\ \left(\left(\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \end{array} \]
                                                                  (FPCore (x eps)
                                                                   :precision binary64
                                                                   (* (* (* (* (fma 10.0 eps (* 5.0 x)) x) x) x) eps))
                                                                  double code(double x, double eps) {
                                                                  	return (((fma(10.0, eps, (5.0 * x)) * x) * x) * x) * eps;
                                                                  }
                                                                  
                                                                  function code(x, eps)
                                                                  	return Float64(Float64(Float64(Float64(fma(10.0, eps, Float64(5.0 * x)) * x) * x) * x) * eps)
                                                                  end
                                                                  
                                                                  code[x_, eps_] := N[(N[(N[(N[(N[(10.0 * eps + N[(5.0 * x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \left(\left(\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot \varepsilon
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Initial program 87.7%

                                                                    \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in eps around 0

                                                                    \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                                                                  4. Step-by-step derivation
                                                                    1. *-commutativeN/A

                                                                      \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                                    2. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                                  5. Applied rewrites84.2%

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                                                                  6. Taylor expanded in x around 0

                                                                    \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites84.3%

                                                                      \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                    2. Taylor expanded in eps around 0

                                                                      \[\leadsto \left(\left(\left(5 \cdot {x}^{2} + 10 \cdot \left(\varepsilon \cdot x\right)\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites83.9%

                                                                        \[\leadsto \left(\left(\left(\mathsf{fma}\left(10, \varepsilon, 5 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                      2. Add Preprocessing

                                                                      Alternative 10: 83.0% accurate, 8.0× speedup?

                                                                      \[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \end{array} \]
                                                                      (FPCore (x eps) :precision binary64 (* (* (* (* (* x x) 5.0) x) x) eps))
                                                                      double code(double x, double eps) {
                                                                      	return ((((x * x) * 5.0) * x) * x) * eps;
                                                                      }
                                                                      
                                                                      real(8) function code(x, eps)
                                                                          real(8), intent (in) :: x
                                                                          real(8), intent (in) :: eps
                                                                          code = ((((x * x) * 5.0d0) * x) * x) * eps
                                                                      end function
                                                                      
                                                                      public static double code(double x, double eps) {
                                                                      	return ((((x * x) * 5.0) * x) * x) * eps;
                                                                      }
                                                                      
                                                                      def code(x, eps):
                                                                      	return ((((x * x) * 5.0) * x) * x) * eps
                                                                      
                                                                      function code(x, eps)
                                                                      	return Float64(Float64(Float64(Float64(Float64(x * x) * 5.0) * x) * x) * eps)
                                                                      end
                                                                      
                                                                      function tmp = code(x, eps)
                                                                      	tmp = ((((x * x) * 5.0) * x) * x) * eps;
                                                                      end
                                                                      
                                                                      code[x_, eps_] := N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 5.0), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * eps), $MachinePrecision]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \left(\left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot x\right) \cdot x\right) \cdot \varepsilon
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Initial program 87.7%

                                                                        \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in eps around 0

                                                                        \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                                                                      4. Step-by-step derivation
                                                                        1. *-commutativeN/A

                                                                          \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                                      5. Applied rewrites84.2%

                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                                                                      6. Taylor expanded in x around 0

                                                                        \[\leadsto \left({x}^{2} \cdot \left(10 \cdot {\varepsilon}^{2} + x \cdot \left(5 \cdot x + 10 \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites84.3%

                                                                          \[\leadsto \left(\left(\mathsf{fma}\left(x \cdot x, 5, \left(\varepsilon \cdot \left(\varepsilon + x\right)\right) \cdot 10\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                        2. Taylor expanded in x around inf

                                                                          \[\leadsto \left(\left(\left(5 \cdot {x}^{2}\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites83.5%

                                                                            \[\leadsto \left(\left(\left(\left(x \cdot x\right) \cdot 5\right) \cdot x\right) \cdot x\right) \cdot \varepsilon \]
                                                                          2. Add Preprocessing

                                                                          Alternative 11: 70.8% accurate, 8.0× speedup?

                                                                          \[\begin{array}{l} \\ \left(\left(x \cdot x\right) \cdot \left(10 \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \end{array} \]
                                                                          (FPCore (x eps) :precision binary64 (* (* (* x x) (* 10.0 (* eps eps))) eps))
                                                                          double code(double x, double eps) {
                                                                          	return ((x * x) * (10.0 * (eps * eps))) * eps;
                                                                          }
                                                                          
                                                                          real(8) function code(x, eps)
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: eps
                                                                              code = ((x * x) * (10.0d0 * (eps * eps))) * eps
                                                                          end function
                                                                          
                                                                          public static double code(double x, double eps) {
                                                                          	return ((x * x) * (10.0 * (eps * eps))) * eps;
                                                                          }
                                                                          
                                                                          def code(x, eps):
                                                                          	return ((x * x) * (10.0 * (eps * eps))) * eps
                                                                          
                                                                          function code(x, eps)
                                                                          	return Float64(Float64(Float64(x * x) * Float64(10.0 * Float64(eps * eps))) * eps)
                                                                          end
                                                                          
                                                                          function tmp = code(x, eps)
                                                                          	tmp = ((x * x) * (10.0 * (eps * eps))) * eps;
                                                                          end
                                                                          
                                                                          code[x_, eps_] := N[(N[(N[(x * x), $MachinePrecision] * N[(10.0 * N[(eps * eps), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \left(\left(x \cdot x\right) \cdot \left(10 \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) \cdot \varepsilon
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Initial program 87.7%

                                                                            \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                                                          2. Add Preprocessing
                                                                          3. Taylor expanded in eps around 0

                                                                            \[\leadsto \color{blue}{\varepsilon \cdot \left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right)} \]
                                                                          4. Step-by-step derivation
                                                                            1. *-commutativeN/A

                                                                              \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                                            2. lower-*.f64N/A

                                                                              \[\leadsto \color{blue}{\left(4 \cdot {x}^{4} + \left(\varepsilon \cdot \left(4 \cdot {x}^{3} + \left(\varepsilon \cdot \left(2 \cdot {x}^{2} + 8 \cdot {x}^{2}\right) + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)\right)\right) + {x}^{4}\right)\right) \cdot \varepsilon} \]
                                                                          5. Applied rewrites84.2%

                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), \varepsilon, {x}^{3} \cdot 10\right), \varepsilon, {x}^{4} \cdot 5\right) \cdot \varepsilon} \]
                                                                          6. Taylor expanded in x around 0

                                                                            \[\leadsto \left(10 \cdot \left({\varepsilon}^{2} \cdot {x}^{2}\right)\right) \cdot \varepsilon \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites71.1%

                                                                              \[\leadsto \left(\left(\left(\left(10 \cdot x\right) \cdot x\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \]
                                                                            2. Step-by-step derivation
                                                                              1. Applied rewrites71.1%

                                                                                \[\leadsto \left(\left(x \cdot x\right) \cdot \left(10 \cdot \left(\varepsilon \cdot \varepsilon\right)\right)\right) \cdot \varepsilon \]
                                                                              2. Add Preprocessing

                                                                              Reproduce

                                                                              ?
                                                                              herbie shell --seed 2024343 
                                                                              (FPCore (x eps)
                                                                                :name "ENA, Section 1.4, Exercise 4b, n=5"
                                                                                :precision binary64
                                                                                :pre (and (and (<= -1000000000.0 x) (<= x 1000000000.0)) (and (<= -1.0 eps) (<= eps 1.0)))
                                                                                (- (pow (+ x eps) 5.0) (pow x 5.0)))