News for hackers. Stuff that matters.
Re:Why Python's Integer Division Floors (2010) by kazinator on Wednesday February 28, 2024 @05:26PM (#39544277)
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.

There are no comments on this comment yet.