Fix GrainSize rounding error
authorMarco Costalba <mcostalba@gmail.com>
Sat, 10 Aug 2013 15:11:13 +0000 (17:11 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 10 Aug 2013 15:11:13 +0000 (17:11 +0200)
commit94a3608ab9f2334784ac3b111dc79c9eb5e33ba3
treec78f7777d87302c349a9b13aa06414c3a3d7065b
parent5769509d72ab59d1a1856d035c38d84ecdc6f687
Fix GrainSize rounding error

The rounding formula is different between
positive and negative scores due to the
GrainSize/2 term that is asymmetric.

So use truncation instead of rounding. This
guarantees that evaluation is rounded to zero
in the same way for both positive and negative
scores.

Found with position's flip

bench: 4634244
src/evaluate.cpp