Average Error: 0.0 → 0.0
Time: 8.2s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[\frac{{\left(e^{x}\right)}^{\left({x}^{1}\right)}}{e^{1}}\]
e^{-\left(1 - x \cdot x\right)}
\frac{{\left(e^{x}\right)}^{\left({x}^{1}\right)}}{e^{1}}
double f(double x) {
        double r18515 = 1.0;
        double r18516 = x;
        double r18517 = r18516 * r18516;
        double r18518 = r18515 - r18517;
        double r18519 = -r18518;
        double r18520 = exp(r18519);
        return r18520;
}

double f(double x) {
        double r18521 = x;
        double r18522 = exp(r18521);
        double r18523 = 1.0;
        double r18524 = pow(r18521, r18523);
        double r18525 = pow(r18522, r18524);
        double r18526 = 1.0;
        double r18527 = exp(r18526);
        double r18528 = r18525 / r18527;
        return r18528;
}

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 sub-neg0.0

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

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

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

    \[\leadsto e^{-1} \cdot \color{blue}{e^{{x}^{2}}}\]
  7. Using strategy rm
  8. Applied sqr-pow0.0

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

    \[\leadsto e^{-1} \cdot \color{blue}{{\left(e^{{x}^{\left(\frac{2}{2}\right)}}\right)}^{\left({x}^{\left(\frac{2}{2}\right)}\right)}}\]
  10. Simplified0.0

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

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

Reproduce

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