Average Error: 0.0 → 0.0
Time: 27.4s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{x + 1}\right)}^{\left(-\left(1 - x\right)\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{x + 1}\right)}^{\left(-\left(1 - x\right)\right)}
double f(double x) {
        double r2791338 = 1.0;
        double r2791339 = x;
        double r2791340 = r2791339 * r2791339;
        double r2791341 = r2791338 - r2791340;
        double r2791342 = -r2791341;
        double r2791343 = exp(r2791342);
        return r2791343;
}

double f(double x) {
        double r2791344 = x;
        double r2791345 = 1.0;
        double r2791346 = r2791344 + r2791345;
        double r2791347 = exp(r2791346);
        double r2791348 = r2791345 - r2791344;
        double r2791349 = -r2791348;
        double r2791350 = pow(r2791347, r2791349);
        return r2791350;
}

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 *-un-lft-identity0.0

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

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

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

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

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

Reproduce

herbie shell --seed 2019128 +o rules:numerics
(FPCore (x)
  :name "exp neg sub"
  (exp (- (- 1 (* x x)))))