chickadee » math » power-of-two?

power-of-two? xprocedure
x
number

Returns #t when x is an integer power of 2.

Examples:

> (power-of-two? 1.0)
#t
> (power-of-two? 1/2)
#t
> (power-of-two? (fpnext 2.0))
#f