In message <[EMAIL PROTECTED]> Nick Hibma writes:
: Does anyone know an inexpensive algorithm (O(1)) to go from an number to
: the next (lower or higher) power of two.

1 << ffs(x)

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to