Average Error: 0.0 → 0.0
Time: 860.0ms
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 r18382 = 1.0;
        double r18383 = x;
        double r18384 = r18383 * r18383;
        double r18385 = r18382 - r18384;
        double r18386 = -r18385;
        double r18387 = exp(r18386);
        return r18387;
}

double f(double x) {
        double r18388 = -1.0;
        double r18389 = exp(r18388);
        double r18390 = 1.0;
        double r18391 = x;
        double r18392 = r18391 * r18391;
        double r18393 = r18390 - r18392;
        double r18394 = pow(r18389, r18393);
        return r18394;
}

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 2020064 +o rules:numerics
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))