4 ms·
i think you can fix it with: (low >> 1) + (high >> 1) + (low & 1 & high) for unsigned numbers. not sure if it works for signed numbers.
by benmmurphy 4y ago
i think you can fix it with: (low >> 1) + (high >> 1) + (low & 1 & high)
for unsigned numbers. not sure if it works for signed numbers.