]> git.sesse.net Git - stockfish/commit
Simplify move_importance()
authorH. Felix Wittmann <hfwittmann@gmail.com>
Tue, 31 Dec 2013 11:24:57 +0000 (12:24 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 1 Jan 2014 11:58:10 +0000 (12:58 +0100)
commit92faa74dfa862fbdef409017a4ccd993c549f723
tree51d4e01b15d4af1c6c4194f01c074bc81cb293bd
parentc5d478b92303314da0ea072640ee0214ca160199
Simplify move_importance()

Drop a useless parameter. This works because ratio1 and ratio2
are ratios of linear combinations of thisMoveImportance and
otherMovesImportance and so the yscale cancels out.

Therefore the values of ratio1 and ratio2 are independent
of yscale and yscale can be retired.

The same applies to yshift, but here we want to ensure
move_importance() > 0, so directly hard-code this safety
guard in function definition.

Actually there are some small differences due to rounding errors
and usually are at most few millisecond, that's means below 1% of
returned time, apart from very short intervals in which a difference
of just 1 msec can raise to 2-3% of total available time.

No functional change.
src/timeman.cpp