Average Error: 0.0 → 0.0
Time: 2.5s
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 r24828 = 1.0;
        double r24829 = x;
        double r24830 = r24829 * r24829;
        double r24831 = r24828 - r24830;
        double r24832 = -r24831;
        double r24833 = exp(r24832);
        return r24833;
}

double f(double x) {
        double r24834 = -1.0;
        double r24835 = 1.0;
        double r24836 = x;
        double r24837 = 2.0;
        double r24838 = pow(r24836, r24837);
        double r24839 = r24835 - r24838;
        double r24840 = r24834 * r24839;
        double r24841 = exp(r24840);
        double r24842 = exp(r24834);
        double r24843 = -r24836;
        double r24844 = r24836 * r24836;
        double r24845 = fma(r24843, r24836, r24844);
        double r24846 = pow(r24842, r24845);
        double r24847 = r24841 * r24846;
        return r24847;
}

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