Average Error: 0.0 → 0.0
Time: 9.1s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}
double f(double x) {
        double r20892 = 1.0;
        double r20893 = x;
        double r20894 = r20893 * r20893;
        double r20895 = r20892 - r20894;
        double r20896 = -r20895;
        double r20897 = exp(r20896);
        return r20897;
}

double f(double x) {
        double r20898 = 1.0;
        double r20899 = sqrt(r20898);
        double r20900 = x;
        double r20901 = r20899 + r20900;
        double r20902 = exp(r20901);
        double r20903 = r20899 - r20900;
        double r20904 = -r20903;
        double r20905 = pow(r20902, r20904);
        return r20905;
}

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

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

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

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

Reproduce

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