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

Percentage Accurate: 88.6% → 99.5%
Time: 9.4s
Alternatives: 14
Speedup: 0.5×

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 14 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: 88.6% 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: 99.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\varepsilon + x\right)}^{5}\\ t_1 := t\_0 - {x}^{5}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\mathsf{fma}\left(\left(-x\right) \cdot {x}^{3}, x, t\_0\right)\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(10, \frac{\varepsilon \cdot \varepsilon}{x}, 4 \cdot \varepsilon\right), {x}^{4}, {x}^{4} \cdot \varepsilon\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 - \left(x \cdot x\right) \cdot {x}^{3}\\ \end{array} \end{array} \]
(FPCore (x eps)
 :precision binary64
 (let* ((t_0 (pow (+ eps x) 5.0)) (t_1 (- t_0 (pow x 5.0))))
   (if (<= t_1 -1e-321)
     (fma (* (- x) (pow x 3.0)) x t_0)
     (if (<= t_1 0.0)
       (fma
        (fma 10.0 (/ (* eps eps) x) (* 4.0 eps))
        (pow x 4.0)
        (* (pow x 4.0) eps))
       (- t_0 (* (* x x) (pow x 3.0)))))))
double code(double x, double eps) {
	double t_0 = pow((eps + x), 5.0);
	double t_1 = t_0 - pow(x, 5.0);
	double tmp;
	if (t_1 <= -1e-321) {
		tmp = fma((-x * pow(x, 3.0)), x, t_0);
	} else if (t_1 <= 0.0) {
		tmp = fma(fma(10.0, ((eps * eps) / x), (4.0 * eps)), pow(x, 4.0), (pow(x, 4.0) * eps));
	} else {
		tmp = t_0 - ((x * x) * pow(x, 3.0));
	}
	return tmp;
}
function code(x, eps)
	t_0 = Float64(eps + x) ^ 5.0
	t_1 = Float64(t_0 - (x ^ 5.0))
	tmp = 0.0
	if (t_1 <= -1e-321)
		tmp = fma(Float64(Float64(-x) * (x ^ 3.0)), x, t_0);
	elseif (t_1 <= 0.0)
		tmp = fma(fma(10.0, Float64(Float64(eps * eps) / x), Float64(4.0 * eps)), (x ^ 4.0), Float64((x ^ 4.0) * eps));
	else
		tmp = Float64(t_0 - Float64(Float64(x * x) * (x ^ 3.0)));
	end
	return tmp
