Average Error: 32.1 → 32.1
Time: 2.1s
Precision: binary64
\[{\left(x + y\right)}^{2} - {x}^{2}\]
\[{\left(x + y\right)}^{2} - {x}^{2}\]
{\left(x + y\right)}^{2} - {x}^{2}
{\left(x + y\right)}^{2} - {x}^{2}
double code(double x, double y) {
	return ((double) (((double) pow(((double) (x + y)), 2.0)) - ((double) pow(x, 2.0))));
}
double code(double x, double y) {
	return ((double) (((double) pow(((double) (x + y)), 2.0)) - ((double) pow(x, 2.0))));
}

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 32.1

    \[{\left(x + y\right)}^{2} - {x}^{2}\]
  2. Final simplification32.1

    \[\leadsto {\left(x + y\right)}^{2} - {x}^{2}\]

Reproduce

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