Average Error: 0.6 → 0.0
Time: 12.9s
Precision: 64
\[e^{x} - e^{x + 1}\]
\[\left(\sqrt{e^{x}} + \sqrt{e^{1 + x}}\right) \cdot \left(\sqrt{e^{x}} - \sqrt{e^{1 + x}}\right)\]
e^{x} - e^{x + 1}
\left(\sqrt{e^{x}} + \sqrt{e^{1 + x}}\right) \cdot \left(\sqrt{e^{x}} - \sqrt{e^{1 + x}}\right)
double f(double x) {
        double r8587751 = x;
        double r8587752 = exp(r8587751);
        double r8587753 = 1.0;
        double r8587754 = r8587751 + r8587753;
        double r8587755 = exp(r8587754);
        double r8587756 = r8587752 - r8587755;
        return r8587756;
}

double f(double x) {
        double r8587757 = x;
        double r8587758 = exp(r8587757);
        double r8587759 = sqrt(r8587758);
        double r8587760 = 1.0;
        double r8587761 = r8587760 + r8587757;
        double r8587762 = exp(r8587761);
        double r8587763 = sqrt(r8587762);
        double r8587764 = r8587759 + r8587763;
        double r8587765 = r8587759 - r8587763;
        double r8587766 = r8587764 * r8587765;
        return r8587766;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.6

    \[e^{x} - e^{x + 1}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.7

    \[\leadsto e^{x} - \color{blue}{\sqrt{e^{x + 1}} \cdot \sqrt{e^{x + 1}}}\]
  4. Applied add-sqr-sqrt0.7

    \[\leadsto \color{blue}{\sqrt{e^{x}} \cdot \sqrt{e^{x}}} - \sqrt{e^{x + 1}} \cdot \sqrt{e^{x + 1}}\]
  5. Applied difference-of-squares0.0

    \[\leadsto \color{blue}{\left(\sqrt{e^{x}} + \sqrt{e^{x + 1}}\right) \cdot \left(\sqrt{e^{x}} - \sqrt{e^{x + 1}}\right)}\]
  6. Final simplification0.0

    \[\leadsto \left(\sqrt{e^{x}} + \sqrt{e^{1 + x}}\right) \cdot \left(\sqrt{e^{x}} - \sqrt{e^{1 + x}}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "exp(x)-exp(x+1)"
  (- (exp x) (exp (+ x 1.0))))