|
From:
<br...@ph...> - 2006-05-12 02:39:13
|
Daniel J Sebald wrote: >> Since we make no promises whatsoever about the rand() algorithm, > > Well, it depends. Here is what the gnuplot code says: What the source code says is quite irrelevant. The manual is where the contract with the users is made. As long as the manual doesn't say how rand() works, any assumption users make about that subject are wrong by default. > If the algorithm is as stated in the paper and checks out, why not make > the promise, within the limites of GNU/freeware promises, that is? Because a promise automatically creates a liability to keep that promise forever. One of gnuplot's strongest points has always been script compatibility. Gnuplot-4.0 will still run pretty much any sane plot script that worked for version 3.2, with only very few, *well* motivated exceptions. > Setting the seed of a random number generator is meaningless? No. But what the actual number you specify as the seed will mean, is completely undefined. On purpose. > against some other result elsewhere. Researchers do that sort of thing > quite a bit, I would think. Cryptography perhaps being an example? Nobody in a remotely sane state of mind would use a plain vanilla rand() function like gnuplot's for cryptography. > No, the seed and what the PRNG return are two different things. You did seem to like Octave's behaviour though, which returned the seed as the next random number... > issue is that, yes, the gnuplot PRNG is replacing the state of the PRNG > but then it immediately generates a random number that *can't be used*. That number is just as pseudo-random as any other one coming out of the PRNG. And rand() being a function, it must return some value --- what else should that be? > unused = rand(678) > > does not set the seed to 678. It sets it to whatever the seed is that > follows 678. No. Certainly not in gnuplot, because 678 can never be the output of our rand(), so there's no such thing as "the seed that follows" it. A seed in a PRNG must do exactly one thing: the PRN sequences after seeding it with the same number must be equal. That's *all* you can rely on in a seed. Seed numbers have no meaning --- for all practical mans and purposes, they're no more meaningful than the non-area part of a telephone number. |