Average Error: 0.0 → 0.0
Time: 1.6s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[\frac{e^{-1 \cdot 1}}{{\left(e^{-1}\right)}^{\left(x \cdot x\right)}}\]
e^{-\left(1 - x \cdot x\right)}
\frac{e^{-1 \cdot 1}}{{\left(e^{-1}\right)}^{\left(x \cdot x\right)}}
double f(double x) {
        double r20286 = 1.0;
        double r20287 = x;
        double r20288 = r20287 * r20287;
        double r20289 = r20286 - r20288;
        double r20290 = -r20289;
        double r20291 = exp(r20290);
        return r20291;
}

double f(double x) {
        double r20292 = -1.0;
        double r20293 = 1.0;
        double r20294 = r20292 * r20293;
        double r20295 = exp(r20294);
        double r20296 = exp(r20292);
        double r20297 = x;
        double r20298 = r20297 * r20297;
        double r20299 = pow(r20296, r20298);
        double r20300 = r20295 / r20299;
        return r20300;
}

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. Using strategy rm
  6. Applied pow-sub0.0

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

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

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

Reproduce

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