/*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_slasum s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_slasum.h" /* DRSLASUM *>> 1994-10-19 DRSLASUM Krogh Changes to use M77CON *>> 1994-07-14 DRSLASUM CLL *>> 1992-05-07 CLL *>> 1992-04-28 DRSLASUM Replaced '1' in format. *>> 1987-12-09 DRSLASUM Lawson Initial Code. *--S replaces "?": DR?LASUM, ?LASUM * Demonstration program for evaluation of a Laguerre series. * ------------------------------------------------------------------ */ int main( ) { long int j; float dif, reldif, w, x, y; static float a[6-(0)+1]={7.2e0,-43.2e0,108.0e0,-144.0e0,108.0e0, -43.2e0,7.2e0}; static float pn[6]={0.1e0,0.3e0,1.0e0,3.0e0,10.0e0,30.0e0}; /* OFFSET Vectors w/subscript range: 1 to dimension */ float *const Pn = &pn[0] - 1; /* end of OFFSET VECTORS */ /* ------------------------------------------------------------------ */ printf(" x y dif reldif\n\n"); for (j = 1; j <= 6; j++) { x = Pn[j]; slasum( x, 6, a, &y ); w = 0.01e0*(powif(x,6)); dif = y - w; reldif = dif/w; printf(" %6.2f %15.8g %10.3g %10.3g\n", x, y, dif, reldif); } exit(0); } /* end of function */