On Sunday, 24 April 2016 at 23:00:56 UTC, Temtaime wrote: > Please no cmp. > Just > bool isPowerOf2(uint x) { return x && !(x & (x - 1)); } You do realise that this will (typically) emit a branch? — David