next up previous index
Next: V111 Binomial Random Up: CERNLIB Previous: V109 Random Numbers

V110 Poisson Random Numbers

Routine ID: V110
Author(s): D. DrijardLibrary: MATHLIB
Submitter: Submitted: 26.01.1989
Language: FortranRevised:

OBSOLETE

Please note that this routine has been obsoleted in CNL 218. Users are advised not to use it any longer and to replace it in older programs. No maintenance for it will take place and it will eventually disappear.
Suggested replacement: RNPSSN (V136)

POISSN generates a random integer N according to a Poisson law:

Prob(N) = {1N!} eμN,

where μ> 0 (the mean) is a constant specified by the user.

Structure:

SUBROUTINE subprogram
User Entry Names: POISSN, POISET
External References: RANNOR (V100), RNDM (V104)

Usage:

    CALL POISSN(AMU,N,IERR)
AMU
Mean μ .
N
The generated random number, Poisson distributed, with mean AMU.
IERR
Error flag.
= 0: Normal case.
= 1: AMU ≤0 .
For AMU > AMAX , a normal approximation is made. The value of AMAX is defined in Timing and can be reset by
    CALL POISET(AMAX)

Timing:

In μ sec per call:

Los Alamos report LA-5061-MS

V111


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995