From a795187c50cdbe00d5364ce049d8673a04803c21 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 1 Jan 2014 13:35:11 +0100 Subject: [PATCH] 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. --- src/timeman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.39.2