+ 1
What is the exact algorithm that the rand () function uses to get random numbers ?
So in c++ we can see a rand () function which genarates random numbers. It uses a seed value which used to genatate random numbers. So there must be some mathmetical mechanism which the random number is generated. My question is how does the rand () function generate these random numbers.
2 Antworten
+ 1
https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/random_r.c;h=a393dd3c199b5b08a16f3044f2a3bc21f8e88410;hb=HEAD
0
good reading