The "rand" function is implementation defined, so it doesn't work the
same for every compiler. Most of them use a pseudo-random generating
function such as linear congruential generators, lagged Fibonacci
generators, and linear feedback shift registers. Poor generators are
very common and have bad statistical properties and often produce
obvious patterns, particularly in the low-order bits. Better
generators have larger state and therefore can have longer periods.
Generators such as the Mersenne Twister, or George Marsaglia's
multiply with carry.
Don

On Dec 5, 9:58 am, Prakash <[email protected]> wrote:
> Anyone please explain how rand() function is defined and how it
> works?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to