Oops! You're testing whether $number is odd or even, not whether it's a power of 2.
In reply to Re: Re: How can I tell if a number is a power of 2?
by VSarkiss
in thread How can I tell if a number is a power of 2?
by larryk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |