hi
in http://www.cplusplus.com/reference/clibrary/cstdlib/rand/ and in some thread of this forum there is are examplea for using the function rand in a way that should definitely be avoided.
generating uniform distributed random numbers fromthe set {0,1,2,...,m-1} should not be done with the expression "rand()%m" but with something like
"(int)(m*rand()/(MAX_RAND+1.0))"
(this is true for most other random generators)
the reason is that random generators are constraucted (and testet) that the most significant bits are random and not the least significant bits. it would be nice if you would correct this in your documentation.