Add another log2 implementation for testing