Doxygen Source Code Documentation
cdf_34.c
Go to the documentation of this file.00001 #include "cdflib.h" 00002 void cumpoi(double *s,double *xlam,double *cum,double *ccum) 00003 /* 00004 ********************************************************************** 00005 00006 void cumpoi(double *s,double *xlam,double *cum,double *ccum) 00007 CUMulative POIsson distribution 00008 00009 00010 Function 00011 00012 00013 Returns the probability of S or fewer events in a Poisson 00014 distribution with mean XLAM. 00015 00016 00017 Arguments 00018 00019 00020 S --> Upper limit of cumulation of the Poisson. 00021 S is DOUBLE PRECISION 00022 00023 XLAM --> Mean of the Poisson distribution. 00024 XLAM is DOUBLE PRECIS 00025 00026 CUM <-- Cumulative poisson distribution. 00027 CUM is DOUBLE PRECISION 00028 00029 CCUM <-- Compliment of Cumulative poisson distribution. 00030 CCUM is DOUBLE PRECIS 00031 00032 00033 Method 00034 00035 00036 Uses formula 26.4.21 of Abramowitz and Stegun, Handbook of 00037 Mathematical Functions to reduce the cumulative Poisson to 00038 the cumulative chi-square distribution. 00039 00040 ********************************************************************** 00041 */ 00042 { 00043 static double chi,df; 00044 /* 00045 .. 00046 .. Executable Statements .. 00047 */ 00048 df = 2.0e0*(*s+1.0e0); 00049 chi = 2.0e0**xlam; 00050 cumchi(&chi,&df,ccum,cum); 00051 return; 00052 } /* END */