News for hackers. Stuff that matters.

viablemonopoly

Re:Mod and remainder are not the same on Thursday August 23, 2018 @06:25AM (#17826040)
I don't think there is a formal universal distinction in programming between a "modulo operator" and a "remainder operator" in terms of behaviour. Wikipedia says that the result of a modulo operation varies between languages [0]. Furthermore, by mathematical convention as seen in the Euclidean division theorem, the remainder is always in [0, n).

[0]: https://en.wikipedia.org/wiki/Modulo_operation#Remainder_cal...