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

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

    \[\leadsto e^{-\color{blue}{\left(\sqrt{1} + x\right) \cdot \left(\sqrt{1} - x\right)}}\]
  5. Applied distribute-rgt-neg-in0.0

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

    \[\leadsto \color{blue}{{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}}\]
  7. Using strategy rm
  8. Applied add-sqr-sqrt0.0

    \[\leadsto \color{blue}{\sqrt{{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}} \cdot \sqrt{{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}}}\]
  9. Using strategy rm
  10. Applied sqrt-pow10.0

    \[\leadsto \sqrt{{\left(e^{\sqrt{1} + x}\right)}^{\left(-\left(\sqrt{1} - x\right)\right)}} \cdot \color{blue}{{\left(e^{\sqrt{1} + x}\right)}^{\left(\frac{-\left(\sqrt{1} - x\right)}{2}\right)}}\]
  11. Applied sqrt-pow10.0

    \[\leadsto \color{blue}{{\left(e^{\sqrt{1} + x}\right)}^{\left(\frac{-\left(\sqrt{1} - x\right)}{2}\right)}} \cdot {\left(e^{\sqrt{1} + x}\right)}^{\left(\frac{-\left(\sqrt{1} - x\right)}{2}\right)}\]
  12. Applied pow-prod-down0.0

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

    \[\leadsto {\color{blue}{\left({\left(e^{\sqrt{1} + x}\right)}^{2}\right)}}^{\left(\frac{-\left(\sqrt{1} - x\right)}{2}\right)}\]
  14. Using strategy rm
  15. Applied pow-exp0.0

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

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

Reproduce

herbie shell --seed 2020078 +o rules:numerics
(FPCore (x)
  :name "exp neg sub"
  :precision binary64
  (exp (- (- 1 (* x x)))))