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
{{ message }}
Repository navigation
multiplyUnsigned hangs for multiplier >= 2^31 (>>= sign-extends) #2232
multiplyUnsigned(1,0xFFFFFFFF);// never returnsmultiplyUnsigned(0,2**31);// never returns
src/algorithms/math/bits/multiplyUnsigned.js:39 uses multiplier >>= 1. Bitwise ops treat the value as signed 32-bit, so once the top bit is set the arithmetic shift keeps it, and multiplier gets stuck at -1. The function is documented as unsigned multiplication. Fix: multiplier >>>= 1.
Activity