On Wed, Aug 13, 2014 at 8:05 AM, Mok-Kong Shen <mok-kong.s...@t-online.de> wrote: > 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?
A bit of googling turned up this page: http://gnumbers.blogspot.com/2011/10/logarithm-of-large-number-it-is-not.html Might be worth studying for ideas. Skip -- https://mail.python.org/mailman/listinfo/python-list