/*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_dcdchi s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_dcdchi.h" int main( ) { long int _n, ierr, j; double chisq, nu, p, q[4]; /* OFFSET Vectors w/subscript range: 1 to dimension */ double *const Q = &q[0] - 1; /* end of OFFSET VECTORS */ /*>> 2001-05-25 DRDCDCHI Krogh Minor change for making .f90 version. *>> 1996-06-17 DRDCDCHI Krogh Minor format change for C conversion. *>> 1996-05-28 DRDCDCHI Krogh Changed Fortran 90 code. *>> 1994-10-19 DRDCDCHI Krogh Changes to use M77CON *>> 1994-07-06 DRDCDCHI WVS set up for chgtyp * * Evaluate the Probability Integral Q(chi-square,nu) of the Chi- * Square distribution by using DCDCHI. * *--D replaces "?": DR?CHI, DR?CDCHI, ?cdchi */ chisq = 0.5e0; printf(" Probability Integral Q(chi**2 | nu)\n CHI**2 NU = 1 2 3 4\n"); L_30: if (chisq <= 6) { for (j = 1; j <= 4; j++) { nu = j; dcdchi( chisq, nu, &p, &Q[j], &ierr ); } printf("%14.7g", chisq); for(_n=0L; _n < sizeof(q)/sizeof(double); _n++) printf("%14.7g", q[_n]); printf("\n"); chisq += 0.5e0; goto L_30; } exit(0); } /* end of function */