Adem24 wrote:

> I need a good and fast random number generator (RNG),

> and a linear congruential generator (LCG),

> both with a max period >= 31 bits; the bigger the better.
The ISAAC random number generator has an enormous period,

it's cryptographically and statistically very strong, and

according to my experiments it's even faster than the Mersenne

Twister (only a highly optimized verion of MT which uses SSE

compares in speed). It uses unsigned integers.

I have made a C++ version of the ISAAC RNG which is very

simple to use:

http://warp.povusers.org/IsaacRand.zip
As for a linear congruential generator, here are two which

have a period of 2^32:

inline unsigned nextRandValue(unsigned currentValue)

{

return currentValue * 1812433253U + 12345U;

// Another one:

//return currentValue * 0x8088405 + 1;

}

The quality is that of a basic LCG, so not extremely high.