Arithmetic Problem: Remainder of $\frac{-11}{-5}$
Approach1 : $\frac{-11}{-5}=\frac{11}{5}$ ; Now, $11=5\times2+1$ Gives remainder +1.
Approach2 : $\frac{-11}{-5}$; Now, $-11=-5\times2-1$ Gives remainder -1.
According to https://en.wikipedia.org/wiki/Euclidean_division , remainder can't be negative. So, Approach 2 is wrong. Is this conclusion correct?
WolframAlpha gives $-1$. I guess that it does the modulo division via Programming. So, does $-11/-5$ give remainder $1$ in Maths and $-1$ in Programming languages ?
A simple comparison of remainder in Maths and Programming is presented below.
Maths
$11/5 : 11=5\times2+1$; Rem=1
$-11/5 : -11=5\times-3+4$; Rem=4
$11/-5 : 11=-5\times-2+1$; Rem=1
$-11/-5 : -11=-5\times3+4$; Rem=4
Programming(C)
sign of remainder = sign of numerator
$11 \% 5=1$
$-11 \%5 =-1$
$11\%-5=1$
$-11\%-5=-1$