/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:33:11 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv pf=,p_dlesum s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_dlesum.h" /* DRDLESUM *>> 1995-05-28 DRDLESUM Krogh Changes to use M77CON *>> 1994-08-09 DRDLESUM WVS Set up for CHGTYP *>> 1994-07-14 DRDLESUM CLL *>> 1992-04-29 DRDLESUM CAO Replaced '1' in format. *>> 1991-11-19 DRDLESUM CLL *>> 1987-12-09 DRDLESUM Lawson Initial Code. *--D replaces "?": ?LESUM, DR?LESUM * * Demonstration driver for evaluation of a Legendre series. * ------------------------------------------------------------------ */ int main( ) { long int j; double w, x, y, z; static double a[5-(0)+1]={0.07e0,0.27e0,0.20e0,0.28e0,0.08e0,0.08e0}; /* ------------------------------------------------------------------ */ printf(" x y z\n\n"); for (j = -10; j <= 10; j += 2) { x = (double)( j )/10.e0; dlesum( x, 5, a, &y ); w = 0.35e0*(powi(x,4)) + 0.63e0*(powi(x,5)); z = y - w; printf(" %5.2f %15.7g%15.2g\n", x, y, z); } exit(0); } /* end of function */