Average Error: 33.5 → 33.5
Time: 1.9s
Precision: binary64
\[2^{x + y} - 2^{x - y}\]
\[2^{x + y} - 2^{x - y}\]
2^{x + y} - 2^{x - y}
2^{x + y} - 2^{x - y}
double code(double x, double y) {
	return ((double) (((double) exp2(((double) (x + y)))) - ((double) exp2(((double) (x - y))))));
}
double code(double x, double y) {
	return ((double) (((double) exp2(((double) (x + y)))) - ((double) exp2(((double) (x - y))))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 33.5

    \[2^{x + y} - 2^{x - y}\]
  2. Final simplification33.5

    \[\leadsto 2^{x + y} - 2^{x - y}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x y)
  :name "(- (exp2 (+ x y)) (exp2 (- x y)))"
  :precision binary64
  (- (exp2 (+ x y)) (exp2 (- x y))))