speeding up isSquare (Re: Bit shifting limitations)