Average Error: 0.0 → 0.0
Time: 19.8s
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 r2040652 = 1.0;
        double r2040653 = x;
        double r2040654 = r2040653 * r2040653;
        double r2040655 = r2040652 - r2040654;
        double r2040656 = -r2040655;
        double r2040657 = exp(r2040656);
        return r2040657;
}

double f(double x) {
        double r2040658 = x;
        double r2040659 = 1.0;
        double r2040660 = r2040658 + r2040659;
        double r2040661 = exp(r2040660);
        double r2040662 = r2040659 - r2040658;
        double r2040663 = -r2040662;
        double r2040664 = pow(r2040661, r2040663);
        return r2040664;
}

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