From a730b4d08b6429b5ec345f7bc607ec9df0988b71 Mon Sep 17 00:00:00 2001 From: FauziAkram Date: Wed, 26 Feb 2025 03:06:47 +0300 Subject: [PATCH] Remove two unnecessary divisions Passed STC: LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 280768 W: 72187 L: 72236 D: 136345 Ptnml(0-2): 815, 33131, 72550, 33064, 824 https://tests.stockfishchess.org/tests/view/67bcf7afe670525923b8a101 Passed LTC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 108684 W: 27666 L: 27536 D: 53482 Ptnml(0-2): 40, 11768, 30606, 11878, 50 https://tests.stockfishchess.org/tests/view/67be472ed8d5c2c657c52cb8 closes https://github.com/official-stockfish/Stockfish/pull/5908 Bench: 2400689 --- src/search.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 89a44b930..7e5cf5f92 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -699,13 +699,12 @@ Value Search::Worker::search( // Bonus for a quiet ttMove that fails high if (!ttCapture) update_quiet_histories(pos, ss, *this, ttData.move, - std::min(117600 * depth - 71344, 1244992) / 1024); + std::min(115 * depth - 70, 1216)); // Extra penalty for early quiet moves of the previous ply if (prevSq != SQ_NONE && (ss - 1)->moveCount <= 3 && !priorCapture) update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, - -std::min(779788 * (depth + 1) - 271806, 2958308) - / 1024); + -std::min(762 * (depth + 1) - 266, 2889)); } // Partial workaround for the graph history interaction problem