STINNER Victor <victor.stin...@haypocalc.com> added the comment: 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. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3439> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com