Author(s): F. James | Library: MATHLIB |
Submitter: | Submitted: 15.09.1978 |
Language: Fortran | Revised: |
Structure:
SUBROUTINE subprogram
User Entry Names: RAN3D
External References: NRAN
Usage:
CALL RAN3D(X,Y,Z,XLONG)
Method:
A random vector in the unit cube is generated using NRAN (V105)
and is rejected if it lies outside the unit sphere. This rejection
technique uses on average about 6 random numbers per vector, where only
two are needed in principle. However, it is faster than the classical
two-number technique which requires a square root, a sine, and a cosine.