You are viewing a single comment's thread. Return to all comments →
long sumXor(long n) { int c = 0; c = popcount((~n)&large(n)); return (1ULL<<c); }
also wrote the popcount function for 128 bit using parallel bit shifting and counting (spam checker isnt allowing long code pasting)
Seems like cookies are disabled on this browser, please enable them to open this website
Sum vs XOR
You are viewing a single comment's thread. Return to all comments →
long sumXor(long n) { int c = 0; c = popcount((~n)&large(n)); return (1ULL<<c); }also wrote the popcount function for 128 bit using parallel bit shifting and counting (spam checker isnt allowing long code pasting)