This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients fredrikj, loewis, mark.dickinson, pitrou, rhettinger, terry.reedy, vstinner
Date 2008-12-16.13:56:08
SpamBayes Score 0.019854585
Marked as misclassified No
Message-id <1229435768.95.0.333435931775.issue3439@psf.upfronthosting.co.za>
In-reply-to
Content
x.numbits() is:
  math.ceil(math.log(abs(x)) / math.log(2)) if x != 0
  0 otherwise

and not 1 + math.floor(math.log(x) / math.log(2))

(16).numbits() is 4, not 5.
History
Date User Action Args
2008-12-16 13:56:09vstinnersetrecipients: + vstinner, loewis, rhettinger, terry.reedy, mark.dickinson, pitrou, fredrikj
2008-12-16 13:56:08vstinnersetmessageid: <1229435768.95.0.333435931775.issue3439@psf.upfronthosting.co.za>
2008-12-16 13:56:08vstinnerlinkissue3439 messages
2008-12-16 13:56:08vstinnercreate