|
|
"Kenneth" <kdw### [at] earthlinknet> wrote in message
news:web.48293172dace545278dcad930@news.povray.org...
> "somebody" <x### [at] ycom> wrote:
> > "Kenneth" <kdw### [at] earthlinknet> wrote
> > > BTW, in working with this technique (and running some other
experiments),
> > I've found that rand() doesn't actually HIT zero or one.
> > A pseudo random generator should in practice not hit *any* given number,
not
> > just 0 and 1, unless you cover its period at least a few times. Further,
in
> > practice again, some (or many) numbers in range will simply be
"unhittable".
> Not sure I understand what you mean by *period*. Would that be *all* the
> possible numbers between 0 and 1 that can conceivably be found in Pov_Ray?
Correction, I was mixing two things. With a pseudo-rng, you need to only
cover the period once (after that, it starts repeating). With a
physical/hardware rng, you can of course never be sure, but in practice, if
you cover the domain of possible values a few times over, you can develop
enough confidence. I don't know what POV uses for rng.
> As to some values being unhittable--can't say I understand why, unless it
has
> something to do with underlying computational processes that I don't
understand
> (and I don't understand plenty, when it comes to such things! :-)
That happens if the period of a rng is smaller than the domain of generated
numbers (ie a rng with period 2^30 returning 32 bits won't hit 75% of the
numbers in the domain).
Post a reply to this message
|
|