Operating System - OpenVMS
1748228 Members
4342 Online
108759 Solutions
New Discussion юеВ

Re: Generating Random Numbers.

 
SOLVED
Go to solution
Robert Gezelter
Honored Contributor

Re: Generating Random Numbers.

Dave,

A note on "randomness".

There is a large difference between the colloquial usage of the word, and the (generally accepted) precise mathematical meaning. The difference between the two is significant.

If a program is merely using a "random" number for an inconsequential task (e.g., which of 17 equivalent greetings to include on an invoice), then precise randomness is not an issue. On the other hand, when programs are using numbers for significant purposes, where non-randomness can induce bias has the potential to cause inaccuracy (e.g., simulations, sampling of various kinds, drug trials, gambling) where the precise definition rises in import.

Since nothing is known about the applications context, my default position is to assume that randomness is of significance. Thus, functions that do not fit the mathematical requirements do not qualify.

F$UNIQUE is better used for a different purposes (e.g., generating file names).

In summary, problems involving pseudo random number generators are a pool with a significant shallow section where choices are close to insignificant, and other sections where there is VERY deep water which can cause one to drown if one is not careful.

- Bob Gezelter, http://www.rlgsc.com
labadie_1
Honored Contributor

Re: Generating Random Numbers.

If you install Python on VMS, you can use hasard

https://bitbucket.org/haypo/hasard/wiki/Home

The Brit
Honored Contributor

Re: Generating Random Numbers.

Thanks for all of the comments.

Dave.