lua-users home
lua-l archive

Re: luajit bitops without normalizing

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> If there are better solutions, I'd be glad to hear them.

function rawBitScanR(num) -- num can be negative
return math.floor(math.log(num % 2^32) / math.log(2)) + 1
end


AltStyle によって変換されたページ (->オリジナル) /