Average Error: 0.0 → 0.0
Time: 3.6s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{-\left(x + 1\right)}\right)}^{\left(1 - x\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{-\left(x + 1\right)}\right)}^{\left(1 - x\right)}
double f(double x) {
        double r1126866 = 1.0;
        double r1126867 = x;
        double r1126868 = r1126867 * r1126867;
        double r1126869 = r1126866 - r1126868;
        double r1126870 = -r1126869;
        double r1126871 = exp(r1126870);
        return r1126871;
}

double f(double x) {
        double r1126872 = x;
        double r1126873 = 1.0;
        double r1126874 = r1126872 + r1126873;
        double r1126875 = -r1126874;
        double r1126876 = exp(r1126875);
        double r1126877 = r1126873 - r1126872;
        double r1126878 = pow(r1126876, r1126877);
        return r1126878;
}

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

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

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

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

Reproduce

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