Average Error: 0.0 → 0.0
Time: 1.3s
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 r18403 = 1.0;
        double r18404 = x;
        double r18405 = r18404 * r18404;
        double r18406 = r18403 - r18405;
        double r18407 = -r18406;
        double r18408 = exp(r18407);
        return r18408;
}

double f(double x) {
        double r18409 = exp(1.0);
        double r18410 = 1.0;
        double r18411 = x;
        double r18412 = r18411 * r18411;
        double r18413 = r18410 - r18412;
        double r18414 = -r18413;
        double r18415 = pow(r18409, r18414);
        return r18415;
}

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 *-un-lft-identity0.0

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

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

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

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

Reproduce

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