Average Error: 0.0 → 0.0
Time: 7.8s
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 r20483 = 1.0;
        double r20484 = x;
        double r20485 = r20484 * r20484;
        double r20486 = r20483 - r20485;
        double r20487 = -r20486;
        double r20488 = exp(r20487);
        return r20488;
}

double f(double x) {
        double r20489 = 1.0;
        double r20490 = sqrt(r20489);
        double r20491 = x;
        double r20492 = r20490 + r20491;
        double r20493 = exp(r20492);
        double r20494 = r20490 - r20491;
        double r20495 = -r20494;
        double r20496 = pow(r20493, r20495);
        return r20496;
}

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 2019350 
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))