/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:33:20 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv pf=,p_zgam s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_zgam.h" int main( ) { long int i, j, _i, _r; double arg[2], err0, err1, gam[2], lgam[2]; static double x[8][2]; static int _aini = 1; /* OFFSET Vectors w/subscript range: 1 to dimension */ double *const Arg = &arg[0] - 1; double *const Gam = &gam[0] - 1; double *const Lgam = &lgam[0] - 1; /* end of OFFSET VECTORS */ if( _aini ){ /* Do 1 TIME INITIALIZATIONS! */ { static double _itmp0[] = {1.0e0,0.0e0,1.0e0,0.5e0,1.5e0, 0.0e0,1.5e0,0.5e0,0.0e0,0.5e0,-1.5e0,0.5e0,-1.5e0,0.0e0,-1.5e0, -0.5e0}; for (j = 1, _r = 0; j <= 8; j++) { for (i = 1; i <= 2; i++) { x[j - 1][i - 1] = _itmp0[_r++]; } } } _aini = 0; } /*>> 2001-05-22 DRZGAM Krogh Minor change for making .f90 version. *>> 1996-06-14 DRZGAM Krogh Changes for C conversion. *>> 1994-08-17 CLL *>> 1991-10-18 Demo driver for ZGAM * ------------------------------------------------------------------ *-- D version uses DRZGAM, ZGAM *-- S version uses DRCGAM, CGAM * ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */ printf(" X GAMMA Err Est LGAMA Err Est\n"); for (j = 1; j <= 8; j++) { Arg[1] = x[j - 1][0]; Arg[2] = x[j - 1][1]; zgam( arg, gam, &err1, 1 ); zgam( arg, lgam, &err0, 0 ); printf(" %5.1f%20.10g%10.2g%22.10g%10.2g\n %5.1f%20.10g%32.10g\n\n", Arg[1], Gam[1], err1, Lgam[1], err0, Arg[2], Gam[2], Lgam[2]); } exit(0); } /* end of function */