/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:30:06 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include "dmpval.h" #include double /*FUNCTION*/ dmpval( double p[], long ndeg, double x) { long int j; double dmpval_v, u; /* OFFSET Vectors w/subscript range: 1 to dimension */ double *const P = &p[0] - 1; /* end of OFFSET VECTORS */ /* Copyright (c) 1996 California Institute of Technology, Pasadena, CA. * ALL RIGHTS RESERVED. * Based on Government Sponsored Research NAS7-03001. *>> 1994-10-20 DMPVAL Krogh Changes to use M77CON *>> 1994-04-20 DMPVAL CLL Making DP and SP versions similar. *>> 1987-12-09 DMPVAL Lawson Initial code. * Evaluation of polynomial using monomial basis and a * linear transformation of the argument. * C.L.LAWSON, JPL, 1974 NOV 19 * ------------------------------------------------------------------ *--D replaces "?": ?MPVAL * ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */ dmpval_v = 0.0e0; u = (x - P[1])/P[2]; for (j = ndeg; j >= 0; j--) { dmpval_v = dmpval_v*u + P[j + 3]; } return( dmpval_v ); } /* end of function */