Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^5: inclusive rand

by LanX (Saint)
on Mar 13, 2017 at 13:32 UTC ( [id://1184419]=note: print w/replies, xml ) Need Help??


in reply to Re^4: inclusive rand
in thread inclusive rand

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
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1184419]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-23 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found