directly use integer version for cp calculation.
fixes https://github.com/official-stockfish/Stockfish/issues/3573
closes https://github.com/official-stockfish/Stockfish/pull/3574
No functional change
buffer[0] = (v < 0 ? '-' : v > 0 ? '+' : ' ');
- int cp = (int)(std::abs(100.0 * double(v) / PawnValueEg));
+ int cp = std::abs(100 * v / PawnValueEg);
if (cp >= 10000)
{
static void format_cp_aligned_dot(Value v, char* buffer) {
buffer[0] = (v < 0 ? '-' : v > 0 ? '+' : ' ');
- int cp = (int)(std::abs(100.0 * double(v) / PawnValueEg));
+ int cp = std::abs(100 * v / PawnValueEg);
if (cp >= 10000)
{