Following the formula found here (r = a - (a/b)b) I have been successfully finding the remainder for several problems, but when I try to solve -101 mod 13, I get the answer 10 even though it should apparently be 3.
101/13 = 7.769, ignore everything after the .
13 * 7 = 91
101 - 91 = 10
Am I missing something obvious here?