Average Error: 0.0 → 0.0
Time: 1.8s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[e^{-1 \cdot \left(1 - {x}^{2}\right)} \cdot {\left(e^{-1}\right)}^{\left(\mathsf{fma}\left(-x, x, x \cdot x\right)\right)}\]
e^{-\left(1 - x \cdot x\right)}
e^{-1 \cdot \left(1 - {x}^{2}\right)} \cdot {\left(e^{-1}\right)}^{\left(\mathsf{fma}\left(-x, x, x \cdot x\right)\right)}
double f(double x) {
        double r20269 = 1.0;
        double r20270 = x;
        double r20271 = r20270 * r20270;
        double r20272 = r20269 - r20271;
        double r20273 = -r20272;
        double r20274 = exp(r20273);
        return r20274;
}

double f(double x) {
        double r20275 = -1.0;
        double r20276 = 1.0;
        double r20277 = x;
        double r20278 = 2.0;
        double r20279 = pow(r20277, r20278);
        double r20280 = r20276 - r20279;
        double r20281 = r20275 * r20280;
        double r20282 = exp(r20281);
        double r20283 = exp(r20275);
        double r20284 = -r20277;
        double r20285 = r20277 * r20277;
        double r20286 = fma(r20284, r20277, r20285);
        double r20287 = pow(r20283, r20286);
        double r20288 = r20282 * r20287;
        return r20288;
}

Error

Bits error versus x

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 add-cube-cbrt0.0

    \[\leadsto {\left(e^{-1}\right)}^{\left(\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}} - x \cdot x\right)}\]
  7. Applied prod-diff0.0

    \[\leadsto {\left(e^{-1}\right)}^{\color{blue}{\left(\mathsf{fma}\left(\sqrt[3]{1} \cdot \sqrt[3]{1}, \sqrt[3]{1}, -x \cdot x\right) + \mathsf{fma}\left(-x, x, x \cdot x\right)\right)}}\]
  8. Applied unpow-prod-up0.0

    \[\leadsto \color{blue}{{\left(e^{-1}\right)}^{\left(\mathsf{fma}\left(\sqrt[3]{1} \cdot \sqrt[3]{1}, \sqrt[3]{1}, -x \cdot x\right)\right)} \cdot {\left(e^{-1}\right)}^{\left(\mathsf{fma}\left(-x, x, x \cdot x\right)\right)}}\]
  9. Simplified0.0

    \[\leadsto \color{blue}{e^{-1 \cdot \left(1 - {x}^{2}\right)}} \cdot {\left(e^{-1}\right)}^{\left(\mathsf{fma}\left(-x, x, x \cdot x\right)\right)}\]
  10. Final simplification0.0

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

Reproduce

herbie shell --seed 2020081 +o rules:numerics
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))