You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that only the six lowest-order bits of the bitCount are used as the shift distance. The shift distance actually used is therefore always in the range 0..63.
Currently the UInt128 implementation will shift with n >= 128 which will always result in a return value of zero. The ULong implementation looks as though it only shifts by n mod ULong.SIZE_BITS
The text was updated successfully, but these errors were encountered:
mattmook
changed the title
UInt128 shift implementation doesn't match Kotlin style implementation
UInt128 shift implementation doesn't match Kotlin implementation
Jun 11, 2024
Documentation for ULong's shl and shr says:
Currently the
UInt128
implementation will shift withn >= 128
which will always result in a return value of zero. TheULong
implementation looks as though it only shifts byn mod ULong.SIZE_BITS
The text was updated successfully, but these errors were encountered: