
8 Jun
2008
8 Jun
'08
6:37 p.m.
Looking at it further, using testBit is actually much uglier. I'd have to do something like
lg x = log x / log 2 testBit mask (lg controlMask) since controlMask isn't defined as "which bit is set", but as an actual bitmask. The attached patch is semantically equivalent to my previous one but would still work properly if controlMask was more than a single bit (which it isn't, of course, but the logic seems cleaner this way)
Justin Bogner