Hi,

At Sun, 11 Apr 2010 15:34:07 +0900,
Marc-Andre Lafortune wrote in [ruby-core:29447]:
> Say r = Random.new(42) and N is an Integer
> 
> 0) r.rand(N) is included in 0...N
> 1) r.rand(N) will eventually return all values in 0...N
> 2) r.rand(N) will return any particular value in 0...N with a probability of around 1/N
> <insert any any of the known random tests and/or a minimal period>
> 3) r is a Mersenne Twister 
> 4) r is MT19937
> 5) r.rand(N) generates the same particular string on all platforms

I think the specs are only 0 and 5, and I'd categorize them as:

A) specs/restrictions:
  1) r.rand(N) SHOULD NOT return a value which is NOT included
     in 0...N
  2) Random class instances which are created with same initial
     seed values SHOULD generate same values in each calls, on
     all platforms

B) degrees of randomness:
  1) r.rand(N) will eventually return all values in 0...N
  2) r.rand(N) will return any particular value in 0...N with a
     probability of around 1/N
  3) other random tests

C) implementation details:
  1) r is a modified MT19937 (in the current MRI)
  2) implementers are ultimately free to choose whichever
     implementation they prefer

-- 
Nobu Nakada