Better HN
topnewbestaskshowjobs
Log inSign up

viablemonopoly

1 karma · joined Aug 23, 2018 (8y ago) · 1 submissions

Submissions

comment 8y ago · link · parent

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...