News for hackers. Stuff that matters.
Re:Python, unlike C, has the mod operator always return a po... by tialaramex on Wednesday December 29, 2021 @04:47PM (#29730477)
This is also exactly what the ANSI ("Second edition") K&R book I have in front of me says.

It goes on to say: "x % y produces the remainder when x is divided by y" and that "the sign of the result for % are machine-dependent for negative operands, as is the action taken on overflow or underflow".

There are no comments on this comment yet.