Rand behaviour using randc

In reply to Thirumalesh Kumar:

The reason you appear to be getting rand behavior from a randc member is because you are constructing a new object each time. Each time you construct an object, it gets seeded by the next random state value (RNG) from the process constructing the object. That starts a new random cyclic series of numbers which has a 1 in 8 chance of repeating the start of the previous series.

To get the behavior you are looking for without constructing a new object, you would have to manually re-seed the object using obj.srandom() before calling obj.randomize() each time. That would break the random stability of obj, but that is the best answer you are going to get.