1
$\begingroup$

That is, what can we say about chained application of the modulo operation?

E.g., are there any theorems for certain values of a,b, and c s.t. (a % b % c) == (a % bc), or something similar?

The only thing I can think of is, given $0 < a < b < c: a \% b \% c = a$.

$\endgroup$
1
$\begingroup$

The operation is not associative, i.e., $$a \%(b\%c) \neq (a \%b)\%c$$ Hence, you first need to specify which one you are after $a \%(b\%c)$ or $(a \%b)\%c$

$\endgroup$
  • 1
    $\begingroup$ I think it's safe to assume he means $(a \% b) \% c$ $\endgroup$ – MCT Apr 24 '14 at 2:48
  • $\begingroup$ Thanks, yes, I did but this is good info. $\endgroup$ – Dogweather Apr 24 '14 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.