Average Error: 0.0 → 0.0
Time: 6.1s
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 r35896 = 1.0;
        double r35897 = x;
        double r35898 = r35897 * r35897;
        double r35899 = r35896 - r35898;
        double r35900 = -r35899;
        double r35901 = exp(r35900);
        return r35901;
}

double f(double x) {
        double r35902 = exp(1.0);
        double r35903 = 1.0;
        double r35904 = x;
        double r35905 = r35904 * r35904;
        double r35906 = r35903 - r35905;
        double r35907 = -r35906;
        double r35908 = pow(r35902, r35907);
        return r35908;
}

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 exp-neg0.0

    \[\leadsto \color{blue}{\frac{1}{e^{1 - x \cdot x}}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity0.0

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

    \[\leadsto \frac{1}{\color{blue}{{\left(e^{1}\right)}^{\left(1 - x \cdot x\right)}}}\]
  7. Applied pow-flip0.0

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

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

Reproduce

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