Hacker News new | past | comments | ask | show | jobs | submit login

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: