David Grant
You are hereBlogs / David Grant's blog / Ugly Bit-Wise Arithmetic
By David Grant - Posted on 02 March 2007
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.
<code>
<blockcode>
<foo>
[foo]
More information about formatting options
_____ _____ _ _____ _ _____ |_ _| |_ _| | | / ____| | | |_ _| | | | | | | | | | | | | | | | | _ | | | | _ | | | | _| |_ _| |_ | |__| | | |____ | |__| | _| |_ |_____| |_____| \____/ \_____| \____/ |_____|
Post new comment