Average Error: 0.0 → 0
Time: 3.1s
Precision: 64
Internal Precision: 128
\[\left(\left(x + y\right) + z\right) - \left(x + \left(y + z\right)\right)\]
\[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.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 2019016 +o rules:numerics
(FPCore (x y z)
  :name "Commute and associate"
  (- (+ (+ x y) z) (+ x (+ y z))))

Details

Time bar (total: 2.9s)Debug log

sample175.0ms

Algorithm
intervals
Results
256×(pre true 80)
113×(body real 1280)
93×(body real 2560)
41×(body real 640)
(body real 320)
(body real 160)
(body real 80)

simplify181.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
180.0ms
(- (+ (+ x y) z) (+ x (+ y z)))

prune9.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize2.0ms

Local error

Found 0 expressions with local error:

rewrite1.0ms

Algorithm
rewrite-expression-head
Rules
Counts
0 → 0
Calls
0 calls:
Slowest

series0.0ms

Counts
0 → 0
Calls
0 calls:
Slowest

simplify0.0ms

Counts
0 → 0
Calls
0 calls:
Slowest

prune2.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample2.6s

Algorithm
intervals
Results
8000×(pre true 80)
3671×(body real 1280)
2766×(body real 2560)
1207×(body real 640)
287×(body real 320)
64×(body real 160)
(body real 80)