Wednesday, February 16, 2011

mean for unsigned integers

from http://spamsink.livejournal.com/360680.html:

 floor((a+b)/2) = (a^b)/2 + a&b

No comments:

Post a Comment