Log base 2 of large integers

Mok-Kong Shen mok-kong.shen at t-online.de
Wed Aug 13 09:05:48 EDT 2014


I like to compute log base 2 of a fairly large integer n but
with math.log(n,2) I got:

OverflowError: long int too large to convert to float.

Is there any feasible work-around for that?

Thanks in advance.

M. K. Shen



More information about the Python-list mailing list