Average Error: 0.0 → 0.0
Time: 18.4s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[\sqrt{{\left(e^{-\left(x + 1\right)}\right)}^{\left(1 - x\right)}} \cdot \sqrt{{\left(e^{-\left(x + 1\right)}\right)}^{\left(1 - x\right)}}\]
double f(double x) {
        double r1926703 = 1.0;
        double r1926704 = x;
        double r1926705 = r1926704 * r1926704;
        double r1926706 = r1926703 - r1926705;
        double r1926707 = -r1926706;
        double r1926708 = exp(r1926707);
        return r1926708;
}

double f(double x) {
        double r1926709 = x;
        double r1926710 = 1.0;
        double r1926711 = r1926709 + r1926710;
        double r1926712 = -r1926711;
        double r1926713 = exp(r1926712);
        double r1926714 = r1926710 - r1926709;
        double r1926715 = pow(r1926713, r1926714);
        double r1926716 = sqrt(r1926715);
        double r1926717 = r1926716 * r1926716;
        return r1926717;
}

e^{-\left(1 - x \cdot x\right)}
\sqrt{{\left(e^{-\left(x + 1\right)}\right)}^{\left(1 - x\right)}} \cdot \sqrt{{\left(e^{-\left(x + 1\right)}\right)}^{\left(1 - x\right)}}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[e^{-\left(1 - x \cdot x\right)}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.0

    \[\leadsto e^{-\left(\color{blue}{1 \cdot 1} - x \cdot x\right)}\]
  4. Applied difference-of-squares0.0

    \[\leadsto e^{-\color{blue}{\left(1 + x\right) \cdot \left(1 - x\right)}}\]
  5. Applied distribute-lft-neg-in0.0

    \[\leadsto e^{\color{blue}{\left(-\left(1 + x\right)\right) \cdot \left(1 - x\right)}}\]
  6. Applied exp-prod0.0

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

    \[\leadsto \color{blue}{\sqrt{{\left(e^{-\left(1 + x\right)}\right)}^{\left(1 - x\right)}} \cdot \sqrt{{\left(e^{-\left(1 + x\right)}\right)}^{\left(1 - x\right)}}}\]
  9. Final simplification0.0

    \[\leadsto \sqrt{{\left(e^{-\left(x + 1\right)}\right)}^{\left(1 - x\right)}} \cdot \sqrt{{\left(e^{-\left(x + 1\right)}\right)}^{\left(1 - x\right)}}\]

Reproduce

herbie shell --seed 2019101 
(FPCore (x)
  :name "exp neg sub"
  (exp (- (- 1 (* x x)))))