title: What Is The Purpose of Negative Modulus Operator Results?
body: <p>I was previously under the (naive) assumption that the modulus operator returned the remainder of division.  I was apparently wrong, as -2 % 5 returns 3.  I would have thought that 5 divides -2 zero times with -2 as the remainder.</p>
  
  <p>Now I understand the mechanics of how this operation is performed, but my question is why?  Could someone give me a link to something that explains why modulus and remainder are not synonymous, or an example of a situation where it would be useful?</p>