Average Error: 0.0 → 0.0
Time: 1.8s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[\sqrt{{\left(e^{-1}\right)}^{\left(1 - x \cdot x\right)}} \cdot \sqrt{{\left(e^{-1}\right)}^{\left(1 - x \cdot x\right)}}\]
e^{-\left(1 - x \cdot x\right)}
\sqrt{{\left(e^{-1}\right)}^{\left(1 - x \cdot x\right)}} \cdot \sqrt{{\left(e^{-1}\right)}^{\left(1 - x \cdot x\right)}}
double f(double x) {
        double r21385 = 1.0;
        double r21386 = x;
        double r21387 = r21386 * r21386;
        double r21388 = r21385 - r21387;
        double r21389 = -r21388;
        double r21390 = exp(r21389);
        return r21390;
}

double f(double x) {
        double r21391 = -1.0;
        double r21392 = exp(r21391);
        double r21393 = 1.0;
        double r21394 = x;
        double r21395 = r21394 * r21394;
        double r21396 = r21393 - r21395;
        double r21397 = pow(r21392, r21396);
        double r21398 = sqrt(r21397);
        double r21399 = r21398 * r21398;
        return r21399;
}

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-sqr-sqrt0.0

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

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

Reproduce

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