title: Random() times 2^32 - 1 always returns even last digit
body: <p>I have encountered this weird behaviour, which is probably best described by a small example:</p>
  
  <pre><code>Random R = new Random();
  
  for (int i = 0; i &lt; 10_000; i++)
  {
      double d = R.NextDouble() * uint.MaxValue;
  }
  </code></pre>
  
  <p>Now, the last digit of <code>d</code> before the decimal mark is always even, i.e. <code>int r = (int) (d % 10)</code> is always 0, 2, 4, 6, or 8. There <strong>are</strong> odd digits on either side, though.</p>
  
  <p>I suspected that multiplying with <code>uint.MaxValue</code> (2^32 - 1) could force some rounding error in the last digits, but since double has more than 50 bits of precision, this should beat uint with about 20 bits to spare after the separator. This behaviour also occurs if I explicitly store <code>uint.MaxValue</code> as a double before the multiplication and use that instead.</p>
  
  <p>Can someone shed any light on this?</p>