]> git.sesse.net Git - stockfish/commitdiff
Reintroduce GCC/ICC rounding hack
authorMarco Costalba <mcostalba@gmail.com>
Sat, 3 Jul 2010 18:04:05 +0000 (19:04 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 3 Jul 2010 18:05:04 +0000 (19:05 +0100)
Unfortunatly the source of this issue is not in the
different handling of log(0) illegal value.

No functional change on MSVC.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 68a578cd741765042682dc86fa9da9abc9961309..4d4653bbc2656201aff6ffca454443538145df71 100644 (file)
@@ -354,7 +354,7 @@ void init_search() {
 
   // Init futility margins array
   for (d = 1; d < 16; d++) for (mc = 0; mc < 64; mc++)
-      FutilityMarginsMatrix[d][mc] = 112 * int(log(double(d * d) / 2) / log(2.0) + 1) - 8 * mc + 45;
+      FutilityMarginsMatrix[d][mc] = 112 * int(log(double(d * d) / 2) / log(2.0) + 1.001) - 8 * mc + 45;
 
   // Init futility move count array
   for (d = 0; d < 32; d++)