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 r20259 = 1.0;
        double r20260 = x;
        double r20261 = r20260 * r20260;
        double r20262 = r20259 - r20261;
        double r20263 = -r20262;
        double r20264 = exp(r20263);
        return r20264;
}

double f(double x) {
        double r20265 = -1.0;
        double r20266 = 1.0;
        double r20267 = x;
        double r20268 = 2.0;
        double r20269 = pow(r20267, r20268);
        double r20270 = r20266 - r20269;
        double r20271 = r20265 * r20270;
        double r20272 = exp(r20271);
        double r20273 = exp(r20265);
        double r20274 = -r20267;
        double r20275 = r20267 * r20267;
        double r20276 = fma(r20274, r20267, r20275);
        double r20277 = pow(r20273, r20276);
        double r20278 = r20272 * r20277;
        return r20278;
}

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