Re: [PATCH] Remove some divide instructions

From: Thayne Harbaugh
Date: Wed Oct 27 2004 - 17:42:56 EST


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

Attachment: signature.asc
Description: This is a digitally signed message part