Average Error: 7.5 → 0.6
Time: 11.5s
Precision: binary64
Cost: 72136
\[\left(-1000000000 \leq x \land x \leq 1000000000\right) \land \left(-1 \leq \varepsilon \land \varepsilon \leq 1\right)\]
\[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
\[\begin{array}{l} t_0 := {\left(x + \varepsilon\right)}^{5}\\ t_1 := t_0 - {x}^{5}\\ t_2 := \sqrt[3]{-{x}^{5}}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-310}:\\ \;\;\;\;{\varepsilon}^{5} + 5 \cdot \left(x \cdot {\varepsilon}^{4}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left({t_2}^{2}, t_2, t_0\right)\\ \end{array} \]
(FPCore (x eps) :precision binary64 (- (pow (+ x eps) 5.0) (pow x 5.0)))
(FPCore (x eps)
 :precision binary64
 (let* ((t_0 (pow (+ x eps) 5.0))
        (t_1 (- t_0 (pow x 5.0)))
        (t_2 (cbrt (- (pow x 5.0)))))
   (if (<= t_1 -1e-310)
     (+ (pow eps 5.0) (* 5.0 (* x (pow eps 4.0))))
     (if (<= t_1 0.0)
       (* (pow x 4.0) (* eps 5.0))
       (fma (pow t_2 2.0) t_2 t_0)))))
double code(double x, double eps) {
	return pow((x + eps), 5.0) - pow(x, 5.0);
}
double code(double x, double eps) {
	double t_0 = pow((x + eps), 5.0);
	double t_1 = t_0 - pow(x, 5.0);
	double t_2 = cbrt(-pow(x, 5.0));
	double tmp;
	if (t_1 <= -1e-310) {
		tmp = pow(eps, 5.0) + (5.0 * (x * pow(eps, 4.0)));
	} else if (t_1 <= 0.0) {
		tmp = pow(x, 4.0) * (eps * 5.0);
	} else {
		tmp = fma(pow(t_2, 2.0), t_2, t_0);
	}
	return tmp;
}
function code(x, eps)
	return Float64((Float64(x + eps) ^ 5.0) - (x ^ 5.0))
end
function code(x, eps)
	t_0 = Float64(x + eps) ^ 5.0
	t_1 = Float64(t_0 - (x ^ 5.0))
	t_2 = cbrt(Float64(-(x ^ 5.0)))
	tmp = 0.0
	if (t_1 <= -1e-310)
		tmp = Float64((eps ^ 5.0) + Float64(5.0 * Float64(x * (eps ^ 4.0))));
	elseif (t_1 <= 0.0)
		tmp = Float64((x ^ 4.0) * Float64(eps * 5.0));
	else
		tmp = fma((t_2 ^ 2.0), t_2, t_0);
	end
	return tmp
end
code[x_, eps_] := N[(N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision] - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]
code[x_, eps_] := Block[{t$95$0 = N[Power[N[(x + eps), $MachinePrecision], 5.0], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[(-N[Power[x, 5.0], $MachinePrecision]), 1/3], $MachinePrecision]}, If[LessEqual[t$95$1, -1e-310], N[(N[Power[eps, 5.0], $MachinePrecision] + N[(5.0 * N[(x * N[Power[eps, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[Power[x, 4.0], $MachinePrecision] * N[(eps * 5.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[t$95$2, 2.0], $MachinePrecision] * t$95$2 + t$95$0), $MachinePrecision]]]]]]
{\left(x + \varepsilon\right)}^{5} - {x}^{5}
\begin{array}{l}
t_0 := {\left(x + \varepsilon\right)}^{5}\\
t_1 := t_0 - {x}^{5}\\
t_2 := \sqrt[3]{-{x}^{5}}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-310}:\\
\;\;\;\;{\varepsilon}^{5} + 5 \cdot \left(x \cdot {\varepsilon}^{4}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left({t_2}^{2}, t_2, t_0\right)\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < -9.999999999999969e-311

    1. Initial program 1.4

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

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

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

    if -9.999999999999969e-311 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < 0.0

    1. Initial program 8.9

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

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

      \[\leadsto \color{blue}{\varepsilon \cdot \left(5 \cdot {x}^{4} + \varepsilon \cdot \left({x}^{3} \cdot 10\right)\right)} \]
      Proof
      (*.f64 eps (+.f64 (*.f64 5 (pow.f64 x 4)) (*.f64 eps (*.f64 (pow.f64 x 3) 10)))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (*.f64 (Rewrite<= metadata-eval (+.f64 4 1)) (pow.f64 x 4)) (*.f64 eps (*.f64 (pow.f64 x 3) 10)))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (Rewrite<= distribute-lft1-in_binary64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4))) (*.f64 eps (*.f64 (pow.f64 x 3) 10)))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (*.f64 (pow.f64 x 3) (Rewrite<= metadata-eval (+.f64 4 6)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (*.f64 (pow.f64 x 3) (+.f64 4 (Rewrite<= metadata-eval (+.f64 2 4))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (Rewrite<= distribute-lft-out_binary64 (+.f64 (*.f64 (pow.f64 x 3) 4) (*.f64 (pow.f64 x 3) (+.f64 2 4))))))): 1 points increase in error, 1 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 4 (pow.f64 x 3))) (*.f64 (pow.f64 x 3) (+.f64 2 4)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (Rewrite=> cube-mult_binary64 (*.f64 x (*.f64 x x))) (+.f64 2 4)))))): 1 points increase in error, 2 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (*.f64 x (Rewrite<= unpow2_binary64 (pow.f64 x 2))) (+.f64 2 4)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (+.f64 (*.f64 4 (pow.f64 x 3)) (Rewrite<= associate-*r*_binary64 (*.f64 x (*.f64 (pow.f64 x 2) (+.f64 2 4)))))))): 1 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 x (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (*.f64 eps (+.f64 (*.f64 4 (pow.f64 x 3)) (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 eps (+.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) (Rewrite=> *-commutative_binary64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) eps)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)) eps) (*.f64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) eps) eps))): 2 points increase in error, 1 points decrease in error
      (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 eps (+.f64 (*.f64 4 (pow.f64 x 4)) (pow.f64 x 4)))) (*.f64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) eps) eps)): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 eps (*.f64 4 (pow.f64 x 4))) (*.f64 eps (pow.f64 x 4)))) (*.f64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) eps) eps)): 4 points increase in error, 1 points decrease in error
      (+.f64 (+.f64 (Rewrite=> associate-*r*_binary64 (*.f64 (*.f64 eps 4) (pow.f64 x 4))) (*.f64 eps (pow.f64 x 4))) (*.f64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) eps) eps)): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 4 eps)) (pow.f64 x 4)) (*.f64 eps (pow.f64 x 4))) (*.f64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) eps) eps)): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= distribute-rgt-in_binary64 (*.f64 (pow.f64 x 4) (+.f64 (*.f64 4 eps) eps))) (*.f64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) eps) eps)): 1 points increase in error, 6 points decrease in error
      (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4))) (*.f64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) eps) eps)): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (Rewrite<= associate-*r*_binary64 (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) (*.f64 eps eps)))): 2 points increase in error, 4 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (+.f64 (*.f64 4 (pow.f64 x 3)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) (Rewrite<= unpow2_binary64 (pow.f64 eps 2)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (+.f64 (Rewrite=> *-commutative_binary64 (*.f64 (pow.f64 x 3) 4)) (*.f64 (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2))) x)) (pow.f64 eps 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (+.f64 (*.f64 (pow.f64 x 3) 4) (Rewrite=> *-commutative_binary64 (*.f64 x (+.f64 (*.f64 2 (pow.f64 x 2)) (*.f64 4 (pow.f64 x 2)))))) (pow.f64 eps 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (+.f64 (*.f64 (pow.f64 x 3) 4) (*.f64 x (Rewrite=> distribute-rgt-out_binary64 (*.f64 (pow.f64 x 2) (+.f64 2 4))))) (pow.f64 eps 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (+.f64 (*.f64 (pow.f64 x 3) 4) (Rewrite=> associate-*r*_binary64 (*.f64 (*.f64 x (pow.f64 x 2)) (+.f64 2 4)))) (pow.f64 eps 2))): 0 points increase in error, 2 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (+.f64 (*.f64 (pow.f64 x 3) 4) (*.f64 (*.f64 x (Rewrite=> unpow2_binary64 (*.f64 x x))) (+.f64 2 4))) (pow.f64 eps 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (+.f64 (*.f64 (pow.f64 x 3) 4) (*.f64 (Rewrite<= cube-mult_binary64 (pow.f64 x 3)) (+.f64 2 4))) (pow.f64 eps 2))): 3 points increase in error, 1 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (Rewrite=> distribute-lft-out_binary64 (*.f64 (pow.f64 x 3) (+.f64 4 (+.f64 2 4)))) (pow.f64 eps 2))): 1 points increase in error, 1 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (*.f64 (pow.f64 x 3) (+.f64 4 (Rewrite=> metadata-eval 6))) (pow.f64 eps 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (*.f64 (pow.f64 x 3) (Rewrite=> metadata-eval 10)) (pow.f64 eps 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (*.f64 (pow.f64 x 3) (Rewrite<= metadata-eval (+.f64 2 8))) (pow.f64 eps 2))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (Rewrite<= associate-*r*_binary64 (*.f64 (pow.f64 x 3) (*.f64 (+.f64 2 8) (pow.f64 eps 2))))): 4 points increase in error, 2 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (pow.f64 x 3) (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 eps 2) (+.f64 2 8))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (*.f64 (pow.f64 x 3) (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 2 (pow.f64 eps 2)) (*.f64 8 (pow.f64 eps 2)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 (+.f64 (*.f64 4 eps) eps) (pow.f64 x 4)) (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 (*.f64 2 (pow.f64 eps 2)) (*.f64 8 (pow.f64 eps 2))) (pow.f64 x 3)))): 0 points increase in error, 0 points decrease in error
    4. Taylor expanded in eps around 0 0.2

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

      \[\leadsto \color{blue}{{x}^{4} \cdot \left(\varepsilon \cdot 5\right)} \]
      Proof
      (*.f64 (pow.f64 x 4) (*.f64 eps 5)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (pow.f64 x 4) eps) 5)): 10 points increase in error, 2 points decrease in error
      (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 eps (pow.f64 x 4))) 5): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 5 (*.f64 eps (pow.f64 x 4)))): 0 points increase in error, 0 points decrease in error

    if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5))

    1. Initial program 1.4

      \[{\left(x + \varepsilon\right)}^{5} - {x}^{5} \]
    2. Applied egg-rr1.4

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{-{x}^{5}}\right)}^{2}, \sqrt[3]{-{x}^{5}}, {\left(x + \varepsilon\right)}^{5}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.6

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

