Messages in this thread | | | Subject | Re: [PATCH] Remove some divide instructions | From | Thayne Harbaugh <> | Date | Wed, 27 Oct 2004 16:08:49 -0600 |
| |
On Wed, 2004-10-27 at 09:28 -0700, Linus Torvalds wrote:
> It's very easy to test for powers of two: !((x) & ((x)-1)) does it for > everything but zero, and zero in this case is an error anyway.
Of course 0 is not a power of two - nor a power of any other number (although n**(-oo) where |n|>1 and n**(oo) where |n|<1 are close).
8)
-- Thayne Harbaugh Linux Networx [unhandled content-type:application/pgp-signature] | |