I am trying to compute the nearest 2^n to a very large number(<=10^19)
I have tried to use math.log(number,2). But that is giving wrong results for very big numbers. How should I do this without using other libraries?
a = 9843649374639837463 # a is any num between 1 and 10^9
number = int(math.log(a,2))