Average Error: 38.8 → 0.0
Time: 2.0s
Precision: binary64
\[\]
\[\]
double code(double x) {
	return ((double) (((double) (((double) (x + 1.0)) * ((double) (x + 1.0)))) - 1.0));
}
double code(double x) {
	return ((double) (((double) (x * x)) + ((double) (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 38.8

    \[\]
  2. Taylor expanded around 0 0.0

    \[\leadsto \]
  3. Simplified0.0

    \[\leadsto \]
  4. Using strategy rm
  5. Applied distribute-lft-in0.0

    \[\leadsto \]
  6. Final simplification0.0

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (x)
  :name "Expanding a square"
  :precision binary64
  (- (* (+ x 1.0) (+ x 1.0)) 1.0))