home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!nih-csl.dcrt.nih.gov!helix.nih.gov!rvenable
- From: rvenable@helix.nih.gov (Richard M. Venable)
- Subject: Re: function for generating the random numbers
- Message-ID: <1992Nov5.062904.17315@alw.nih.gov>
- Sender: postman@alw.nih.gov (AMDS Postmaster)
- Organization: National Institutes of Health, Bethesda
- References: <1992Nov3.215800.11143@leland.Stanford.EDU>
- Distribution: usa
- Date: Thu, 5 Nov 1992 06:29:04 GMT
- Lines: 19
-
- In article <1992Nov3.215800.11143@leland.Stanford.EDU> sangwook@leland.Stanford.EDU (Sang Wook Sihn) writes:
- >Hi,
- >Does anyone know how to generate the random numbers with fortran?
- >Thanx.
-
- First, I'd recommend consulting the book "Numerical Recipes" and read the
- sections (and code) on random number generation. It should be found in any
- good technical library.
-
- Random numbers are selected from some underlying distribution, such as a
- uniform (all equally probable) or Gaussian (the 'normal' distribution). Most
- systems, including those with Unix, provide some type of call to provide
- a 'random' integer or real number from a uniform distribution. The Unix 'rand'
- function can be called from Fortran, as well as C, for example.
-
- If you intend to use the random numbers for any serious scientific work, you
- should test the random number generator very carefully before using it. Not
- all vendor-supplied random number routines are scientifically rigorous.
-
-