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