Negative Modulo confusion

362 Views Asked by At

$$ x \equiv -74 \ mod \ 31 $$

According to Google & Wolframalpha the answer is 19

Following the method in this answer and using this answer I get 12. Using my calculator with this answer yeilds 12 also.

What answer is right? If the web is correct, how do they come about that answer?

1

There are 1 best solutions below

2
On

$x\equiv -74 \equiv -74+31 \equiv -43\equiv -43+31 \equiv -12 \equiv -12+31 \equiv 19 $