Checking if an Integer is an Exact Binary Power
Vladimir Panteleev via Digitalmars-d
digitalmars-d at puremagic.com
Sat Apr 23 06:06:58 PDT 2016
On Saturday, 23 April 2016 at 13:04:00 UTC, Nordlöw wrote:
> Wanted: CT-trait and run-time predicate for checking whether
> its single integer parameter is an exact power of two.
popcnt(x) <= 1 ?
More information about the Digitalmars-d
mailing list