[aclug-L] Re: New C question
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 3/17/00 11:40 PM , Larry Bottorff wrote:
> Let's say I need to know what power of 2 a number is. Mathematically,
> that's just log2(number), right? There doesn't seem to be a log2 in C,
> right? How can I fake one?
i belive log2() is part of the math library. try #include <math.h>.
...and don't forget to use '-lm' when linking. :-)
-- This is the discussion@xxxxxxxxx list. To unsubscribe,