mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
bpo-39301: State that floor division is used for right shift operations (GH-20347)
* bpo-39301: State that floor division is used for right shift operations * Remove "without overflow check"
This commit is contained in:
parent
1c5d1d7304
commit
af7553ac95
1 changed files with 2 additions and 4 deletions
|
|
@ -434,12 +434,10 @@ Notes:
|
|||
Negative shift counts are illegal and cause a :exc:`ValueError` to be raised.
|
||||
|
||||
(2)
|
||||
A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``
|
||||
without overflow check.
|
||||
A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``.
|
||||
|
||||
(3)
|
||||
A right shift by *n* bits is equivalent to division by ``pow(2, n)`` without
|
||||
overflow check.
|
||||
A right shift by *n* bits is equivalent to floor division by ``pow(2, n)``.
|
||||
|
||||
(4)
|
||||
Performing these calculations with at least one extra sign extension bit in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue