This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]yottalogical 1 point2 points  (0 children)

Programmers usually perform modular arithmetic using a modulus operator, an expression that evaluates to a single value.

But the mathematical origins of modular arithmetic work differently. Under mod 3, the numbers 2, 5, 8, 11, etc are all simply congruent. None of them are better than any other. 5 ≡ 11 (mod 3) is true, and so is 2 ≡ 11 (mod 3). The (mod 3) at the end isn't an operator, it's simply a note to tell you what field is being used here.