But 13 is also equivalent to -2 and 1, mod 3. Why are you doing the modulo operation in the first place?
From a mathematical standpoint, I've never seen a use for returning -2 here. I want something unique for the group, so I can ask e.g. `x mod 3 == y mod 3` and have it work regardless of whether x or/and y are negative.