Y
Hacker News
new
|
ask
|
show
|
jobs
by
hairtuq
1862 days ago
Slightly simpler:
c = x ^ y; return popcount(((c >> 1) | 0x8080808080808080) - c) & 0x8080808080808080);