Average Error: 0.0 → 0.0
Time: 1.5s
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 r20923 = 1.0;
        double r20924 = x;
        double r20925 = r20924 * r20924;
        double r20926 = r20923 - r20925;
        double r20927 = -r20926;
        double r20928 = exp(r20927);
        return r20928;
}

double f(double x) {
        double r20929 = -1.0;
        double r20930 = 1.0;
        double r20931 = r20929 * r20930;
        double r20932 = exp(r20931);
        double r20933 = exp(r20929);
        double r20934 = x;
        double r20935 = r20934 * r20934;
        double r20936 = pow(r20933, r20935);
        double r20937 = r20932 / r20936;
        return r20937;
}

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