in reply to Re: How can I tell if a number is a power of 2?
in thread How can I tell if a number is a power of 2?

Oops! You're testing whether $number is odd or even, not whether it's a power of 2.