Average Error: 0.0 → 0.0
Time: 18.5s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{-1}\right)}^{\left(1 - x \cdot x\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{-1}\right)}^{\left(1 - x \cdot x\right)}
double f(double x) {
        double r38990 = 1.0;
        double r38991 = x;
        double r38992 = r38991 * r38991;
        double r38993 = r38990 - r38992;
        double r38994 = -r38993;
        double r38995 = exp(r38994);
        return r38995;
}

double f(double x) {
        double r38996 = -1.0;
        double r38997 = exp(r38996);
        double r38998 = 1.0;
        double r38999 = x;
        double r39000 = r38999 * r38999;
        double r39001 = r38998 - r39000;
        double r39002 = pow(r38997, r39001);
        return r39002;
}

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 neg-mul-10.0

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

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

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

Reproduce

herbie shell --seed 2019323 +o rules:numerics
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))