Checking if an Integer is an Exact Binary Power

Nordlöw via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 23 13:34:52 PDT 2016


On Saturday, 23 April 2016 at 17:28:21 UTC, Andrei Alexandrescu 
wrote:
>> Yah, that's the canonical. I forgot why I chose (x & -x) > (x 
>> - 1) over
>> it. -- Andrei

So is there a way to check if popcnt builtin is available on 
current platform?


More information about the Digitalmars-d mailing list