/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:33:14 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv pf=,p_scdchi s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_scdchi.h" int main( ) { long int _n, ierr, j; float chisq, nu, p, q[4]; /* OFFSET Vectors w/subscript range: 1 to dimension */ float *const Q = &q[0] - 1; /* end of OFFSET VECTORS */ /*>> 2001-05-25 DRSCDCHI Krogh Minor change for making .f90 version. *>> 1996-06-17 DRSCDCHI Krogh Minor format change for C conversion. *>> 1996-05-28 DRSCDCHI Krogh Changed Fortran 90 code. *>> 1994-10-19 DRSCDCHI Krogh Changes to use M77CON *>> 1994-07-06 DRSCDCHI WVS set up for chgtyp * * Evaluate the Probability Integral Q(chi-square,nu) of the Chi- * Square distribution by using SCDCHI. * *--S 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; scdchi( chisq, nu, &p, &Q[j], &ierr ); } printf("%14.7g", chisq); for(_n=0L; _n < sizeof(q)/sizeof(float); _n++) printf("%14.7g", q[_n]); printf("\n"); chisq += 0.5e0; goto L_30; } exit(0); } /* end of function */