V136: Poisson Random Numbers

Author(s): D. Drijard, K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 15.10.1994
Language: Fortran Revised: 10.05.1995

Subroutine subprogram POISSN generates a random integer N>0 according to the Poisson distribution

displaymath72

where tex2html_wrap_inline74 (the mean) is a constant specified by the user.

Structure:

SUBROUTINE subprogram
User Entry Names: RNPSSN, RNPSET
External References: RANLUX, RNORMX

Usage:

    CALL RNPSSN(AMU,N,IERR)
AMU
(REAL) Mean tex2html_wrap_inline76 .
N
(INTEGER) The generated random number N, Poisson-distributed, with mean AMU.
IERR
(INTEGER) Error flag.
tex2html_wrap_inline80 Normal case.
tex2html_wrap_inline82 tex2html_wrap_inline84 .
For tex2html_wrap_inline86 , a (faster) normal approximation is made. The default value for AMAX is tex2html_wrap_inline88 . It can be reset (to smaller values only) by
    CALL RNPSET(AMAX)

Timing:

Time increases with tex2html_wrap_inline90 roughly as tex2html_wrap_inline92 .
tex2html_wrap_inline94


Michel Goossens Wed Jun 5 08:46:48 METDST 1996