Average Error: 0.0 → 0
Time: 4.3s
Precision: 64
\[\frac{1}{e^{x}}\]
\[e^{-x} \cdot 1\]
\frac{1}{e^{x}}
e^{-x} \cdot 1
double f(double x) {
        double r18941314 = 1.0;
        double r18941315 = x;
        double r18941316 = exp(r18941315);
        double r18941317 = r18941314 / r18941316;
        return r18941317;
}

double f(double x) {
        double r18941318 = x;
        double r18941319 = -r18941318;
        double r18941320 = exp(r18941319);
        double r18941321 = 1.0;
        double r18941322 = r18941320 * r18941321;
        return r18941322;
}

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

    \[\frac{1}{e^{x}}\]
  2. Using strategy rm
  3. Applied div-inv0.0

    \[\leadsto \color{blue}{1 \cdot \frac{1}{e^{x}}}\]
  4. Simplified0

    \[\leadsto 1 \cdot \color{blue}{e^{-x}}\]
  5. Final simplification0

    \[\leadsto e^{-x} \cdot 1\]

Reproduce

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