|
|
"Tom Melly" <tom### [at] tomandlucouk> wrote:
> How many numbers are in the rand stream before it repeats itself, or is
this a
> meaningless question?
I assume we're talking about pseudo random numbers generators here, right?
The number you are talking about is known as the period of a generator and
is one of its most important properties... The two best generators that I
know are RANDMAR (with period 2^144; I use this one in my projects), and
R250 (with period 10^250, i.e. 1e251).
BTW, the "before it repeats itself" actually applies to the sub-sequences,
and not to individual numbers... RNGs' internals make it possible for many
different numbers to follow any given number. For instance, the following
sequence is easily possible with many RNGs:
1 2 3 4 2 9
Notice that 2 is first followed by 3, and then by 9. But if the period of
this generator is 6 :-), then 9 will be followed by 1 -- it is here that the
actual repetition takes place.
...
Oh well, I just figured out that that's p.g, so you probably meant POV-Ray
streams. Sorry for an off-topic post. Follow-ups to p.programming.
Post a reply to this message
|
|