Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
by dataflow on Sunday November 06, 2022 @10:06AM
(#33493359)
The ">>>" operator works, the ">>" operator doesn't. The reason the former works is that it basically performs unsigned division by a power of 2; the latter does it signed. There's no floating-point.
[ Parent
| on HN ]
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
by erikpukinskis on Sunday November 06, 2022 @10:18AM
(#33493503)
What do the five >s and the , mean in this comment?
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
by dataflow on Sunday November 06, 2022 @10:28AM
(#33493615)
>>> is bitwise right shift (fills in with zeros), >> is arithmetic right shift (fills in with the sign bit).
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006)
by a1369209993 on Sunday November 06, 2022 @04:23PM
(#33497352)
> >>> is bitwise right shift
Well, they're both bitwise right shifts, the ">>>" is specifically a logical or unsigned right shift.