News for hackers. Stuff that matters.
Re:Why Python's Integer Division Floors (2010) by seanhunter on Wednesday February 28, 2024 @01:50PM (#39542110)
Neither of them is wrong. Languages (like python) which only return a positive number are returning the least positive residue of division under the modulus. That is the most common interpretation of it in number theory at least far as I know.

C generally does return negative numbers when you use the % operator.

There are no comments on this comment yet.