Average Error: 0.6 → 0.0
Time: 11.9s
Precision: 64
\[e^{x} - e^{x + 1}\]
\[\left(\sqrt{e^{x}} + \sqrt{e^{x + 1}}\right) \cdot \left(\sqrt{e^{x}} - \sqrt{e^{x}} \cdot \sqrt{e^{1}}\right)\]
e^{x} - e^{x + 1}
\left(\sqrt{e^{x}} + \sqrt{e^{x + 1}}\right) \cdot \left(\sqrt{e^{x}} - \sqrt{e^{x}} \cdot \sqrt{e^{1}}\right)
double f(double x) {
        double r1609764 = x;
        double r1609765 = exp(r1609764);
        double r1609766 = 1.0;
        double r1609767 = r1609764 + r1609766;
        double r1609768 = exp(r1609767);
        double r1609769 = r1609765 - r1609768;
        return r1609769;
}

double f(double x) {
        double r1609770 = x;
        double r1609771 = exp(r1609770);
        double r1609772 = sqrt(r1609771);
        double r1609773 = 1.0;
        double r1609774 = r1609770 + r1609773;
        double r1609775 = exp(r1609774);
        double r1609776 = sqrt(r1609775);
        double r1609777 = r1609772 + r1609776;
        double r1609778 = exp(r1609773);
        double r1609779 = sqrt(r1609778);
        double r1609780 = r1609772 * r1609779;
        double r1609781 = r1609772 - r1609780;
        double r1609782 = r1609777 * r1609781;
        return r1609782;
}

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. Using strategy rm
  7. Applied exp-sum0.0

    \[\leadsto \left(\sqrt{e^{x}} + \sqrt{e^{x + 1}}\right) \cdot \left(\sqrt{e^{x}} - \sqrt{\color{blue}{e^{x} \cdot e^{1}}}\right)\]
  8. Applied sqrt-prod0.0

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

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

Reproduce

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