News for hackers. Stuff that matters.
Re:Ten Ways to Check if an Integer Is a Power Of Two in C by tedunangst on Tuesday July 26, 2011 @01:09PM (#2808355)
All of the loops could be written recursively, but that'd be rather atypical for solving this problem in C.
Re:Ten Ways to Check if an Integer Is a Power Of Two in C by eru on Tuesday July 26, 2011 @01:59PM (#2808593)
Though with gcc and tail recursion it wouldn't make a difference to the generated code.