From d8cb20a6860ffb812bff8b0dcc9bc92763217bc7 Mon Sep 17 00:00:00 2001 From: Youssef Mohammed Date: Tue, 23 Aug 2016 23:38:50 +0200 Subject: [PATCH] i need help about this please answer i'm sorry but i just wanted to ask how does this exactly work you got another nagic number 0x783A9B23 other than the one here https://chessprogramming.wikispaces.com/BitScan#MattTaylorsFoldingtrick so i think you know how this work or some resource for it and thanks --- src/bitboard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitboard.cpp b/src/bitboard.cpp index 65e154d..60027e2 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -333,7 +333,7 @@ static const int BitTable[64] = { Square first_1(Bitboard b) { b ^= (b - 1); uint32_t fold = int(b) ^ int(b >> 32); - return Square(BitTable[(fold * 0x783a9b23) >> 26]); + return Square(BitTable[(fold * 0x783a9b23) >> 26]);// i'm sorry but i just wanted to ask how does this exactly work you got another nagic number 0x783A9B23 other than the one here https://chessprogramming.wikispaces.com/BitScan#MattTaylorsFoldingtrick so i think you know how this work or some resource for it and thanks }