Discussions related to Visual Prolog
choibakk
Active Member
Posts: 35
Joined: 5 Sep 2019 19:30

Build 906 - 64 bit operations

Unread post by choibakk »

Hi Thomas,

My chess program (NADYA2.0) now fails its startup diagnostics on build 906. Consider the following code:

Code: Select all

%   this is a 64-bit only project predicates     flip_pos:(unsigned) -> unsigned.   clauses     flip_pos(IndexIn) = IndexOut :-         BB_Index = bit::toBigEndian64(1 << 0+IndexIn),  % Build 904 - 1 << 32 works, Build 906 1 << 32 = 0         %BB_Index = bit::toBigEndian64(hasDomain(unsigned64,1) << 0+IndexIn),  % Build 906 - 1 << 32 works         IndexOut = bit_board::ls1b(BB_Index).  %  Diagnostics fail here, can't call ls1b with a value of zero.
This works fine in build 904, but returns zero 0 on build 906. Now I have to explicitly set the domain to a 64 bit opperation, because this code works until a bitshift 1 << 32 is encountered. It is like the default domain in a 64-bit app, is now 32 bit? If I uncomment the line that is commented, this particular predicate will work, but I have this kind of bitwise code all over the place, and I gave up trying to all the affected locations, so I rolled back to 904 for now.

Am I doing something wrong?
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: Build 906 - 64 bit operations

Unread post by Thomas Linder Puls »

Yes, there is a problem. We will look at it. For now you can write:

Code: Select all

        BB_Index = bit::toBigEndian64(hasDomain(unsigned64, 1) << 0 + IndexIn),
Using hasDomain like that ensures that the operation is performed as a unsigned64 bit operation.
Regards Thomas Linder Puls
PDC
choibakk
Active Member
Posts: 35
Joined: 5 Sep 2019 19:30

Re: Build 906 - 64 bit operations

Unread post by choibakk »

Thomas,

If you need a Beta tester for the next release to test 64-bit operations, the move generator in my chess program NADYA2.0, accurately calculates moves on a start chess board to depth 7. About 3.2B nodes. The calculations are all made using 64-bit (bit-wise) math operations.

https://www.chessprogramming.org/Perft_ ... l_Position

Thanks,
choibakk
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: Build 906 - 64 bit operations

Unread post by Thomas Linder Puls »

Thank you for your offer, but we don't use external beta testers.

We have a large teste suite for the compiler, pfc, etc. And on top of that we have a number of large/huge professional programs, with test suites, testers, customers, etc. And they are all "beta" tests/testers for our system.
Regards Thomas Linder Puls
PDC
Post Reply