0 is not a power of 2

w0rp via Digitalmars-d digitalmars-d at puremagic.com
Tue May 19 05:19:36 PDT 2015


On Tuesday, 19 May 2015 at 12:00:30 UTC, Almighty Bob wrote:
> On Tuesday, 19 May 2015 at 10:59:53 UTC, w0rp wrote:
>> I believe you can also do x & -x == x.
>
> I think that still returns true for x = 0.

You are right. Disregard that.


More information about the Digitalmars-d mailing list