A
A. Sinan Unur
From the posts that I've read, and from your recently posted code
(upstream), you were making a case against calling srand() (or more
accurately, after) each call to rand(). However, to my knowledge,
nobody was making a case /for/ such behavior.
I was trying to show the extreme case because I frankly did not have the
patience to run long simulations and subject them to a battery of
statistical tests.
While I am just a practitioner in the field of statistics, and not a
theorist, I think the general principle still holds that my seeding the
PRNG multiple times in a given run, you run the risk of introducing
patterns into the sequence (which may not be detectable to the human,
but may lead to undesirable consequences).
I should have said "the main reason the ability to seed the PRNG
exists".
Hm. Given rand()'s implementation track-record, I can't think of many
scientific applications in which I would be comfortable using it
(though I don't doubt for a moment the truth of what you say).
I was thinking in a slightly more general context than just the stock
rand/srand provided by the library, but more in terms of any PRNG and
its seeder. I did not make that clear. Sorry.
Sinan