Hacker News new | comments | show | ask | jobs | submit login

Every positive number is a power of 2. Yes, I know, but there is no mention of "integer". Btw, I would just check if log2(x) is an integer.

positive, real

Right, if you are going to be pedantic, you should go all the way to the end.

Applications are open for YC Summer 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact