This is really a programming question that I'm unable to solve because of a math question. I'm having a problem understanding the rules of distribution with modular arithmetic.
I have two expressions:
a = q mod c + (n - 1) mod c b = q mod c - (n - 1) mod c
I made the mistake of concluding that the expressions were equivalent to:
a = (q + n - 1) mod c b = (q - n + 1) mod c
What would the equivalent equations be?