Author: Severi Salminen
Date: 12:07:12 11/04/02
Go up one level in this thread
>>>__int64 rand64()
>>>{
>>> int a,b,c,d,e;
>>> a=rand();
>>> b=rand()<<15;
>>> c=rand()<<30;
>>> d=rand()<<45;
>>> e=rand()<<60;
>>>
>>> return a^((__int64)b)^((__int64)c)^
>>> ((__int64)d)^((__int64)e);
>>>}
>>
>>Under most systems, d and e will be zero.
A few points. As Dieter said, the above is wrong, because of too late type
casts. Secondly why do you use xor? Why not or? Or has a definite sequence
points and can be used like in your original rand64():
unsigned __int64 rand64()
{
>It still does not explain the crush that I have.
>Movei does not use hash tables to prune the tree and it is not supposed to crush
>when it get bad numbers in the hash.
>
>It should only be slower because of bad order of moves but the new numbers that
>I get with your function when I only change signed to unsidned are almost the
>same as the old number so I do not believe that the numbers were
>0's.
>
>I now compare the number in debug and release with your program(I only deleted
>unsigned because I used numbers that are not unsigned and I do not want to get
>new problems of translating unsigned to signed.
>
>It seems to be the same.
>
>In the debug mode I got now 4222981 and 9929068 that are the same as the release
>mode and I wait for 11697241 and 31903997.
>
>Uri
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.