Issue with C# Net 7.0 WPF 64-bit operations

Discussion of chess software programming and technical issues.

Moderator: Ras

Chessnut1071
Posts: 313
Joined: Tue Aug 03, 2021 2:41 pm
Full name: Bill Beame

Issue with C# Net 7.0 WPF 64-bit operations

Post by Chessnut1071 »

I'm using Net 7.0, wpf. I converted to magic bitboards and started experiencing issues with bishop diagonals 63 - 0 and 56 - 7, the large black and white diagonals. It appears that when the bishop is located on squares 63 or 56, the array drops the last bit- bit 7 or bit 0- and consequently never sees the 7 or 0 square. If the bishop is located on square 7 or square 0, there is no issue. I suspect it may be due to the number of digits for numbers higher than 2^56, or 18 digits of precision. The simple fix is to test for bishop on 63 or 56 and ++the ray variable. I have not experienced the issue with earlier versions of Net. Has anyone else using Net 7.0 had the same issue. The bit seems to be dropped when the variable leaves the called method. I don't want to bug Microsoft until I'm sure I'm not the only one with this issue.