Average Error: 0.0 → 0.0
Time: 1.7s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{e}^{\left(-\left(1 - x \cdot x\right)\right)}\]
e^{-\left(1 - x \cdot x\right)}
{e}^{\left(-\left(1 - x \cdot x\right)\right)}
double f(double x) {
        double r29582 = 1.0;
        double r29583 = x;
        double r29584 = r29583 * r29583;
        double r29585 = r29582 - r29584;
        double r29586 = -r29585;
        double r29587 = exp(r29586);
        return r29587;
}

double f(double x) {
        double r29588 = exp(1.0);
        double r29589 = 1.0;
        double r29590 = x;
        double r29591 = r29590 * r29590;
        double r29592 = r29589 - r29591;
        double r29593 = -r29592;
        double r29594 = pow(r29588, r29593);
        return r29594;
}

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^{-\left(1 - x \cdot x\right)}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.0

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

    \[\leadsto \color{blue}{{\left(e^{1}\right)}^{\left(-\left(1 - x \cdot x\right)\right)}}\]
  5. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019322 
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))