Average Error: 0.0 → 0.0
Time: 3.8s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[\sqrt{e^{-\left(1 - x \cdot x\right)}} \cdot \sqrt{e^{-\left(1 - x \cdot x\right)}}\]
e^{-\left(1 - x \cdot x\right)}
\sqrt{e^{-\left(1 - x \cdot x\right)}} \cdot \sqrt{e^{-\left(1 - x \cdot x\right)}}
double f(double x) {
        double r40072 = 1.0;
        double r40073 = x;
        double r40074 = r40073 * r40073;
        double r40075 = r40072 - r40074;
        double r40076 = -r40075;
        double r40077 = exp(r40076);
        return r40077;
}

double f(double x) {
        double r40078 = 1.0;
        double r40079 = x;
        double r40080 = r40079 * r40079;
        double r40081 = r40078 - r40080;
        double r40082 = -r40081;
        double r40083 = exp(r40082);
        double r40084 = sqrt(r40083);
        double r40085 = r40084 * r40084;
        return r40085;
}

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 \color{blue}{\sqrt{e^{-\left(1 - x \cdot x\right)}} \cdot \sqrt{e^{-\left(1 - x \cdot x\right)}}}\]
  4. Final simplification0.0

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

Reproduce

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