Average Error: 0.0 → 0.0
Time: 34.8s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[e^{\log \left(\sqrt{e}\right) \cdot \mathsf{fma}\left(x, x, -1\right)} \cdot \mathsf{expm1}\left(\left(\mathsf{log1p}\left(\left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(x, x, -1\right)\right)}\right)\right)\right)\right)\]
e^{-\left(1 - x \cdot x\right)}
e^{\log \left(\sqrt{e}\right) \cdot \mathsf{fma}\left(x, x, -1\right)} \cdot \mathsf{expm1}\left(\left(\mathsf{log1p}\left(\left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(x, x, -1\right)\right)}\right)\right)\right)\right)
double f(double x) {
        double r4539146 = 1.0;
        double r4539147 = x;
        double r4539148 = r4539147 * r4539147;
        double r4539149 = r4539146 - r4539148;
        double r4539150 = -r4539149;
        double r4539151 = exp(r4539150);
        return r4539151;
}

double f(double x) {
        double r4539152 = exp(1.0);
        double r4539153 = sqrt(r4539152);
        double r4539154 = log(r4539153);
        double r4539155 = x;
        double r4539156 = -1.0;
        double r4539157 = fma(r4539155, r4539155, r4539156);
        double r4539158 = r4539154 * r4539157;
        double r4539159 = exp(r4539158);
        double r4539160 = pow(r4539153, r4539157);
        double r4539161 = log1p(r4539160);
        double r4539162 = expm1(r4539161);
        double r4539163 = r4539159 * r4539162;
        return r4539163;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[e^{-\left(1 - x \cdot x\right)}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{e^{\mathsf{fma}\left(x, x, -1\right)}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.0

    \[\leadsto e^{\color{blue}{1 \cdot \mathsf{fma}\left(x, x, -1\right)}}\]
  5. Applied exp-prod0.0

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

    \[\leadsto {\color{blue}{e}}^{\left(\mathsf{fma}\left(x, x, -1\right)\right)}\]
  7. Using strategy rm
  8. Applied add-sqr-sqrt1.0

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

    \[\leadsto \color{blue}{{\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(x, x, -1\right)\right)} \cdot {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(x, x, -1\right)\right)}}\]
  10. Using strategy rm
  11. Applied pow-to-exp0.0

    \[\leadsto \color{blue}{e^{\log \left(\sqrt{e}\right) \cdot \mathsf{fma}\left(x, x, -1\right)}} \cdot {\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(x, x, -1\right)\right)}\]
  12. Using strategy rm
  13. Applied expm1-log1p-u0.0

    \[\leadsto e^{\log \left(\sqrt{e}\right) \cdot \mathsf{fma}\left(x, x, -1\right)} \cdot \color{blue}{\mathsf{expm1}\left(\left(\mathsf{log1p}\left(\left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(x, x, -1\right)\right)}\right)\right)\right)\right)}\]
  14. Final simplification0.0

    \[\leadsto e^{\log \left(\sqrt{e}\right) \cdot \mathsf{fma}\left(x, x, -1\right)} \cdot \mathsf{expm1}\left(\left(\mathsf{log1p}\left(\left({\left(\sqrt{e}\right)}^{\left(\mathsf{fma}\left(x, x, -1\right)\right)}\right)\right)\right)\right)\]

Reproduce

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