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

Percentage Accurate: 88.4% → 98.9%
Time: 6.6s
Alternatives: 10
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 10 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 98.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\

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


\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))) < -4.99999999999999985e-305

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

      1. Initial program 87.1%

        \[{\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 + 4 \cdot \varepsilon\right)} \]
      4. Step-by-step derivation
        1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left({x}^{4} \cdot 5\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 97.3%

          \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
        2. Add Preprocessing
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 2: 98.5% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(10, \frac{x}{\varepsilon}, 5\right)}{\varepsilon}, x, 1\right) \cdot {\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \end{array} \end{array} \]
      (FPCore (x eps)
       :precision binary64
       (let* ((t_0 (- (pow (+ x eps) 5.0) (pow x 5.0))))
         (if (or (<= t_0 -5e-305) (not (<= t_0 0.0)))
           (* (fma (/ (fma 10.0 (/ x eps) 5.0) eps) x 1.0) (pow eps 5.0))
           (* (* (pow x 4.0) eps) 5.0))))
      double code(double x, double eps) {
      	double t_0 = pow((x + eps), 5.0) - pow(x, 5.0);
      	double tmp;
      	if ((t_0 <= -5e-305) || !(t_0 <= 0.0)) {
      		tmp = fma((fma(10.0, (x / eps), 5.0) / eps), x, 1.0) * pow(eps, 5.0);
      	} else {
      		tmp = (pow(x, 4.0) * eps) * 5.0;
      	}
      	return tmp;
      }
      
      function code(x, eps)
      	t_0 = Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0))
      	tmp = 0.0
      	if ((t_0 <= -5e-305) || !(t_0 <= 0.0))
      		tmp = Float64(fma(Float64(fma(10.0, Float64(x / eps), 5.0) / eps), x, 1.0) * (eps ^ 5.0));
      	else
      		tmp = Float64(Float64((x ^ 4.0) * eps) * 5.0);
      	end
      	return tmp
      end
      
      code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e-305], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[(N[(N[(10.0 * N[(x / eps), $MachinePrecision] + 5.0), $MachinePrecision] / eps), $MachinePrecision] * x + 1.0), $MachinePrecision] * N[Power[eps, 5.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x, 4.0], $MachinePrecision] * eps), $MachinePrecision] * 5.0), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\
      \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\
      \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(10, \frac{x}{\varepsilon}, 5\right)}{\varepsilon}, x, 1\right) \cdot {\varepsilon}^{5}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\
      
      
      \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))) < -4.99999999999999985e-305 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

        1. Initial program 98.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} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

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

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

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

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

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

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

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

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

          1. Initial program 87.1%

            \[{\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 + 4 \cdot \varepsilon\right)} \]
          4. Step-by-step derivation
            1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left({x}^{4} \cdot 5\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.6%

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

          Alternative 3: 98.4% accurate, 0.4× speedup?

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

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 87.1%

                    \[{\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 + 4 \cdot \varepsilon\right)} \]
                  4. Step-by-step derivation
                    1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\left({x}^{4} \cdot 5\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 97.3%

                      \[{\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.f6495.3

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{\varepsilon}, 5, 1\right) \cdot {\varepsilon}^{5}} \]
                  7. Recombined 3 regimes into one program.
                  8. Add Preprocessing

                  Alternative 4: 98.4% accurate, 0.4× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\ \end{array} \end{array} \]
                  (FPCore (x eps)
                   :precision binary64
                   (let* ((t_0 (- (pow (+ x eps) 5.0) (pow x 5.0))))
                     (if (or (<= t_0 -5e-305) (not (<= t_0 0.0)))
                       (* (* (* (fma (fma x 5.0 eps) eps (* (* x x) 10.0)) eps) eps) eps)
                       (* (* (pow x 4.0) eps) 5.0))))
                  double code(double x, double eps) {
                  	double t_0 = pow((x + eps), 5.0) - pow(x, 5.0);
                  	double tmp;
                  	if ((t_0 <= -5e-305) || !(t_0 <= 0.0)) {
                  		tmp = ((fma(fma(x, 5.0, eps), eps, ((x * x) * 10.0)) * eps) * eps) * eps;
                  	} else {
                  		tmp = (pow(x, 4.0) * eps) * 5.0;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, eps)
                  	t_0 = Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0))
                  	tmp = 0.0
                  	if ((t_0 <= -5e-305) || !(t_0 <= 0.0))
                  		tmp = Float64(Float64(Float64(fma(fma(x, 5.0, eps), eps, Float64(Float64(x * x) * 10.0)) * eps) * eps) * eps);
                  	else
                  		tmp = Float64(Float64((x ^ 4.0) * eps) * 5.0);
                  	end
                  	return tmp
                  end
                  
                  code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e-305], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[(N[(N[(N[(x * 5.0 + eps), $MachinePrecision] * eps + N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision], N[(N[(N[Power[x, 4.0], $MachinePrecision] * eps), $MachinePrecision] * 5.0), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\
                  \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\
                  \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left({x}^{4} \cdot \varepsilon\right) \cdot 5\\
                  
                  
                  \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))) < -4.99999999999999985e-305 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

                    1. Initial program 98.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} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

                          1. Initial program 87.1%

                            \[{\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 + 4 \cdot \varepsilon\right)} \]
                          4. Step-by-step derivation
                            1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\left({x}^{4} \cdot 5\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.5%

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

                          Alternative 5: 98.4% accurate, 0.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left({x}^{4} \cdot 5\right) \cdot \varepsilon\\ \end{array} \end{array} \]
                          (FPCore (x eps)
                           :precision binary64
                           (let* ((t_0 (- (pow (+ x eps) 5.0) (pow x 5.0))))
                             (if (or (<= t_0 -5e-305) (not (<= t_0 0.0)))
                               (* (* (* (fma (fma x 5.0 eps) eps (* (* x x) 10.0)) eps) eps) eps)
                               (* (* (pow x 4.0) 5.0) eps))))
                          double code(double x, double eps) {
                          	double t_0 = pow((x + eps), 5.0) - pow(x, 5.0);
                          	double tmp;
                          	if ((t_0 <= -5e-305) || !(t_0 <= 0.0)) {
                          		tmp = ((fma(fma(x, 5.0, eps), eps, ((x * x) * 10.0)) * eps) * eps) * eps;
                          	} else {
                          		tmp = (pow(x, 4.0) * 5.0) * eps;
                          	}
                          	return tmp;
                          }
                          
                          function code(x, eps)
                          	t_0 = Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0))
                          	tmp = 0.0
                          	if ((t_0 <= -5e-305) || !(t_0 <= 0.0))
                          		tmp = Float64(Float64(Float64(fma(fma(x, 5.0, eps), eps, Float64(Float64(x * x) * 10.0)) * eps) * eps) * eps);
                          	else
                          		tmp = Float64(Float64((x ^ 4.0) * 5.0) * eps);
                          	end
                          	return tmp
                          end
                          
                          code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e-305], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[(N[(N[(N[(x * 5.0 + eps), $MachinePrecision] * eps + N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision], N[(N[(N[Power[x, 4.0], $MachinePrecision] * 5.0), $MachinePrecision] * eps), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\
                          \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\
                          \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left({x}^{4} \cdot 5\right) \cdot \varepsilon\\
                          
                          
                          \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))) < -4.99999999999999985e-305 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

                            1. Initial program 98.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} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                            4. Step-by-step derivation
                              1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

                                  1. Initial program 87.1%

                                    \[{\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 + 4 \cdot \varepsilon\right)} \]
                                  4. Step-by-step derivation
                                    1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 6: 98.4% accurate, 0.4× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot 5\right) \cdot x\right) \cdot \left(\left(\varepsilon \cdot x\right) \cdot x\right)\\ \end{array} \end{array} \]
                                (FPCore (x eps)
                                 :precision binary64
                                 (let* ((t_0 (- (pow (+ x eps) 5.0) (pow x 5.0))))
                                   (if (or (<= t_0 -5e-305) (not (<= t_0 0.0)))
                                     (* (* (* (fma (fma x 5.0 eps) eps (* (* x x) 10.0)) eps) eps) eps)
                                     (* (* (* x 5.0) x) (* (* eps x) x)))))
                                double code(double x, double eps) {
                                	double t_0 = pow((x + eps), 5.0) - pow(x, 5.0);
                                	double tmp;
                                	if ((t_0 <= -5e-305) || !(t_0 <= 0.0)) {
                                		tmp = ((fma(fma(x, 5.0, eps), eps, ((x * x) * 10.0)) * eps) * eps) * eps;
                                	} else {
                                		tmp = ((x * 5.0) * x) * ((eps * x) * x);
                                	}
                                	return tmp;
                                }
                                
                                function code(x, eps)
                                	t_0 = Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0))
                                	tmp = 0.0
                                	if ((t_0 <= -5e-305) || !(t_0 <= 0.0))
                                		tmp = Float64(Float64(Float64(fma(fma(x, 5.0, eps), eps, Float64(Float64(x * x) * 10.0)) * eps) * eps) * eps);
                                	else
                                		tmp = Float64(Float64(Float64(x * 5.0) * x) * Float64(Float64(eps * x) * x));
                                	end
                                	return tmp
                                end
                                
                                code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e-305], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[(N[(N[(N[(x * 5.0 + eps), $MachinePrecision] * eps + N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision]), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision], N[(N[(N[(x * 5.0), $MachinePrecision] * x), $MachinePrecision] * N[(N[(eps * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\
                                \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\
                                \;\;\;\;\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 5, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(\left(x \cdot 5\right) \cdot x\right) \cdot \left(\left(\varepsilon \cdot x\right) \cdot x\right)\\
                                
                                
                                \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))) < -4.99999999999999985e-305 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

                                  1. Initial program 98.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} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

                                        1. Initial program 87.1%

                                          \[{\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 + 4 \cdot \varepsilon\right)} \]
                                        4. Step-by-step derivation
                                          1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 7: 98.2% accurate, 0.5× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot 5\right) \cdot x\right) \cdot \left(\left(\varepsilon \cdot x\right) \cdot x\right)\\ \end{array} \end{array} \]
                                            (FPCore (x eps)
                                             :precision binary64
                                             (let* ((t_0 (- (pow (+ x eps) 5.0) (pow x 5.0))))
                                               (if (or (<= t_0 -5e-305) (not (<= t_0 0.0)))
                                                 (* (* (* (fma 5.0 x eps) eps) eps) (* eps eps))
                                                 (* (* (* x 5.0) x) (* (* eps x) x)))))
                                            double code(double x, double eps) {
                                            	double t_0 = pow((x + eps), 5.0) - pow(x, 5.0);
                                            	double tmp;
                                            	if ((t_0 <= -5e-305) || !(t_0 <= 0.0)) {
                                            		tmp = ((fma(5.0, x, eps) * eps) * eps) * (eps * eps);
                                            	} else {
                                            		tmp = ((x * 5.0) * x) * ((eps * x) * x);
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x, eps)
                                            	t_0 = Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0))
                                            	tmp = 0.0
                                            	if ((t_0 <= -5e-305) || !(t_0 <= 0.0))
                                            		tmp = Float64(Float64(Float64(fma(5.0, x, eps) * eps) * eps) * Float64(eps * eps));
                                            	else
                                            		tmp = Float64(Float64(Float64(x * 5.0) * x) * Float64(Float64(eps * x) * x));
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e-305], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[(N[(N[(5.0 * x + eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * N[(eps * eps), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 5.0), $MachinePrecision] * x), $MachinePrecision] * N[(N[(eps * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\
                                            \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 0\right):\\
                                            \;\;\;\;\left(\left(\mathsf{fma}\left(5, x, \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \left(\varepsilon \cdot \varepsilon\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left(\left(x \cdot 5\right) \cdot x\right) \cdot \left(\left(\varepsilon \cdot x\right) \cdot x\right)\\
                                            
                                            
                                            \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))) < -4.99999999999999985e-305 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) #s(literal 5 binary64)) (pow.f64 x #s(literal 5 binary64)))

                                              1. Initial program 98.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} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                              4. Step-by-step derivation
                                                1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

                                                    1. Initial program 87.1%

                                                      \[{\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 + 4 \cdot \varepsilon\right)} \]
                                                    4. Step-by-step derivation
                                                      1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 8: 81.7% accurate, 8.0× speedup?

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

                                                          \[{\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 + 4 \cdot \varepsilon\right)} \]
                                                        4. Step-by-step derivation
                                                          1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \left(x \cdot x\right) \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot \left(5 \cdot \varepsilon\right)\right)} \]
                                                          2. Step-by-step derivation
                                                            1. Applied rewrites82.8%

                                                              \[\leadsto \left(x \cdot x\right) \cdot \left(\left(\left(\varepsilon \cdot x\right) \cdot 5\right) \cdot \color{blue}{x}\right) \]
                                                            2. Step-by-step derivation
                                                              1. Applied rewrites82.8%

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

                                                              Alternative 9: 81.7% accurate, 8.0× speedup?

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

                                                                \[{\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 + 4 \cdot \varepsilon\right)} \]
                                                              4. Step-by-step derivation
                                                                1. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \left(x \cdot x\right) \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot \left(5 \cdot \varepsilon\right)\right)} \]
                                                                2. Step-by-step derivation
                                                                  1. Applied rewrites82.8%

                                                                    \[\leadsto \left(x \cdot x\right) \cdot \left(\left(\left(\varepsilon \cdot x\right) \cdot 5\right) \cdot \color{blue}{x}\right) \]
                                                                  2. Step-by-step derivation
                                                                    1. Applied rewrites82.8%

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

                                                                    Alternative 10: 70.2% accurate, 8.0× speedup?

                                                                    \[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon \end{array} \]
                                                                    (FPCore (x eps) :precision binary64 (* (* (* (* (* x x) 10.0) eps) eps) eps))
                                                                    double code(double x, double eps) {
                                                                    	return ((((x * x) * 10.0) * eps) * eps) * eps;
                                                                    }
                                                                    
                                                                    real(8) function code(x, eps)
                                                                        real(8), intent (in) :: x
                                                                        real(8), intent (in) :: eps
                                                                        code = ((((x * x) * 10.0d0) * eps) * eps) * eps
                                                                    end function
                                                                    
                                                                    public static double code(double x, double eps) {
                                                                    	return ((((x * x) * 10.0) * eps) * eps) * eps;
                                                                    }
                                                                    
                                                                    def code(x, eps):
                                                                    	return ((((x * x) * 10.0) * eps) * eps) * eps
                                                                    
                                                                    function code(x, eps)
                                                                    	return Float64(Float64(Float64(Float64(Float64(x * x) * 10.0) * eps) * eps) * eps)
                                                                    end
                                                                    
                                                                    function tmp = code(x, eps)
                                                                    	tmp = ((((x * x) * 10.0) * eps) * eps) * eps;
                                                                    end
                                                                    
                                                                    code[x_, eps_] := N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 10.0), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision] * eps), $MachinePrecision]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \left(\left(\left(\left(x \cdot x\right) \cdot 10\right) \cdot \varepsilon\right) \cdot \varepsilon\right) \cdot \varepsilon
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Initial program 89.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} + -1 \cdot \left(2 \cdot {x}^{2} + 4 \cdot {x}^{2}\right)}{\varepsilon} + 4 \cdot x\right)}{\varepsilon} - 1\right)\right)} \]
                                                                    4. Step-by-step derivation
                                                                      1. mul-1-negN/A

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

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

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

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

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

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

                                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(5, x, \varepsilon\right), \varepsilon, \left(x \cdot x\right) \cdot 10\right) \cdot \color{blue}{{\varepsilon}^{3}} \]
                                                                      2. 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 \left(\varepsilon \cdot \varepsilon\right)\right) \cdot \varepsilon \]
                                                                        2. Taylor expanded in x around inf

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

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

                                                                          Reproduce

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