/*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_dlasum s=dbov str=l x=f - prototypes */
#include <math.h>
#include "fcrt.h"
#include <stdio.h>
#include <stdlib.h>
#include "p_dlasum.h"
/*     DRDLASUM
 *>> 1994-10-19 DRDLASUM Krogh  Changes to use M77CON
 *>> 1994-07-14 DRDLASUM CLL
 *>> 1992-05-07 CLL
 *>> 1992-04-28 DRDLASUM Replaced '1' in format.
 *>> 1987-12-09 DRDLASUM Lawson  Initial Code.
 *--D replaces "?": DR?LASUM, ?LASUM
 *     Demonstration program for evaluation of a Laguerre series.
 *     ------------------------------------------------------------------ */
 
int main( )
{
	long int j;
	double dif, reldif, w, x, y;
	static double a[6-(0)+1]={7.2e0,-43.2e0,108.0e0,-144.0e0,108.0e0,
	 -43.2e0,7.2e0};
	static double pn[6]={0.1e0,0.3e0,1.0e0,3.0e0,10.0e0,30.0e0};
		/* OFFSET Vectors w/subscript range: 1 to dimension */
	double *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];
		dlasum( x, 6, a, &y );
		w = 0.01e0*(powi(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 */