Average Error: 0.0 → 0.0
Time: 7.4s
Precision: 64
\[e^{1 - x}\]
\[\frac{e^{1}}{e^{x}}\]
e^{1 - x}
\frac{e^{1}}{e^{x}}
double f(double x) {
        double r538432 = 1.0;
        double r538433 = x;
        double r538434 = r538432 - r538433;
        double r538435 = exp(r538434);
        return r538435;
}

double f(double x) {
        double r538436 = 1.0;
        double r538437 = exp(r538436);
        double r538438 = x;
        double r538439 = exp(r538438);
        double r538440 = r538437 / r538439;
        return r538440;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[e^{1 - x}\]
  2. Using strategy rm
  3. Applied exp-diff0.0

    \[\leadsto \color{blue}{\frac{e^{1}}{e^{x}}}\]
  4. Final simplification0.0

    \[\leadsto \frac{e^{1}}{e^{x}}\]

Reproduce

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