Average Error: 0.0 → 0.0
Time: 2.1s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{-\sqrt{1}} \cdot e^{-x}\right)}^{\left(\sqrt{1} - x\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{-\sqrt{1}} \cdot e^{-x}\right)}^{\left(\sqrt{1} - x\right)}
double f(double x) {
        double r26344 = 1.0;
        double r26345 = x;
        double r26346 = r26345 * r26345;
        double r26347 = r26344 - r26346;
        double r26348 = -r26347;
        double r26349 = exp(r26348);
        return r26349;
}

double f(double x) {
        double r26350 = 1.0;
        double r26351 = sqrt(r26350);
        double r26352 = -r26351;
        double r26353 = exp(r26352);
        double r26354 = x;
        double r26355 = -r26354;
        double r26356 = exp(r26355);
        double r26357 = r26353 * r26356;
        double r26358 = r26351 - r26354;
        double r26359 = pow(r26357, r26358);
        return r26359;
}

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

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

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

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

Reproduce

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