Average Error: 0.0 → 0.0
Time: 14.1s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[e^{\frac{\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right) - 1 \cdot \left(1 \cdot 1\right)}{\left(1 \cdot 1 + \left(x \cdot x\right) \cdot 1\right) + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}}\]
e^{-\left(1 - x \cdot x\right)}
e^{\frac{\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right) - 1 \cdot \left(1 \cdot 1\right)}{\left(1 \cdot 1 + \left(x \cdot x\right) \cdot 1\right) + \left(x \cdot x\right) \cdot \left(x \cdot x\right)}}
double f(double x) {
        double r1452322 = 1.0;
        double r1452323 = x;
        double r1452324 = r1452323 * r1452323;
        double r1452325 = r1452322 - r1452324;
        double r1452326 = -r1452325;
        double r1452327 = exp(r1452326);
        return r1452327;
}

double f(double x) {
        double r1452328 = x;
        double r1452329 = r1452328 * r1452328;
        double r1452330 = r1452329 * r1452329;
        double r1452331 = r1452330 * r1452329;
        double r1452332 = 1.0;
        double r1452333 = r1452332 * r1452332;
        double r1452334 = r1452332 * r1452333;
        double r1452335 = r1452331 - r1452334;
        double r1452336 = r1452329 * r1452332;
        double r1452337 = r1452333 + r1452336;
        double r1452338 = r1452337 + r1452330;
        double r1452339 = r1452335 / r1452338;
        double r1452340 = exp(r1452339);
        return r1452340;
}

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. Simplified0.0

    \[\leadsto \color{blue}{e^{x \cdot x - 1}}\]
  3. Using strategy rm
  4. Applied flip3--0.0

    \[\leadsto e^{\color{blue}{\frac{{\left(x \cdot x\right)}^{3} - {1}^{3}}{\left(x \cdot x\right) \cdot \left(x \cdot x\right) + \left(1 \cdot 1 + \left(x \cdot x\right) \cdot 1\right)}}}\]
  5. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019192 
(FPCore (x)
  :name "exp neg sub"
  (exp (- (- 1.0 (* x x)))))