On Nov 27, 2017 7:08 AM, "Chris Angelico" <ros...@gmail.com> wrote:
In every compiler, interpreter, and CPU that I've ever used, the remainder has been well-defined. In what situation was it ill-defined, such that different compilers could do different things? In C89 the result of integer division and modulo with negative operands were implementation-defined -- the result of division could be either floored or truncated, and the modulo result also varied to match. This was fixed in C99, with division results always being truncated (whereas Python uses the floor). -- https://mail.python.org/mailman/listinfo/python-list