Average Error: 0.0 → 0.0
Time: 6.0s
Precision: 64
\[e^{x - 1}\]
\[e^{x} \cdot e^{-1}\]
e^{x - 1}
e^{x} \cdot e^{-1}
double f(double x) {
        double r1298360 = x;
        double r1298361 = 1.0;
        double r1298362 = r1298360 - r1298361;
        double r1298363 = exp(r1298362);
        return r1298363;
}

double f(double x) {
        double r1298364 = x;
        double r1298365 = exp(r1298364);
        double r1298366 = 1.0;
        double r1298367 = -r1298366;
        double r1298368 = exp(r1298367);
        double r1298369 = r1298365 * r1298368;
        return r1298369;
}

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^{x - 1}\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto e^{\color{blue}{x + \left(-1\right)}}\]
  4. Applied exp-sum0.0

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

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

Reproduce

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