Average Error: 0.0 → 0.0
Time: 5.8s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[e^{-1 \cdot \left(1 - {x}^{2}\right)}\]
e^{-\left(1 - x \cdot x\right)}
e^{-1 \cdot \left(1 - {x}^{2}\right)}
double f(double x) {
        double r21711 = 1.0;
        double r21712 = x;
        double r21713 = r21712 * r21712;
        double r21714 = r21711 - r21713;
        double r21715 = -r21714;
        double r21716 = exp(r21715);
        return r21716;
}

double f(double x) {
        double r21717 = -1.0;
        double r21718 = 1.0;
        double r21719 = x;
        double r21720 = 2.0;
        double r21721 = pow(r21719, r21720);
        double r21722 = r21718 - r21721;
        double r21723 = r21717 * r21722;
        double r21724 = exp(r21723);
        return r21724;
}

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. Using strategy rm
  6. Applied add-cbrt-cube0.1

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

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

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

Reproduce

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