Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
kazinator
10 months ago
|
parent
|
context
|
favorite
| on:
Why Python's integer division floors (2010)
Because the shift operations are arithmetically defined, and the situations that are undefined correspond to overflow. v << 1 means the same thing as v * 2 and is undefined if v * 2 is undefined.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: