Average Error: 0.0 → 0.0
Time: 1.7s
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 r22065 = 1.0;
        double r22066 = x;
        double r22067 = r22066 * r22066;
        double r22068 = r22065 - r22067;
        double r22069 = -r22068;
        double r22070 = exp(r22069);
        return r22070;
}

double f(double x) {
        double r22071 = exp(1.0);
        double r22072 = 1.0;
        double r22073 = x;
        double r22074 = r22073 * r22073;
        double r22075 = r22072 - r22074;
        double r22076 = -r22075;
        double r22077 = pow(r22071, r22076);
        return r22077;
}

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 2020060 
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))