log2 replaced with Log2 inline function.