i am unable to find the O(1) way to find log of n with any base
even if you can determine O(1) time way to calculate log of n with base 2 ,it would be thank full. the link which i encountered is this http://geeksforgeeks.org/?p=10879 (please read the comments on that). they are saying to calculate the number of zero's in front of a number but how that can be done in O(1) time... again i took help of this site whose link is How To Find The Leading Number Of Zero's In a Number using C but O(1) is big issue for me. any help would be highly appreciated.