Average Error: 0.0 → 0.0
Time: 1.3s
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 r17949 = 1.0;
        double r17950 = x;
        double r17951 = r17950 * r17950;
        double r17952 = r17949 - r17951;
        double r17953 = -r17952;
        double r17954 = exp(r17953);
        return r17954;
}

double f(double x) {
        double r17955 = -1.0;
        double r17956 = exp(r17955);
        double r17957 = 1.0;
        double r17958 = x;
        double r17959 = r17958 * r17958;
        double r17960 = r17957 - r17959;
        double r17961 = pow(r17956, r17960);
        return r17961;
}

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