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