Alternatives

Alternative 1
Error0.4
Cost39880
\[\begin{array}{l} t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;t_0 \leq 0:\\ \;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error0.6
Cost39880
\[\begin{array}{l} t_0 := {\left(x + \varepsilon\right)}^{5} - {x}^{5}\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{-310}:\\ \;\;\;\;{\varepsilon}^{5} + 5 \cdot \left(x \cdot {\varepsilon}^{4}\right)\\ \mathbf{elif}\;t_0 \leq 0:\\ \;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error1.4
Cost7944
\[\begin{array}{l} t_0 := \varepsilon \cdot \left(\left(x \cdot \left(x + \varepsilon\right)\right) \cdot \left(x \cdot \left(\varepsilon \cdot 10\right)\right)\right) + \varepsilon \cdot \left(5 \cdot {x}^{4}\right)\\ \mathbf{if}\;x \leq -1.842015941374647 \cdot 10^{-59}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 6.817229610759429 \cdot 10^{-70}:\\ \;\;\;\;{\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error1.4
Cost7816
\[\begin{array}{l} t_0 := \varepsilon \cdot \left(5 \cdot {x}^{4} + \left(x \cdot \left(x + \varepsilon\right)\right) \cdot \left(x \cdot \left(\varepsilon \cdot 10\right)\right)\right)\\ \mathbf{if}\;x \leq -1.842015941374647 \cdot 10^{-59}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 6.817229610759429 \cdot 10^{-70}:\\ \;\;\;\;{\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error2.1
Cost7176
\[\begin{array}{l} \mathbf{if}\;x \leq -6.669606483217884 \cdot 10^{-27}:\\ \;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5\right)\\ \mathbf{elif}\;x \leq 6.817229610759429 \cdot 10^{-70}:\\ \;\;\;\;{\varepsilon}^{4} \cdot \left(\varepsilon + x \cdot 5\right)\\ \mathbf{else}:\\ \;\;\;\;\varepsilon \cdot \left(5 \cdot {x}^{4}\right)\\ \end{array} \]
Alternative 6
Error2.2
Cost7176
\[\begin{array}{l} \mathbf{if}\;x \leq -6.669606483217884 \cdot 10^{-27}:\\ \;\;\;\;\frac{{x}^{4}}{\frac{1}{\varepsilon \cdot 5}}\\ \mathbf{elif}\;x \leq 6.817229610759429 \cdot 10^{-70}:\\ \;\;\;\;{\varepsilon}^{4} \cdot \left(\varepsilon + x \cdot 5\right)\\ \mathbf{else}:\\ \;\;\;\;\varepsilon \cdot \left(5 \cdot {x}^{4}\right)\\ \end{array} \]
Alternative 7
Error2.2
Cost7048
\[\begin{array}{l} t_0 := {x}^{4} \cdot \left(\varepsilon \cdot 5\right)\\ \mathbf{if}\;x \leq -6.669606483217884 \cdot 10^{-27}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 6.817229610759429 \cdot 10^{-70}:\\ \;\;\;\;{\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error2.2
Cost7048
\[\begin{array}{l} \mathbf{if}\;x \leq -6.669606483217884 \cdot 10^{-27}:\\ \;\;\;\;{x}^{4} \cdot \left(\varepsilon \cdot 5\right)\\ \mathbf{elif}\;x \leq 6.817229610759429 \cdot 10^{-70}:\\ \;\;\;\;{\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;\varepsilon \cdot \left(5 \cdot {x}^{4}\right)\\ \end{array} \]
Alternative 9
Error2.2
Cost6792
\[\begin{array}{l} \mathbf{if}\;x \leq -6.669606483217884 \cdot 10^{-27}:\\ \;\;\;\;\left(x \cdot x\right) \cdot \frac{x \cdot x}{\frac{0.2}{\varepsilon}}\\ \mathbf{elif}\;x \leq 6.817229610759429 \cdot 10^{-70}:\\ \;\;\;\;{\varepsilon}^{5}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{\varepsilon}{0.2}\right)\\ \end{array} \]
Alternative 10
Error18.4
Cost704
\[\varepsilon \cdot \left(\varepsilon \cdot \left(\varepsilon \cdot \left(10 \cdot \left(x \cdot x\right)\right)\right)\right) \]
Alternative 11
Error11.0
Cost704
\[\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \frac{\varepsilon}{0.2}\right) \]

Error

Reproduce

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