Pacific Northwest National Laboratory
Fortran Library Manual: RanPak

FLIB Manual Table of Contents
FLIB ErrPak Routines
FLIB FioPak Routines
FLIB MatPak Routines
FLIB PrnPak Routines
FLIB RanPak Routines
FLIB StrPak Routines
FLIB SysPak Routines
FLIB TimPak Routines


RanPak is a set of routines to sample quasi-random numbers from various probability density functions. The focus of the library is mainly on sampling (x,y,z) coordinates from various geometrical objects. Routines are also provided to sample direction vections from a cone or all 4PI directions.

Comments

All of the above routines should work correctly on any computer system with a maximum integer greater than or equal to 2**31 - 1. The proper function of the routine can verified by checking to see that the random number seed after generating 10,000 random numbers is 1,043,618,065 (use an initial seed of 1). The algorithm(s) implemented in RanPak are based on the widely used (but by no means the absolute best) Linear congruential generator (originally proposed by Lehmer in 1948) described in the classic paper

    SK Park and KW Miller, Random number generators: good ones are hard to find. Communications of the ACM, 31(10) Oct. 1988.
For more information on random number generators, try this website http://random.mat.sbg.ac.at/


Return to FLIB webpage

Website maintained by Rob Stewart (trebor@purdue.edu).
Last Updated: 03-Nov-1999
Disclaimer