Uno right shift fails in some scenarios

I have been tracking down why my port of Sha512 doesn’t match the C# version of the same code. I’ve tracked it down (at least part of the reason) to the right shift operator (>>) not returning the same value for ulongs in some situations.

debug_log(""+n +"====>" + (n >> 6));

Sample ulong values (w/ the last one being incorrect):

n====>result
0====>0
120====>1
3391362420264868341====>52990037816638567
8247344706571482433====>128864761040179413
11170817084526286401====> 18333057714503563097

Hey sean,

thanks for testing! I’ve filed an issue.