end
code[x_, eps_] := Block[{t$95$0 = N[Power[N[(eps + x), $MachinePrecision], 5.0], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-321], N[(N[((-x) * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] * x + t$95$0), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(10.0 * N[(N[(eps * eps), $MachinePrecision] / x), $MachinePrecision] + N[(4.0 * eps), $MachinePrecision]), $MachinePrecision] * N[Power[x, 4.0], $MachinePrecision] + N[(N[Power[x, 4.0], $MachinePrecision] * eps), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - N[(N[(x * x), $MachinePrecision] * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\varepsilon + x\right)}^{5}\\
t_1 := t\_0 - {x}^{5}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\
\;\;\;\;\mathsf{fma}\left(\left(-x\right) \cdot {x}^{3}, x, t\_0\right)\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(10, \frac{\varepsilon \cdot \varepsilon}{x}, 4 \cdot \varepsilon\right), {x}^{4}, {x}^{4} \cdot \varepsilon\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0 - \left(x \cdot x\right) \cdot {x}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -9.98013e-322

    1. Initial program 96.2%

      \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-pow.f64N/A

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

        \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
      3. pow-prod-upN/A

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

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

        \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
      6. lower-pow.f64N/A

        \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
      7. lower-*.f6496.2

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

      \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
    5. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{{\left(x + \varepsilon\right)}^{5} - {x}^{3} \cdot \left(x \cdot x\right)} \]
      2. sub-negN/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
      6. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \color{blue}{\left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
      7. associate-*r*N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x}, x, {\left(x + \varepsilon\right)}^{5}\right) \]
      10. lower-neg.f6496.3

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(-{x}^{3}\right)} \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right) \]
      11. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(x + \varepsilon\right)}}^{5}\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
      13. lower-+.f6496.3

        \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
    6. Applied rewrites96.3%

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

    if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

    1. Initial program 88.4%

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \frac{{\varepsilon}^{2}}{x} + \color{blue}{\left(8 \cdot \frac{{\varepsilon}^{2}}{x} + 4 \cdot \varepsilon\right)}\right) + \varepsilon\right) \cdot {x}^{4} \]
      6. associate-+r+N/A

        \[\leadsto \left(\color{blue}{\left(\left(2 \cdot \frac{{\varepsilon}^{2}}{x} + 8 \cdot \frac{{\varepsilon}^{2}}{x}\right) + 4 \cdot \varepsilon\right)} + \varepsilon\right) \cdot {x}^{4} \]
      7. distribute-rgt-outN/A

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

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

        \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\frac{{\varepsilon}^{2}}{x}}, 2 + 8, 4 \cdot \varepsilon\right) + \varepsilon\right) \cdot {x}^{4} \]
      10. unpow2N/A

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

        \[\leadsto \left(\mathsf{fma}\left(\frac{\color{blue}{\varepsilon \cdot \varepsilon}}{x}, 2 + 8, 4 \cdot \varepsilon\right) + \varepsilon\right) \cdot {x}^{4} \]
      12. metadata-evalN/A

        \[\leadsto \left(\mathsf{fma}\left(\frac{\varepsilon \cdot \varepsilon}{x}, \color{blue}{10}, 4 \cdot \varepsilon\right) + \varepsilon\right) \cdot {x}^{4} \]
      13. lower-*.f64N/A

        \[\leadsto \left(\mathsf{fma}\left(\frac{\varepsilon \cdot \varepsilon}{x}, 10, \color{blue}{4 \cdot \varepsilon}\right) + \varepsilon\right) \cdot {x}^{4} \]
      14. lower-pow.f6499.9

        \[\leadsto \left(\mathsf{fma}\left(\frac{\varepsilon \cdot \varepsilon}{x}, 10, 4 \cdot \varepsilon\right) + \varepsilon\right) \cdot \color{blue}{{x}^{4}} \]
    5. Applied rewrites99.9%

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

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

      if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

      1. Initial program 94.3%

        \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-pow.f64N/A

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

          \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
        3. pow-prod-upN/A

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

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

          \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
        6. lower-pow.f64N/A

          \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
        7. lower-*.f6494.5

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

        \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
    7. Recombined 3 regimes into one program.
    8. Final simplification99.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\mathsf{fma}\left(\left(-x\right) \cdot {x}^{3}, x, {\left(\varepsilon + x\right)}^{5}\right)\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(10, \frac{\varepsilon \cdot \varepsilon}{x}, 4 \cdot \varepsilon\right), {x}^{4}, {x}^{4} \cdot \varepsilon\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\varepsilon + x\right)}^{5} - \left(x \cdot x\right) \cdot {x}^{3}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 99.5% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\varepsilon + x\right)}^{5}\\ t_1 := t\_0 - {x}^{5}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\mathsf{fma}\left(\left(-x\right) \cdot {x}^{3}, x, t\_0\right)\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t\_0 - \left(x \cdot x\right) \cdot {x}^{3}\\ \end{array} \end{array} \]
    (FPCore (x eps)
     :precision binary64
     (let* ((t_0 (pow (+ eps x) 5.0)) (t_1 (- t_0 (pow x 5.0))))
       (if (<= t_1 -1e-321)
         (fma (* (- x) (pow x 3.0)) x t_0)
         (if (<= t_1 0.0)
           (* (* (pow x 4.0) eps) 5.0)
           (- t_0 (* (* x x) (pow x 3.0)))))))
    double code(double x, double eps) {
    	double t_0 = pow((eps + x), 5.0);
    	double t_1 = t_0 - pow(x, 5.0);
    	double tmp;
    	if (t_1 <= -1e-321) {
    		tmp = fma((-x * pow(x, 3.0)), x, t_0);
    	} else if (t_1 <= 0.0) {
    		tmp = (pow(x, 4.0) * eps) * 5.0;
    	} else {
    		tmp = t_0 - ((x * x) * pow(x, 3.0));
    	}
    	return tmp;
    }
    
    function code(x, eps)
    	t_0 = Float64(eps + x) ^ 5.0
    	t_1 = Float64(t_0 - (x ^ 5.0))
    	tmp = 0.0
    	if (t_1 <= -1e-321)
    		tmp = fma(Float64(Float64(-x) * (x ^ 3.0)), x, t_0);
    	elseif (t_1 <= 0.0)
    		tmp = Float64(Float64((x ^ 4.0) * eps) * 5.0);
    	else
    		tmp = Float64(t_0 - Float64(Float64(x * x) * (x ^ 3.0)));
    	end
    	return tmp
    end
    
    code[x_, eps_] := Block[{t$95$0 = N[Power[N[(eps + x), $MachinePrecision], 5.0], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-321], N[(N[((-x) * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] * x + t$95$0), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[Power[x, 4.0], $MachinePrecision] * eps), $MachinePrecision] * 5.0), $MachinePrecision], N[(t$95$0 - N[(N[(x * x), $MachinePrecision] * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := {\left(\varepsilon + x\right)}^{5}\\
    t_1 := t\_0 - {x}^{5}\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\
    \;\;\;\;\mathsf{fma}\left(\left(-x\right) \cdot {x}^{3}, x, t\_0\right)\\
    
    \mathbf{elif}\;t\_1 \leq 0:\\
    \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 - \left(x \cdot x\right) \cdot {x}^{3}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -9.98013e-322

      1. Initial program 96.2%

        \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-pow.f64N/A

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

          \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
        3. pow-prod-upN/A

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

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

          \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
        6. lower-pow.f64N/A

          \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
        7. lower-*.f6496.2

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

        \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
      5. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto \color{blue}{{\left(x + \varepsilon\right)}^{5} - {x}^{3} \cdot \left(x \cdot x\right)} \]
        2. sub-negN/A

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

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

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

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
        6. lift-*.f64N/A

          \[\leadsto \left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \color{blue}{\left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
        7. associate-*r*N/A

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right)} \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x}, x, {\left(x + \varepsilon\right)}^{5}\right) \]
        10. lower-neg.f6496.3

          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(-{x}^{3}\right)} \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right) \]
        11. lift-+.f64N/A

          \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(x + \varepsilon\right)}}^{5}\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
        13. lower-+.f6496.3

          \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
      6. Applied rewrites96.3%

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

      if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

      1. Initial program 88.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} + {x}^{4}\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

          \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right)} \cdot \varepsilon \]
        6. lower-pow.f6499.9

          \[\leadsto \left(5 \cdot \color{blue}{{x}^{4}}\right) \cdot \varepsilon \]
      5. Applied rewrites99.9%

        \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right) \cdot \varepsilon} \]
      6. Step-by-step derivation
        1. Applied rewrites100.0%

          \[\leadsto \left({x}^{4} \cdot \varepsilon\right) \cdot \color{blue}{5} \]

        if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

        1. Initial program 94.3%

          \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-pow.f64N/A

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

            \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
          3. pow-prod-upN/A

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

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

            \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
          6. lower-pow.f64N/A

            \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
          7. lower-*.f6494.5

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

          \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
      7. Recombined 3 regimes into one program.
      8. Final simplification99.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\mathsf{fma}\left(\left(-x\right) \cdot {x}^{3}, x, {\left(\varepsilon + x\right)}^{5}\right)\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;{\left(\varepsilon + x\right)}^{5} - \left(x \cdot x\right) \cdot {x}^{3}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 3: 99.5% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\varepsilon + x\right)}^{5}\\ t_1 := t\_0 - {x}^{5}\\ t_2 := t\_0 - \left(x \cdot x\right) \cdot {x}^{3}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (x eps)
       :precision binary64
       (let* ((t_0 (pow (+ eps x) 5.0))
              (t_1 (- t_0 (pow x 5.0)))
              (t_2 (- t_0 (* (* x x) (pow x 3.0)))))
         (if (<= t_1 -1e-321)
           t_2
           (if (<= t_1 0.0) (* (* (pow x 4.0) eps) 5.0) t_2))))
      double code(double x, double eps) {
      	double t_0 = pow((eps + x), 5.0);
      	double t_1 = t_0 - pow(x, 5.0);
      	double t_2 = t_0 - ((x * x) * pow(x, 3.0));
      	double tmp;
      	if (t_1 <= -1e-321) {
      		tmp = t_2;
      	} else if (t_1 <= 0.0) {
      		tmp = (pow(x, 4.0) * eps) * 5.0;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      real(8) function code(x, eps)
          real(8), intent (in) :: x
          real(8), intent (in) :: eps
          real(8) :: t_0
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_0 = (eps + x) ** 5.0d0
          t_1 = t_0 - (x ** 5.0d0)
          t_2 = t_0 - ((x * x) * (x ** 3.0d0))
          if (t_1 <= (-1d-321)) then
              tmp = t_2
          else if (t_1 <= 0.0d0) then
              tmp = ((x ** 4.0d0) * eps) * 5.0d0
          else
              tmp = t_2
          end if
          code = tmp
      end function
      
      public static double code(double x, double eps) {
      	double t_0 = Math.pow((eps + x), 5.0);
      	double t_1 = t_0 - Math.pow(x, 5.0);
      	double t_2 = t_0 - ((x * x) * Math.pow(x, 3.0));
      	double tmp;
      	if (t_1 <= -1e-321) {
      		tmp = t_2;
      	} else if (t_1 <= 0.0) {
      		tmp = (Math.pow(x, 4.0) * eps) * 5.0;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      def code(x, eps):
      	t_0 = math.pow((eps + x), 5.0)
      	t_1 = t_0 - math.pow(x, 5.0)
      	t_2 = t_0 - ((x * x) * math.pow(x, 3.0))
      	tmp = 0
      	if t_1 <= -1e-321:
      		tmp = t_2
      	elif t_1 <= 0.0:
      		tmp = (math.pow(x, 4.0) * eps) * 5.0
      	else:
      		tmp = t_2
      	return tmp
      
      function code(x, eps)
      	t_0 = Float64(eps + x) ^ 5.0
      	t_1 = Float64(t_0 - (x ^ 5.0))
      	t_2 = Float64(t_0 - Float64(Float64(x * x) * (x ^ 3.0)))
      	tmp = 0.0
      	if (t_1 <= -1e-321)
      		tmp = t_2;
      	elseif (t_1 <= 0.0)
      		tmp = Float64(Float64((x ^ 4.0) * eps) * 5.0);
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, eps)
      	t_0 = (eps + x) ^ 5.0;
      	t_1 = t_0 - (x ^ 5.0);
      	t_2 = t_0 - ((x * x) * (x ^ 3.0));
      	tmp = 0.0;
      	if (t_1 <= -1e-321)
      		tmp = t_2;
      	elseif (t_1 <= 0.0)
      		tmp = ((x ^ 4.0) * eps) * 5.0;
      	else
      		tmp = t_2;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, eps_] := Block[{t$95$0 = N[Power[N[(eps + x), $MachinePrecision], 5.0], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 - N[(N[(x * x), $MachinePrecision] * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-321], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[Power[x, 4.0], $MachinePrecision] * eps), $MachinePrecision] * 5.0), $MachinePrecision], t$95$2]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {\left(\varepsilon + x\right)}^{5}\\
      t_1 := t\_0 - {x}^{5}\\
      t_2 := t\_0 - \left(x \cdot x\right) \cdot {x}^{3}\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_1 \leq 0:\\
      \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -9.98013e-322 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

        1. Initial program 95.3%

          \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-pow.f64N/A

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

            \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
          3. pow-prod-upN/A

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

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

            \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
          6. lower-pow.f64N/A

            \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
          7. lower-*.f6495.4

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

          \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]

        if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

        1. Initial program 88.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} + {x}^{4}\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

            \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right)} \cdot \varepsilon \]
          6. lower-pow.f6499.9

            \[\leadsto \left(5 \cdot \color{blue}{{x}^{4}}\right) \cdot \varepsilon \]
        5. Applied rewrites99.9%

          \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right) \cdot \varepsilon} \]
        6. Step-by-step derivation
          1. Applied rewrites100.0%

            \[\leadsto \left({x}^{4} \cdot \varepsilon\right) \cdot \color{blue}{5} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification99.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;{\left(\varepsilon + x\right)}^{5} - \left(x \cdot x\right) \cdot {x}^{3}\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;{\left(\varepsilon + x\right)}^{5} - \left(x \cdot x\right) \cdot {x}^{3}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 4: 99.5% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\varepsilon + x\right)}^{5}\\ t_1 := t\_0 - {x}^{5}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left({x}^{4}, -x, t\_0\right)\\ \end{array} \end{array} \]
        (FPCore (x eps)
         :precision binary64
         (let* ((t_0 (pow (+ eps x) 5.0)) (t_1 (- t_0 (pow x 5.0))))
           (if (<= t_1 -1e-321)
             t_1
             (if (<= t_1 0.0)
               (* (* (pow x 4.0) eps) 5.0)
               (fma (pow x 4.0) (- x) t_0)))))
        double code(double x, double eps) {
        	double t_0 = pow((eps + x), 5.0);
        	double t_1 = t_0 - pow(x, 5.0);
        	double tmp;
        	if (t_1 <= -1e-321) {
        		tmp = t_1;
        	} else if (t_1 <= 0.0) {
        		tmp = (pow(x, 4.0) * eps) * 5.0;
        	} else {
        		tmp = fma(pow(x, 4.0), -x, t_0);
        	}
        	return tmp;
        }
        
        function code(x, eps)
        	t_0 = Float64(eps + x) ^ 5.0
        	t_1 = Float64(t_0 - (x ^ 5.0))
        	tmp = 0.0
        	if (t_1 <= -1e-321)
        		tmp = t_1;
        	elseif (t_1 <= 0.0)
        		tmp = Float64(Float64((x ^ 4.0) * eps) * 5.0);
        	else
        		tmp = fma((x ^ 4.0), Float64(-x), t_0);
        	end
        	return tmp
        end
        
        code[x_, eps_] := Block[{t$95$0 = N[Power[N[(eps + x), $MachinePrecision], 5.0], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-321], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[Power[x, 4.0], $MachinePrecision] * eps), $MachinePrecision] * 5.0), $MachinePrecision], N[(N[Power[x, 4.0], $MachinePrecision] * (-x) + t$95$0), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := {\left(\varepsilon + x\right)}^{5}\\
        t_1 := t\_0 - {x}^{5}\\
        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_1 \leq 0:\\
        \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left({x}^{4}, -x, t\_0\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -9.98013e-322

          1. Initial program 96.2%

            \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
          2. Add Preprocessing

          if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

          1. Initial program 88.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} + {x}^{4}\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

              \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right)} \cdot \varepsilon \]
            6. lower-pow.f6499.9

              \[\leadsto \left(5 \cdot \color{blue}{{x}^{4}}\right) \cdot \varepsilon \]
          5. Applied rewrites99.9%

            \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right) \cdot \varepsilon} \]
          6. Step-by-step derivation
            1. Applied rewrites100.0%

              \[\leadsto \left({x}^{4} \cdot \varepsilon\right) \cdot \color{blue}{5} \]

            if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

            1. Initial program 94.3%

              \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-pow.f64N/A

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

                \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
              3. pow-prod-upN/A

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

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

                \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
              6. lower-pow.f64N/A

                \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
              7. lower-*.f6494.5

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

              \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
            5. Step-by-step derivation
              1. lift--.f64N/A

                \[\leadsto \color{blue}{{\left(x + \varepsilon\right)}^{5} - {x}^{3} \cdot \left(x \cdot x\right)} \]
              2. sub-negN/A

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

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

                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{x}^{3} \cdot \left(x \cdot x\right)}\right)\right) + {\left(x + \varepsilon\right)}^{5} \]
              5. lift-*.f64N/A

                \[\leadsto \left(\mathsf{neg}\left({x}^{3} \cdot \color{blue}{\left(x \cdot x\right)}\right)\right) + {\left(x + \varepsilon\right)}^{5} \]
              6. associate-*r*N/A

                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left({x}^{3} \cdot x\right) \cdot x}\right)\right) + {\left(x + \varepsilon\right)}^{5} \]
              7. lift-pow.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\left(\color{blue}{{x}^{3}} \cdot x\right) \cdot x\right)\right) + {\left(x + \varepsilon\right)}^{5} \]
              8. pow-plusN/A

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

                \[\leadsto \left(\mathsf{neg}\left({x}^{\color{blue}{4}} \cdot x\right)\right) + {\left(x + \varepsilon\right)}^{5} \]
              10. lift-pow.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{{x}^{4}} \cdot x\right)\right) + {\left(x + \varepsilon\right)}^{5} \]
              11. distribute-rgt-neg-inN/A

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

                \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{4}, \mathsf{neg}\left(x\right), {\left(x + \varepsilon\right)}^{5}\right)} \]
              13. lower-neg.f6494.4

                \[\leadsto \mathsf{fma}\left({x}^{4}, \color{blue}{-x}, {\left(x + \varepsilon\right)}^{5}\right) \]
              14. lift-+.f64N/A

                \[\leadsto \mathsf{fma}\left({x}^{4}, -x, {\color{blue}{\left(x + \varepsilon\right)}}^{5}\right) \]
              15. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left({x}^{4}, -x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
              16. lower-+.f6494.4

                \[\leadsto \mathsf{fma}\left({x}^{4}, -x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
            6. Applied rewrites94.4%

              \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{4}, -x, {\left(\varepsilon + x\right)}^{5}\right)} \]
          7. Recombined 3 regimes into one program.
          8. Final simplification99.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;{\left(\varepsilon + x\right)}^{5} - {x}^{5}\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left({x}^{4}, -x, {\left(\varepsilon + x\right)}^{5}\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 5: 99.5% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\varepsilon + x\right)}^{5}\\ t_1 := t\_0 - {x}^{5}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot \left(-x\right), x, t\_0\right)\\ \end{array} \end{array} \]
          (FPCore (x eps)
           :precision binary64
           (let* ((t_0 (pow (+ eps x) 5.0)) (t_1 (- t_0 (pow x 5.0))))
             (if (<= t_1 -1e-321)
               t_1
               (if (<= t_1 0.0)
                 (* (* (pow x 4.0) eps) 5.0)
                 (fma (* (* (* x x) x) (- x)) x t_0)))))
          double code(double x, double eps) {
          	double t_0 = pow((eps + x), 5.0);
          	double t_1 = t_0 - pow(x, 5.0);
          	double tmp;
          	if (t_1 <= -1e-321) {
          		tmp = t_1;
          	} else if (t_1 <= 0.0) {
          		tmp = (pow(x, 4.0) * eps) * 5.0;
          	} else {
          		tmp = fma((((x * x) * x) * -x), x, t_0);
          	}
          	return tmp;
          }
          
          function code(x, eps)
          	t_0 = Float64(eps + x) ^ 5.0
          	t_1 = Float64(t_0 - (x ^ 5.0))
          	tmp = 0.0
          	if (t_1 <= -1e-321)
          		tmp = t_1;
          	elseif (t_1 <= 0.0)
          		tmp = Float64(Float64((x ^ 4.0) * eps) * 5.0);
          	else
          		tmp = fma(Float64(Float64(Float64(x * x) * x) * Float64(-x)), x, t_0);
          	end
          	return tmp
          end
          
          code[x_, eps_] := Block[{t$95$0 = N[Power[N[(eps + x), $MachinePrecision], 5.0], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-321], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[Power[x, 4.0], $MachinePrecision] * eps), $MachinePrecision] * 5.0), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision] * (-x)), $MachinePrecision] * x + t$95$0), $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := {\left(\varepsilon + x\right)}^{5}\\
          t_1 := t\_0 - {x}^{5}\\
          \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_1 \leq 0:\\
          \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot \left(-x\right), x, t\_0\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -9.98013e-322

            1. Initial program 96.2%

              \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
            2. Add Preprocessing

            if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

            1. Initial program 88.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} + {x}^{4}\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

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

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

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

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

                \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right)} \cdot \varepsilon \]
              6. lower-pow.f6499.9

                \[\leadsto \left(5 \cdot \color{blue}{{x}^{4}}\right) \cdot \varepsilon \]
            5. Applied rewrites99.9%

              \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right) \cdot \varepsilon} \]
            6. Step-by-step derivation
              1. Applied rewrites100.0%

                \[\leadsto \left({x}^{4} \cdot \varepsilon\right) \cdot \color{blue}{5} \]

              if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

              1. Initial program 94.3%

                \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-pow.f64N/A

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

                  \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
                3. pow-prod-upN/A

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

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

                  \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
                6. lower-pow.f64N/A

                  \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
                7. lower-*.f6494.5

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

                \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
              5. Step-by-step derivation
                1. lift--.f64N/A

                  \[\leadsto \color{blue}{{\left(x + \varepsilon\right)}^{5} - {x}^{3} \cdot \left(x \cdot x\right)} \]
                2. sub-negN/A

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

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

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

                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
                6. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \color{blue}{\left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
                7. associate-*r*N/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right)} \]
                9. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x}, x, {\left(x + \varepsilon\right)}^{5}\right) \]
                10. lower-neg.f6494.3

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(-{x}^{3}\right)} \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right) \]
                11. lift-+.f64N/A

                  \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(x + \varepsilon\right)}}^{5}\right) \]
                12. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
                13. lower-+.f6494.3

                  \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
              6. Applied rewrites94.3%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right)} \]
              7. Step-by-step derivation
                1. lift-neg.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right)} \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                2. lift-pow.f64N/A

                  \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{{x}^{3}}\right)\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                3. unpow3N/A

                  \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{\left(x \cdot x\right) \cdot x}\right)\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                4. lift-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{\left(x \cdot x\right)} \cdot x\right)\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                5. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(x \cdot x\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(x \cdot x\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                7. lower-neg.f6494.3

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(x \cdot x\right) \cdot \left(-x\right)\right)} \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
            7. Recombined 3 regimes into one program.
            8. Final simplification99.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;{\left(\varepsilon + x\right)}^{5} - {x}^{5}\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot \left(-x\right), x, {\left(\varepsilon + x\right)}^{5}\right)\\ \end{array} \]
            9. Add Preprocessing

            Alternative 6: 99.5% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\varepsilon + x\right)}^{5}\\ t_1 := t\_0 - {x}^{5}\\ t_2 := \mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot \left(-x\right), x, t\_0\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
            (FPCore (x eps)
             :precision binary64
             (let* ((t_0 (pow (+ eps x) 5.0))
                    (t_1 (- t_0 (pow x 5.0)))
                    (t_2 (fma (* (* (* x x) x) (- x)) x t_0)))
               (if (<= t_1 -1e-321)
                 t_2
                 (if (<= t_1 0.0) (* (* (pow x 4.0) eps) 5.0) t_2))))
            double code(double x, double eps) {
            	double t_0 = pow((eps + x), 5.0);
            	double t_1 = t_0 - pow(x, 5.0);
            	double t_2 = fma((((x * x) * x) * -x), x, t_0);
            	double tmp;
            	if (t_1 <= -1e-321) {
            		tmp = t_2;
            	} else if (t_1 <= 0.0) {
            		tmp = (pow(x, 4.0) * eps) * 5.0;
            	} else {
            		tmp = t_2;
            	}
            	return tmp;
            }
            
            function code(x, eps)
            	t_0 = Float64(eps + x) ^ 5.0
            	t_1 = Float64(t_0 - (x ^ 5.0))
            	t_2 = fma(Float64(Float64(Float64(x * x) * x) * Float64(-x)), x, t_0)
            	tmp = 0.0
            	if (t_1 <= -1e-321)
            		tmp = t_2;
            	elseif (t_1 <= 0.0)
            		tmp = Float64(Float64((x ^ 4.0) * eps) * 5.0);
            	else
            		tmp = t_2;
            	end
            	return tmp
            end
            
            code[x_, eps_] := Block[{t$95$0 = N[Power[N[(eps + x), $MachinePrecision], 5.0], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision] * (-x)), $MachinePrecision] * x + t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-321], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[Power[x, 4.0], $MachinePrecision] * eps), $MachinePrecision] * 5.0), $MachinePrecision], t$95$2]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := {\left(\varepsilon + x\right)}^{5}\\
            t_1 := t\_0 - {x}^{5}\\
            t_2 := \mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot \left(-x\right), x, t\_0\right)\\
            \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-321}:\\
            \;\;\;\;t\_2\\
            
            \mathbf{elif}\;t\_1 \leq 0:\\
            \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_2\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -9.98013e-322 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

              1. Initial program 95.3%

                \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-pow.f64N/A

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

                  \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
                3. pow-prod-upN/A

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

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

                  \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
                6. lower-pow.f64N/A

                  \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
                7. lower-*.f6495.4

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

                \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
              5. Step-by-step derivation
                1. lift--.f64N/A

                  \[\leadsto \color{blue}{{\left(x + \varepsilon\right)}^{5} - {x}^{3} \cdot \left(x \cdot x\right)} \]
                2. sub-negN/A

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

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

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

                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
                6. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \color{blue}{\left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
                7. associate-*r*N/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right)} \]
                9. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x}, x, {\left(x + \varepsilon\right)}^{5}\right) \]
                10. lower-neg.f6495.3

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(-{x}^{3}\right)} \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right) \]
                11. lift-+.f64N/A

                  \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(x + \varepsilon\right)}}^{5}\right) \]
                12. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
                13. lower-+.f6495.3

                  \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
              6. Applied rewrites95.3%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right)} \]
              7. Step-by-step derivation
                1. lift-neg.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right)} \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                2. lift-pow.f64N/A

                  \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{{x}^{3}}\right)\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                3. unpow3N/A

                  \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{\left(x \cdot x\right) \cdot x}\right)\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                4. lift-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{\left(x \cdot x\right)} \cdot x\right)\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                5. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(x \cdot x\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(x \cdot x\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
                7. lower-neg.f6495.3

                  \[\leadsto \mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot \color{blue}{\left(-x\right)}\right) \cdot x, x, {\left(\varepsilon + x\right)}^{5}\right) \]
              8. Applied rewrites95.3%

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

              if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

              1. Initial program 88.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} + {x}^{4}\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

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

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

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

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

                  \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right)} \cdot \varepsilon \]
                6. lower-pow.f6499.9

                  \[\leadsto \left(5 \cdot \color{blue}{{x}^{4}}\right) \cdot \varepsilon \]
              5. Applied rewrites99.9%

                \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right) \cdot \varepsilon} \]
              6. Step-by-step derivation
                1. Applied rewrites100.0%

                  \[\leadsto \left({x}^{4} \cdot \varepsilon\right) \cdot \color{blue}{5} \]
              7. Recombined 2 regimes into one program.
              8. Final simplification99.1%

                \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot \left(-x\right), x, {\left(\varepsilon + x\right)}^{5}\right)\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot \left(-x\right), x, {\left(\varepsilon + x\right)}^{5}\right)\\ \end{array} \]
              9. Add Preprocessing

              Alternative 7: 98.8% accurate, 0.4× speedup?

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

                1. Initial program 96.2%

                  \[{\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} + \left(-1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right) + -1 \cdot \frac{4 \cdot {x}^{3} + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                4. Applied rewrites88.7%

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

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

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

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

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

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

                      if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

                      1. Initial program 88.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} + {x}^{4}\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

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

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

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

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

                          \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right)} \cdot \varepsilon \]
                        6. lower-pow.f6499.9

                          \[\leadsto \left(5 \cdot \color{blue}{{x}^{4}}\right) \cdot \varepsilon \]
                      5. Applied rewrites99.9%

                        \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right) \cdot \varepsilon} \]
                      6. Step-by-step derivation
                        1. Applied rewrites100.0%

                          \[\leadsto \left({x}^{4} \cdot \varepsilon\right) \cdot \color{blue}{5} \]

                        if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

                        1. Initial program 94.3%

                          \[{\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} + \left(-1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right) + -1 \cdot \frac{4 \cdot {x}^{3} + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                        4. Applied rewrites90.9%

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

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

                            \[\leadsto \left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), x + \varepsilon, \left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \color{blue}{\varepsilon} \]
                        7. Recombined 3 regimes into one program.
                        8. Final simplification98.0%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(x \cdot x\right) \cdot 10, \varepsilon + x, \left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 8: 98.8% accurate, 0.4× speedup?

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

                          1. Initial program 96.2%

                            \[{\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} + \left(-1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right) + -1 \cdot \frac{4 \cdot {x}^{3} + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                          4. Applied rewrites88.7%

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

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

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

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

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

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

                                if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

                                1. Initial program 88.4%

                                  \[{\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.f6488.5

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

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

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

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

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

                                    \[\leadsto \left(\left(5 \cdot \left(\varepsilon \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot x \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites99.9%

                                      \[\leadsto \left(\left(\left(x \cdot \varepsilon\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x \]

                                    if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

                                    1. Initial program 94.3%

                                      \[{\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} + \left(-1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right) + -1 \cdot \frac{4 \cdot {x}^{3} + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                    4. Applied rewrites90.9%

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

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

                                        \[\leadsto \left(\mathsf{fma}\left(10 \cdot \left(x \cdot x\right), x + \varepsilon, \left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \color{blue}{\varepsilon} \]
                                    7. Recombined 3 regimes into one program.
                                    8. Final simplification98.0%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left(\left(\left(\varepsilon \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\left(x \cdot x\right) \cdot 10, \varepsilon + x, \left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \end{array} \]
                                    9. Add Preprocessing

                                    Alternative 9: 98.8% accurate, 0.4× speedup?

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

                                      1. Initial program 95.3%

                                        \[{\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} + \left(-1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right) + -1 \cdot \frac{4 \cdot {x}^{3} + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                      4. Applied rewrites89.8%

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

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

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

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

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

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

                                            if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

                                            1. Initial program 88.4%

                                              \[{\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.f6488.5

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

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

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

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

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

                                                \[\leadsto \left(\left(5 \cdot \left(\varepsilon \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot x \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites99.9%

                                                  \[\leadsto \left(\left(\left(x \cdot \varepsilon\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x \]
                                              4. Recombined 2 regimes into one program.
                                              5. Final simplification97.9%

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left(\left(\left(\varepsilon \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\ \end{array} \]
                                              6. Add Preprocessing

                                              Alternative 10: 98.7% accurate, 0.5× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\varepsilon + x\right)}^{5} - {x}^{5}\\ t_1 := \left(\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-321}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\left(\left(\left(\varepsilon \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                              (FPCore (x eps)
                                               :precision binary64
                                               (let* ((t_0 (- (pow (+ eps x) 5.0) (pow x 5.0)))
                                                      (t_1 (* (* (* (fma 5.0 x eps) eps) eps) (* eps eps))))
                                                 (if (<= t_0 -1e-321)
                                                   t_1
                                                   (if (<= t_0 0.0) (* (* (* (* eps x) 5.0) (* x x)) x) t_1))))
                                              double code(double x, double eps) {
                                              	double t_0 = pow((eps + x), 5.0) - pow(x, 5.0);
                                              	double t_1 = ((fma(5.0, x, eps) * eps) * eps) * (eps * eps);
                                              	double tmp;
                                              	if (t_0 <= -1e-321) {
                                              		tmp = t_1;
                                              	} else if (t_0 <= 0.0) {
                                              		tmp = (((eps * x) * 5.0) * (x * x)) * x;
                                              	} else {
                                              		tmp = t_1;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(x, eps)
                                              	t_0 = Float64((Float64(eps + x) ^ 5.0) - (x ^ 5.0))
                                              	t_1 = Float64(Float64(Float64(fma(5.0, x, eps) * eps) * eps) * Float64(eps * eps))
                                              	tmp = 0.0
                                              	if (t_0 <= -1e-321)
                                              		tmp = t_1;
                                              	elseif (t_0 <= 0.0)
                                              		tmp = Float64(Float64(Float64(Float64(eps * x) * 5.0) * Float64(x * x)) * x);
                                              	else
                                              		tmp = t_1;
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[(eps + x), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(5.0 * x + eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-321], t$95$1, If[LessEqual[t$95$0, 0.0], N[(N[(N[(N[(eps * x), $MachinePrecision] * 5.0), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_0 := {\left(\varepsilon + x\right)}^{5} - {x}^{5}\\
                                              t_1 := \left(\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
                                              \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-321}:\\
                                              \;\;\;\;t\_1\\
                                              
                                              \mathbf{elif}\;t\_0 \leq 0:\\
                                              \;\;\;\;\left(\left(\left(\varepsilon \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;t\_1\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < -9.98013e-322 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

                                                1. Initial program 95.3%

                                                  \[{\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} + \left(-1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right) + -1 \cdot \frac{4 \cdot {x}^{3} + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                                4. Applied rewrites89.8%

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

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

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

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

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

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

                                                      if -9.98013e-322 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64))) < 0.0

                                                      1. Initial program 88.4%

                                                        \[{\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.f6488.5

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

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

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

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

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

                                                          \[\leadsto \left(\left(5 \cdot \left(\varepsilon \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot x \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites99.9%

                                                            \[\leadsto \left(\left(\left(x \cdot \varepsilon\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x \]
                                                        4. Recombined 2 regimes into one program.
                                                        5. Final simplification97.6%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq -1 \cdot 10^{-321}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\ \mathbf{elif}\;{\left(\varepsilon + x\right)}^{5} - {x}^{5} \leq 0:\\ \;\;\;\;\left(\left(\left(\varepsilon \cdot x\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\ \end{array} \]
                                                        6. Add Preprocessing

                                                        Alternative 11: 83.0% accurate, 8.0× speedup?

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

                                                          \[{\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.f6488.4

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

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

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

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

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

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

                                                              \[\leadsto \left(\left(\left(x \cdot \varepsilon\right) \cdot 5\right) \cdot \left(x \cdot x\right)\right) \cdot x \]
                                                            2. Final simplification83.6%

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

                                                            Alternative 12: 83.0% accurate, 8.0× speedup?

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

                                                              \[{\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} + {x}^{4}\right)} \]
                                                            4. Step-by-step derivation
                                                              1. *-commutativeN/A

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

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

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

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

                                                                \[\leadsto \color{blue}{\left(5 \cdot {x}^{4}\right)} \cdot \varepsilon \]
                                                              6. lower-pow.f6483.6

                                                                \[\leadsto \left(5 \cdot \color{blue}{{x}^{4}}\right) \cdot \varepsilon \]
                                                            5. Applied rewrites83.6%

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

                                                                \[\leadsto \left(5 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right) \cdot \varepsilon \]
                                                              2. Final simplification83.5%

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

                                                              Alternative 13: 71.6% accurate, 8.0× speedup?

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

                                                                \[{\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} + \left(-1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right) + -1 \cdot \frac{4 \cdot {x}^{3} + x \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                                              4. Applied rewrites71.6%

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

                                                                \[\leadsto {\varepsilon}^{2} \cdot \color{blue}{\left(10 \cdot \left(\varepsilon \cdot {x}^{2}\right) + 10 \cdot {x}^{3}\right)} \]
                                                              6. Applied rewrites73.3%

                                                                \[\leadsto \left(\left(\left(\left(\varepsilon \cdot \varepsilon\right) \cdot 10\right) \cdot \left(x + \varepsilon\right)\right) \cdot x\right) \cdot \color{blue}{x} \]
                                                              7. Taylor expanded in eps around 0

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

                                                                  \[\leadsto \left(\left(\left(\left(x \cdot \varepsilon\right) \cdot 10\right) \cdot x\right) \cdot \varepsilon\right) \cdot x \]
                                                                2. Final simplification73.1%

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

                                                                Alternative 14: 71.5% accurate, 209.0× speedup?

                                                                \[\begin{array}{l} \\ 0 \end{array} \]
                                                                (FPCore (x eps) :precision binary64 0.0)
                                                                double code(double x, double eps) {
                                                                	return 0.0;
                                                                }
                                                                
                                                                real(8) function code(x, eps)
                                                                    real(8), intent (in) :: x
                                                                    real(8), intent (in) :: eps
                                                                    code = 0.0d0
                                                                end function
                                                                
                                                                public static double code(double x, double eps) {
                                                                	return 0.0;
                                                                }
                                                                
                                                                def code(x, eps):
                                                                	return 0.0
                                                                
                                                                function code(x, eps)
                                                                	return 0.0
                                                                end
                                                                
                                                                function tmp = code(x, eps)
                                                                	tmp = 0.0;
                                                                end
                                                                
                                                                code[x_, eps_] := 0.0
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                0
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Initial program 89.8%

                                                                  \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
                                                                2. Add Preprocessing
                                                                3. Step-by-step derivation
                                                                  1. lift-pow.f64N/A

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

                                                                    \[\leadsto {\left(x + \varepsilon\right)}^{5} - {x}^{\color{blue}{\left(3 + 2\right)}} \]
                                                                  3. pow-prod-upN/A

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

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

                                                                    \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
                                                                  6. lower-pow.f64N/A

                                                                    \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3}} \cdot \left(x \cdot x\right) \]
                                                                  7. lower-*.f6487.5

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

                                                                  \[\leadsto {\left(x + \varepsilon\right)}^{5} - \color{blue}{{x}^{3} \cdot \left(x \cdot x\right)} \]
                                                                5. Step-by-step derivation
                                                                  1. lift--.f64N/A

                                                                    \[\leadsto \color{blue}{{\left(x + \varepsilon\right)}^{5} - {x}^{3} \cdot \left(x \cdot x\right)} \]
                                                                  2. sub-negN/A

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

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

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

                                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
                                                                  6. lift-*.f64N/A

                                                                    \[\leadsto \left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot \color{blue}{\left(x \cdot x\right)} + {\left(x + \varepsilon\right)}^{5} \]
                                                                  7. associate-*r*N/A

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

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right)} \]
                                                                  9. lower-*.f64N/A

                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left({x}^{3}\right)\right) \cdot x}, x, {\left(x + \varepsilon\right)}^{5}\right) \]
                                                                  10. lower-neg.f6482.7

                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(-{x}^{3}\right)} \cdot x, x, {\left(x + \varepsilon\right)}^{5}\right) \]
                                                                  11. lift-+.f64N/A

                                                                    \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(x + \varepsilon\right)}}^{5}\right) \]
                                                                  12. +-commutativeN/A

                                                                    \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
                                                                  13. lower-+.f6482.7

                                                                    \[\leadsto \mathsf{fma}\left(\left(-{x}^{3}\right) \cdot x, x, {\color{blue}{\left(\varepsilon + x\right)}}^{5}\right) \]
                                                                6. Applied rewrites82.7%

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

                                                                  \[\leadsto \color{blue}{-1 \cdot {x}^{5} + {x}^{5}} \]
                                                                8. Step-by-step derivation
                                                                  1. distribute-lft1-inN/A

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

                                                                    \[\leadsto \color{blue}{0} \cdot {x}^{5} \]
                                                                  3. mul0-lft73.0

                                                                    \[\leadsto \color{blue}{0} \]
                                                                9. Applied rewrites73.0%

                                                                  \[\leadsto \color{blue}{0} \]
                                                                10. Add Preprocessing

                                                                Reproduce

                                                                ?
                                                                herbie shell --seed 2024277 
                                                                (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)))