Average Error: 0.0 → 0.0
Time: 2.1s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[\frac{1}{e^{1 - x \cdot x}}\]
e^{-\left(1 - x \cdot x\right)}
\frac{1}{e^{1 - x \cdot x}}
double code(double x) {
	return exp(-(1.0 - (x * x)));
}
double code(double x) {
	return (1.0 / exp((1.0 - (x * x))));
}

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 exp-neg0.0

    \[\leadsto \color{blue}{\frac{1}{e^{1 - x \cdot x}}}\]
  4. Final simplification0.0

    \[\leadsto \frac{1}{e^{1 - x \cdot x}}\]

Reproduce

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