Nick Coghlan <[email protected]> added the comment:
I like Mark's phrasing as well. For precision, I'd still like to give an exact
algorithmic formulation of what "large enough" means in this context, though.
Something like:
Each bitwise operation has the same result as though carried out in two's
complement using a bit-width that's large enough to represent the inputs.
("Large enough" for this purpose is ``1 + max(x.bit_length(), y
.bit_length()``, with the extra bit being needed to handle sign extension
appropriately)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue29710>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com