Average Error: 0 → 0
Time: 1.6s
Precision: 64
\[\left(\left(x + y\right) + z\right) - \left(x + \left(y + z\right)\right)\]
\[0\]
\left(\left(x + y\right) + z\right) - \left(x + \left(y + z\right)\right)
0
double code(double x, double y, double z) {
	return ((double) (((double) (((double) (x + y)) + z)) - ((double) (x + ((double) (y + z))))));
}
double code(double x, double y, double z) {
	return 0.0;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

    \[\left(\left(x + y\right) + z\right) - \left(x + \left(y + z\right)\right)\]
  2. Simplified0

    \[\leadsto \color{blue}{0}\]
  3. Final simplification0

    \[\leadsto 0\]

Reproduce

herbie shell --seed 2020122 
(FPCore (x y z)
  :name "Commute and associate"
  :precision binary64
  (- (+ (+ x y) z) (+ x (+ y z))))