Average Error: 0.0 → 0.0
Time: 2.0s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{1}\right)}^{\left(\left(-\left(\sqrt{1} + x\right)\right) \cdot \left(\sqrt{1} - x\right)\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{1}\right)}^{\left(\left(-\left(\sqrt{1} + x\right)\right) \cdot \left(\sqrt{1} - x\right)\right)}
double f(double x) {
        double r26042 = 1.0;
        double r26043 = x;
        double r26044 = r26043 * r26043;
        double r26045 = r26042 - r26044;
        double r26046 = -r26045;
        double r26047 = exp(r26046);
        return r26047;
}

double f(double x) {
        double r26048 = 1.0;
        double r26049 = exp(r26048);
        double r26050 = 1.0;
        double r26051 = sqrt(r26050);
        double r26052 = x;
        double r26053 = r26051 + r26052;
        double r26054 = -r26053;
        double r26055 = r26051 - r26052;
        double r26056 = r26054 * r26055;
        double r26057 = pow(r26049, r26056);
        return r26057;
}

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

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

    \[\leadsto \color{blue}{{\left(e^{-\left(\sqrt{1} + x\right)}\right)}^{\left(\sqrt{1} - x\right)}}\]
  7. Using strategy rm
  8. Applied *-un-lft-identity0.0

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

    \[\leadsto {\color{blue}{\left({\left(e^{1}\right)}^{\left(-\left(\sqrt{1} + x\right)\right)}\right)}}^{\left(\sqrt{1} - x\right)}\]
  10. Applied pow-pow0.0

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

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

Reproduce

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