Average Error: 0.0 → 0.0
Time: 3.2s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}
double f(double x) {
        double r102213 = 1.0;
        double r102214 = x;
        double r102215 = r102214 * r102214;
        double r102216 = r102213 - r102215;
        double r102217 = -r102216;
        double r102218 = exp(r102217);
        return r102218;
}

double f(double x) {
        double r102219 = 1.0;
        double r102220 = sqrt(r102219);
        double r102221 = x;
        double r102222 = r102220 + r102221;
        double r102223 = exp(r102222);
        double r102224 = r102220 - r102221;
        double r102225 = -r102224;
        double r102226 = pow(r102223, r102225);
        return r102226;
}

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-rgt-neg-in0.0

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

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

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

Reproduce

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