News for hackers. Stuff that matters.
Re:Ten Ways to Check if an Integer Is a Power Of Two in C by cube13 on Tuesday July 26, 2011 @10:54AM (#2807604)
This works for negative values of x, though.

It should be: ((x>0) && ((x & -x) == x))

There are no comments on this comment yet.