/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:30:04 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include "dconmc.h" #include void /*FUNCTION*/ dconmc( long n, double coeff[]) { long int i, j; double tp; /* Copyright (c) 1996 California Institute of Technology, Pasadena, CA. * ALL RIGHTS RESERVED. * Based on Government Sponsored Research NAS7-03001. *>> 1994-11-11 DCONMC Krogh Declared all vars. *>> 1994-10-20 DCONMC Krogh Changes to use M77CON *>> 1992-06-04 DCONMC Krogh Corrected line below. *>> 1992-01-31 DCONMC Krogh Initial Code. *--D replaces "?": ?CONMC * * Converts COEFF in monomial basis to the Chebyshev basis. * */ if (n <= 0) return; tp = powi(.5e0,n - 1); coeff[n] *= tp; coeff[n - 1] *= tp; for (j = n - 2; j >= 0; j--) { tp *= 2.e0; coeff[j] *= tp; coeff[j + 1] *= 2.e0; for (i = j; i <= (n - 2); i++) { coeff[i] += coeff[i + 2]; } } return; } /* end of function */