title: Integer division rounding with negatives in C++
body: <p>Suppose <code>a</code> and <code>b</code> are both of type <code>int</code>, and <code>b</code> is nonzero.  Consider the result of performing <code>a/b</code> in the following cases:</p>
  
  <ol>
  <li><code>a</code> and <code>b</code> are both nonnegative.</li>
  <li><code>a</code> and <code>b</code> are both negative.</li>
  <li>Exactly one of them is negative.</li>
  </ol>
  
  <p>In Case 1 the result is rounded down to the nearest integer.  But what does the standard say about Cases 2 and 3?  An old draft I found floating on the Internet indicates that it is implementation dependent (yes, even case 2) but the committee is leaning toward making it always 'round toward zero.'  Does anyone know what the (latest) standard says?  Please answer only based on the standard, not what makes sense, or what particular compilers do.</p>