Average Error: 0.0 → 0.0
Time: 2.5s
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 r39761 = 1.0;
        double r39762 = x;
        double r39763 = r39762 * r39762;
        double r39764 = r39761 - r39763;
        double r39765 = -r39764;
        double r39766 = exp(r39765);
        return r39766;
}

double f(double x) {
        double r39767 = exp(1.0);
        double r39768 = 1.0;
        double r39769 = x;
        double r39770 = r39769 * r39769;
        double r39771 = r39768 - r39770;
        double r39772 = -r39771;
        double r39773 = pow(r39767, r39772);
        return r39773;
}

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 2019308 
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))