Average Error: 0.0 → 0.0
Time: 3.9s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[\frac{{\left(e^{-\left(\sqrt{1} + x\right)}\right)}^{\left(\sqrt{1}\right)}}{{\left(e^{-\left(\sqrt{1} + x\right)}\right)}^{x}}\]
e^{-\left(1 - x \cdot x\right)}
\frac{{\left(e^{-\left(\sqrt{1} + x\right)}\right)}^{\left(\sqrt{1}\right)}}{{\left(e^{-\left(\sqrt{1} + x\right)}\right)}^{x}}
double f(double x) {
        double r35774 = 1.0;
        double r35775 = x;
        double r35776 = r35775 * r35775;
        double r35777 = r35774 - r35776;
        double r35778 = -r35777;
        double r35779 = exp(r35778);
        return r35779;
}

double f(double x) {
        double r35780 = 1.0;
        double r35781 = sqrt(r35780);
        double r35782 = x;
        double r35783 = r35781 + r35782;
        double r35784 = -r35783;
        double r35785 = exp(r35784);
        double r35786 = pow(r35785, r35781);
        double r35787 = pow(r35785, r35782);
        double r35788 = r35786 / r35787;
        return r35788;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[e^{-\left(1 - x \cdot x\right)}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.0

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

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

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

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

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

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

Reproduce

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