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 r22203 = 1.0;
        double r22204 = x;
        double r22205 = r22204 * r22204;
        double r22206 = r22203 - r22205;
        double r22207 = -r22206;
        double r22208 = exp(r22207);
        return r22208;
}

double f(double x) {
        double r22209 = -1.0;
        double r22210 = 1.0;
        double r22211 = x;
        double r22212 = 2.0;
        double r22213 = pow(r22211, r22212);
        double r22214 = r22210 - r22213;
        double r22215 = r22209 * r22214;
        double r22216 = exp(r22215);
        double r22217 = exp(r22209);
        double r22218 = -r22211;
        double r22219 = r22211 * r22211;
        double r22220 = fma(r22218, r22211, r22219);
        double r22221 = pow(r22217, r22220);
        double r22222 = r22216 * r22221;
        return r22222;
}

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)))))