Average Error: 0.0 → 0.3
Time: 3.2s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{\sqrt{1 - x \cdot x}}\right)}^{\left(-\sqrt{1 - x \cdot x}\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{\sqrt{1 - x \cdot x}}\right)}^{\left(-\sqrt{1 - x \cdot x}\right)}
double f(double x) {
        double r40513 = 1.0;
        double r40514 = x;
        double r40515 = r40514 * r40514;
        double r40516 = r40513 - r40515;
        double r40517 = -r40516;
        double r40518 = exp(r40517);
        return r40518;
}

double f(double x) {
        double r40519 = 1.0;
        double r40520 = x;
        double r40521 = r40520 * r40520;
        double r40522 = r40519 - r40521;
        double r40523 = sqrt(r40522);
        double r40524 = exp(r40523);
        double r40525 = -r40523;
        double r40526 = pow(r40524, r40525);
        return r40526;
}

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.3

    \[\leadsto e^{-\color{blue}{\sqrt{1 - x \cdot x} \cdot \sqrt{1 - x \cdot x}}}\]
  4. Applied distribute-rgt-neg-in0.3

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

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

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

Reproduce

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