Average Error: 0.0 → 0.0
Time: 3.1s
Precision: 64
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{\left(\sqrt{1} + x\right) \cdot 2}\right)}^{\left(\frac{x - \sqrt{1}}{2}\right)}\]
e^{-\left(1 - x \cdot x\right)}
{\left(e^{\left(\sqrt{1} + x\right) \cdot 2}\right)}^{\left(\frac{x - \sqrt{1}}{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)), ((x - sqrt(1.0)) / 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 sqr-pow0.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)}}\]
  9. Simplified0.0

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

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

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

    \[\leadsto {\color{blue}{\left({\left(e^{\sqrt{1} + x}\right)}^{2}\right)}}^{\left(\frac{x - \sqrt{1}}{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{x - \sqrt{1}}{2}\right)}\]
  16. Final simplification0.0

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

Reproduce

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