Re:Why Python's Integer Division Floors (2010)
by Findecanor on Thursday February 29, 2024 @08:14AM
(#39548854)
On some CPUs architectures, the operand size for some instructions could be larger than an `int`, in which case the upper part of a CPU register would become invalid on overflow instead of containing an extension of the sign bit.
There are also CPUs that do "saturating arithmetic" where overflow results in INT_MAX instead of wrapping.
There are also CPUs that do "saturating arithmetic" where overflow results in INT_MAX instead of wrapping.