in reply to Re^4: inclusive rand
in thread inclusive rand
This consequently means one decides how big the result set is in order to define the requested probability of one single element of this set (which is actually only approximated) and some other criteria like distribution (also approximated)
If ... for any applications which are beyond my experience ... the resolution of the build in rand is not enough, you'd simply use another rand-module from CPAN in conjunction with something like bignum
Now ... asking for equally distributed real numbers is nonsensical, because you can't tell the expected probability of say pi.
And even if you used a natural random number generator ... like by measuring radio activity ... you'd finally be confronted with the limits of quantum mechanics. There is no unlimited precision.
We live in reality, and computers are build into the real world (i.e. this universe)
This means a random number is always ultimately some integer in disguise.
Sorry your question can't be answered otherwise because it would become unreal.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
---|