connect four (game)

Ian Kelly ian.g.kelly at gmail.com
Mon Nov 27 09:51:57 EST 2017


On Nov 27, 2017 7:08 AM, "Chris Angelico" <rosuav at 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).



More information about the Python-list mailing list