From 7b1d6e8aa31afa37a7a675f1578628b3111b1a1a Mon Sep 17 00:00:00 2001 From: mstembera Date: Sun, 10 Nov 2024 20:14:51 -0800 Subject: [PATCH] Use shift to divide reduction No functional change bench: 1281912 --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 4864057c1b1..2244dae205f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1697,7 +1697,7 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta) Depth Search::Worker::reduction(bool i, Depth d, int mn, int delta) const { int reductionScale = reductions[d] * reductions[mn]; - return (reductionScale + 1239 - delta * 795 / rootDelta) / 1024 + (!i && reductionScale > 1341); + return unsigned(reductionScale + 1239 - delta * 795 / rootDelta) / 1024 + (!i && reductionScale > 1341); } // elapsed() returns the time elapsed since the search started. If the