/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:33:08 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv pf=,p_dcdpoi s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_dcdpoi.h" int main( ) { long int _n, ierr, j, n; double p, q[4]; static double lamdas[4]={0.5e0,1.0e0,1.5e0,2.0e0}; /* OFFSET Vectors w/subscript range: 1 to dimension */ double *const Lamdas = &lamdas[0] - 1; double *const Q = &q[0] - 1; /* end of OFFSET VECTORS */ /*>> 2001-05-25 DRDCDPOI Krogh Minor change for making .f90 version. *>> 1996-05-28 DRDCDPOI Krogh Changed Fortran 90 code. *>> 1994-10-19 DRDCDPOI Krogh Changes to use M77CON *>> 1994-07-06 DRDCDPOI WVS set up for chgtyp * * Evaluate the Probability Function Q(n,lamda) of the Poisson * distribution by using DCDPOI. * *--D replaces "?": DR?POI, DR?CDPOI, ?cdpoi, ?gamik */ dgamik( 0.0e0, 0.0e0, 0.0e0, 0 ); printf(" Poisson Probability Function Q(lamda | n)\n N LAMDA ="); for(_n=0L; _n < sizeof(lamdas)/sizeof(double); _n++) printf("%14.7f", lamdas[_n]); printf("\n"); for (n = 1; n <= 10; n++) { for (j = 1; j <= 4; j++) { dcdpoi( n, Lamdas[j], &p, &Q[j], &ierr ); } printf("%3ld", n); printf(" "); for(_n=0L; _n < sizeof(q)/sizeof(double); _n++) printf("%14.7g", q[_n]); printf("\n"); } exit(0); } /* end of function */