Hi all
What algorithm is used in the built-in function rand() in C?
Thanks in advance
Fred
Hi all
What algorithm is used in the built-in function rand() in C?
Thanks in advance
Fred
> What algorithm is used in the built-in function rand() in C?
It's random
The standard doesn't specify a particular algorithm, so even from the same seed, two different implementations can return different results.
Most tend to be variants of
http://random.mat.sbg.ac.at/~charly/server/node3.html