try to find the MSB position of the binary form of number. Then position+1
should be the answer

On Sun, Mar 20, 2011 at 2:27 PM, kumar anurag <[email protected]>wrote:

> in gcc it is found in math.h
>
>
> On Sun, Mar 20, 2011 at 2:16 PM, cegprakash <[email protected]> wrote:
>
>> how to find log2(a)  in c++?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>
>
> --
> Kumar Anurag
>



-- 
Kumar Anurag

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to