Just another Perl shrine | |
PerlMonks |
Re^5: inclusive randby LanX (Saint) |
on Mar 13, 2017 at 13:32 UTC ( [id://1184419]=note: print w/replies, xml ) | Need Help?? |
in reality one wants random results which are equally distributed. 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
In Section
Seekers of Perl Wisdom
|
|