0 is not a power of 2

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue May 19 13:01:25 PDT 2015


Have you tried things like :

(x >> bsr(x)) == 1 ?

I have no idea if this is faster or not, but worth trying.


More information about the Digitalmars-d mailing list