1
SUBROUTINE cumpoi(s,xlam,cum,ccum)
2
C**********************************************************************
4
C SUBROUTINE CUMPOI(S,XLAM,CUM,CCUM)
5
C CUMulative POIsson distribution
11
C Returns the probability of S or fewer events in a Poisson
12
C distribution with mean XLAM.
18
C S --> Upper limit of cumulation of the Poisson.
19
C S is DOUBLE PRECISION
21
C XLAM --> Mean of the Poisson distribution.
22
C XLAM is DOUBLE PRECIS
24
C CUM <-- Cumulative poisson distribution.
25
C CUM is DOUBLE PRECISION
27
C CCUM <-- Compliment of Cumulative poisson distribution.
28
C CCUM is DOUBLE PRECIS
34
C Uses formula 26.4.21 of Abramowitz and Stegun, Handbook of
35
C Mathematical Functions to reduce the cumulative Poisson to
36
C the cumulative chi-square distribution.
38
C**********************************************************************
39
C .. Scalar Arguments ..
40
DOUBLE PRECISION s,xlam,cum,ccum
43
DOUBLE PRECISION chi,df
45
C .. External Subroutines ..
48
C .. Executable Statements ..
51
CALL cumchi(chi,df,ccum,cum)