Author vinsci
Recipients vinsci
Date 2017-07-30.16:27:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501432038.15.0.969151408213.issue31079@psf.upfronthosting.co.za>
In-reply-to
Content
It takes as many bits to store the number 0 as the number 1, but the implementation claims it takes no bits at all to store a 0.

>>> (1).bit_length() == (0).bit_length() and True or False
False

It takes one extra bit to store the sign for negative numbers, but this isn't reflected in the implementations.

>>> (-1).bit_length() == 1 + (1).bit_length() and True or False
False
History
Date User Action Args
2017-07-30 16:27:18vinscisetrecipients: + vinsci
2017-07-30 16:27:18vinscisetmessageid: <1501432038.15.0.969151408213.issue31079@psf.upfronthosting.co.za>
2017-07-30 16:27:18vinscilinkissue31079 messages
2017-07-30 16:27:17vinscicreate