Average Error: 0.0 → 0.0
Time: 3.3s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[\sqrt{e^{-\left(1 - x \cdot x\right)}} \cdot \sqrt{e^{-\left(1 - x \cdot x\right)}}\]
e^{-\left(1 - x \cdot x\right)}
\sqrt{e^{-\left(1 - x \cdot x\right)}} \cdot \sqrt{e^{-\left(1 - x \cdot x\right)}}
double f(double x) {
        double r31353 = 1.0;
        double r31354 = x;
        double r31355 = r31354 * r31354;
        double r31356 = r31353 - r31355;
        double r31357 = -r31356;
        double r31358 = exp(r31357);
        return r31358;
}

double f(double x) {
        double r31359 = 1.0;
        double r31360 = x;
        double r31361 = r31360 * r31360;
        double r31362 = r31359 - r31361;
        double r31363 = -r31362;
        double r31364 = exp(r31363);
        double r31365 = sqrt(r31364);
        double r31366 = r31365 * r31365;
        return r31366;
}

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

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

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

Reproduce

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