Ugly Bit-Wise Arithmetic

Error message

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.

I just had a WTF moment today. If I ever see code like this again I swear I will go postal:

answer = new long[(size + 0x3F) >>> 6];

one simpler ways to write this would be:

answer = new long[size/64 + 1];

This is java by the way, not C.

Tags: 

Add new comment