Average Error: 0.0 → 0.0
Time: 3.1s
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 r29114 = 1.0;
        double r29115 = x;
        double r29116 = r29115 * r29115;
        double r29117 = r29114 - r29116;
        double r29118 = -r29117;
        double r29119 = exp(r29118);
        return r29119;
}

double f(double x) {
        double r29120 = 1.0;
        double r29121 = x;
        double r29122 = r29121 * r29121;
        double r29123 = r29120 - r29122;
        double r29124 = -r29123;
        double r29125 = exp(r29124);
        double r29126 = sqrt(r29125);
        double r29127 = r29126 * r29126;
        return r29127;
}

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