hi all,
I used the Random Number Generator, page 85, from the book "Practical Programming in Tcl and Tk(3rd edition)" by Brent B. Welch. As it is mentioned there, it was adapted from a different source. anyway, the point is this RNG is having a flaw. It took me one whole day to recognize this as my program was giving some bizzare results. finally I found out that this RNG is generating repeated sequence of random numbers.
for example if I use this RNG to produce ten random numbers between 1 and 10, and if I call the same routine for 300 times, that means I get 300 number sequences of ten numbers per each sequence. these sequences are getting repeated after a while, like 100th sequence is same as 240th, 101st sequence is same as 241st and so on.
My request is can anyone tell me where I can get a better RNG to use in my Tk script.
thnx in adv,
Raj.
I used the Random Number Generator, page 85, from the book "Practical Programming in Tcl and Tk(3rd edition)" by Brent B. Welch. As it is mentioned there, it was adapted from a different source. anyway, the point is this RNG is having a flaw. It took me one whole day to recognize this as my program was giving some bizzare results. finally I found out that this RNG is generating repeated sequence of random numbers.
for example if I use this RNG to produce ten random numbers between 1 and 10, and if I call the same routine for 300 times, that means I get 300 number sequences of ten numbers per each sequence. these sequences are getting repeated after a while, like 100th sequence is same as 240th, 101st sequence is same as 241st and so on.
My request is can anyone tell me where I can get a better RNG to use in my Tk script.
thnx in adv,
Raj.