1. ## Random random seeds

Code:
```  srand(time(NULL));
srand(rand() % 5000);```
Would that be more random than just calling the time seed alone?

2. No not really. You will only seed srand with a different number.

3. I've ran some tests on both. My method seems to be more random. I tested with really small numbers (0-5) small numbers (0-50) and large numbers (0-500)

4. But that doesn't nececsary mean that the numbers are more random. The series
'1,1,1,1,1' is just as likely as '2,50,765,78,912'

5. well is there ANY way to make the random numbers more random?

6. random is random... I've never had a problem with random numbers b4 where i get the same number each time. I use the random seed generator:
Code:
`srand(GetTickCount())`
with <windows.h> and that always works fine for me.

7. BASIC's system, once compiled, would always select the same numbers. Its just that you wouldn't have to specify the numbers. Theoretically, using that code shouldn't make much of a difference, but go ahead and try it. Once something is random, it's about as random as it's going to get. It's like if I shoot something, it's dead. I can't shoot it again to make it more dead.

8. Wouldn't frenchfry's way actually be alot less random? Using the time as a seed will always give you a different seed than before, as time goes forward all the time. But with his, you'd only have 5000 (or whatever number he chooses) different seeds, and thus, it would give out the same numbers every 5000 times you run the program, or so. Ofcourse it might choose the same number more often, but you know what I mean.

9. no, because I already seeded it with time.

10. rand() is a psuedo-random number generator. It will always produce the same sequence of "random" numbers with a given seed.
srand() take an unsigned int as its argument so the total possible number of seeds is ~65500 for a 2-byte int and ~4,300,000,000 for a 4-byte int (which is more likely now days). Which means, it is possible to have the same seed every now and again but rather unlikely. As pointed out, if you mod by 5000, you have just cut down the total possible seeds to only 5000.

11. Also, you should use RAND_MAX to calculate your random numbers:
(rand() * 5) / RAND_MAX

See this thread for an explanation:
http://www.cprogramming.com/cboard/s...highlight=rand

12. French, in most cases srand() and rand() provide sufficently random number for an application.

Also, if you WERE to come up with a completely random random number generator, you would most likely get a PhD out of it. The security and encryption industry is always looking for more random random numbers.

Code:
```srand(time(NULL));
srand(rand() % time(NULL));```

14. french, I can tell you very simply why that would fail to produce a more random number.

The only unique number given to srand is time(). Therefore, there is an upper limit on randomness set at srand(unsigned(time(NULL)))