From: Marco Costalba Date: Wed, 1 Jan 2014 12:35:11 +0000 (+0100) Subject: Further simplify move_importance() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=a795187c50cdbe00d5364ce049d8673a04803c21 Further simplify move_importance() Function move_importance() is already always positive, so we don't need to add a constant term to ensure it. Becuase move_importance() is used to calculate ratios of a linear combination (as explained in previous patch), result is not affected. I have also verified it directly. No functional change. --- diff --git a/src/timeman.cpp b/src/timeman.cpp index fc2a327d..013d5f46 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -44,7 +44,7 @@ namespace { double move_importance(int ply) { - return 1 / pow((1 + exp((ply - xshift) / xscale)), skewfactor) + 1e-3; // Ensure non-zero + return 1 / pow((1 + exp((ply - xshift) / xscale)), skewfactor); }