Average Error: 0.6 → 0.4
Time: 7.7s
Precision: 64
\[e^{1} - e^{x}\]
\[\left(\sqrt{e^{x}} + \sqrt{e^{1}}\right) \cdot \left(\sqrt{e^{1}} - \sqrt{e^{x}}\right)\]
e^{1} - e^{x}
\left(\sqrt{e^{x}} + \sqrt{e^{1}}\right) \cdot \left(\sqrt{e^{1}} - \sqrt{e^{x}}\right)
double f(double x) {
        double r6968355 = 1.0;
        double r6968356 = exp(r6968355);
        double r6968357 = x;
        double r6968358 = exp(r6968357);
        double r6968359 = r6968356 - r6968358;
        return r6968359;
}

double f(double x) {
        double r6968360 = x;
        double r6968361 = exp(r6968360);
        double r6968362 = sqrt(r6968361);
        double r6968363 = 1.0;
        double r6968364 = exp(r6968363);
        double r6968365 = sqrt(r6968364);
        double r6968366 = r6968362 + r6968365;
        double r6968367 = r6968365 - r6968362;
        double r6968368 = r6968366 * r6968367;
        return r6968368;
}

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^{1} - e^{x}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.6

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

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

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

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

Reproduce

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