Average Error: 0.0 → 0.0
Time: 2.3s
Precision: binary64
Cost: 13056
\[e^{-\left(1 - x \cdot x\right)}\]
\[\frac{{\left(e^{x}\right)}^{x}}{e}\]
e^{-\left(1 - x \cdot x\right)}
\frac{{\left(e^{x}\right)}^{x}}{e}
(FPCore (x) :precision binary64 (exp (- (- 1.0 (* x x)))))
(FPCore (x) :precision binary64 (/ (pow (exp x) x) E))
double code(double x) {
	return exp(-(1.0 - (x * x)));
}
double code(double x) {
	return pow(exp(x), x) / ((double) M_E);
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error0.0
Cost19712
\[{\left(e^{x}\right)}^{\left(x + -1\right)} \cdot e^{x + -1}\]
Alternative 2
Error0.0
Cost13184
\[{\left(e^{x + 1}\right)}^{\left(x + -1\right)}\]
Alternative 3
Error0.0
Cost6720
\[e^{x \cdot x - 1}\]
Alternative 4
Error1.0
Cost6464
\[e^{-1}\]
Alternative 5
Error0.7
Cost448
\[\frac{x \cdot x + 1}{e}\]
Alternative 6
Error52.6
Cost64
\[1\]
Alternative 7
Error62.0
Cost64
\[0\]
Alternative 8
Error63.0
Cost64
\[-1\]

Error

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 difference-of-sqr-1_binary64_480.0

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

    \[\leadsto \color{blue}{{\left(e^{x + 1}\right)}^{\left(x - 1\right)}}\]
  6. Using strategy rm
  7. Applied exp-sum_binary64_1240.0

    \[\leadsto {\color{blue}{\left(e^{x} \cdot e^{1}\right)}}^{\left(x - 1\right)}\]
  8. Applied unpow-prod-down_binary64_1570.0

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

    \[\leadsto {\left(e^{x}\right)}^{\left(x - 1\right)} \cdot \color{blue}{e^{x - 1}}\]
  10. Using strategy rm
  11. Applied exp-diff_binary64_1260.0

    \[\leadsto {\left(e^{x}\right)}^{\left(x - 1\right)} \cdot \color{blue}{\frac{e^{x}}{e^{1}}}\]
  12. Applied associate-*r/_binary64_200.0

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

    \[\leadsto \frac{\color{blue}{{\left(e^{x}\right)}^{x}}}{e^{1}}\]
  14. Simplified0.0

    \[\leadsto \color{blue}{\frac{{\left(e^{x}\right)}^{x}}{e}}\]
  15. Final simplification0.0

    \[\leadsto \frac{{\left(e^{x}\right)}^{x}}{e}\]

Reproduce

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