I have a trivial question. When we divide say 5 by 2, quotient is 2 and remainder is 1. However say we divide -5 by 2, then should we have a quotient -2 and remainder -1 or quotient -3 and remainder 1?
Some people claim that remainder should always be a positive integer smaller than the absolute value of the divisor. But what is the actual formal definition and according to which type of formal arithmetic?
Thanks
There is no completely formal definition, but the Euclidean algorithm for, say, the rational numbers, suggests that after choosing a quotient $p/q$ to compute, the remainder should lie between 0 and $q-1$.