07-02-2003, 03:15 AM
This way works with 128:
So i imagine it's a QB bug...
A floor function rounds towars the smaller integer.
Code:
DEFLNG A-Z
a! = LOG(n) / LOG(2)
IF 2 ^ a! = n THEN PRINT n; " is a power of 2"
So i imagine it's a QB bug...
A floor function rounds towars the smaller integer.
Antoni