>>         LOWESTBYTE = BITAND(ININT, 255)
>>     ....
>>         ININT = INT(ININT/256)

>When trying to implement hash algorithms i noticed values > 32 bits do not
>work properly with some of the basic functions in unidata and i think
>universe.  Definitely MOD() and i think BITAND() had problems.

That is because UV (and I presumed UD) work on two's complement integers, so
the top bit flips you between a positive and a negative integer. This is why
I work the algorithm with 8 bit blocks, so that bit 1 in the 32 bit integer
is never 1 and so BITAND works as expected.

Not that I actually tested the code :)

Craig

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to