title: Can an expression with multiple modulo operators (a % b % c) be reduced to something else?
body: <p>Note: I'm assuming all operators below are left-associative.<br>
  <code>a - b - c</code> is equal to <code>a - (b + c)</code>.<br>
  <code>a / b / c</code> is equal to <code>a / (b * c)</code>.</p>
  
  <p>Are there any similar equivalences for the modulo operator?<br>
  I've figured that <code>a % b % c</code> is equal to <code>a % b</code> if <code>b &lt;= c</code> and <code>a % c</code> if <code>b &gt; c &amp;&amp; b % c == 0</code>. However, I can't figure out what <code>a % b % c</code> equals when <code>b &gt; c &amp;&amp; b % c != 0</code>. Is there a more general or elegant way to think about chained modulo operators? Additionally, can you think of any algorithms or usages of chained modulo operators of the last type?</p>