title: When is the difference between quotRem and divMod useful?
body: <p>From the haskell report:</p>
  
  <blockquote>
    <p>The quot, rem, div, and mod class
    methods satisfy these laws if y is
    non-zero:</p>
  
  <pre><code>(x `quot` y)*y + (x `rem` y) == x
  (x `div`  y)*y + (x `mod` y) == x
  </code></pre>
    
    <p><code>quot</code> is integer division truncated
    toward zero, while the result of <code>div</code>
    is truncated toward negative infinity.</p>
  </blockquote>
  
  <p>For example:</p>
  
  <pre><code>Prelude&gt; (-12) `quot` 5
  -2
  Prelude&gt; (-12) `div` 5
  -3
  </code></pre>
  
  <p>What are some examples of where the difference between how the result is truncated matters?</p>