Cmul2multiplies each element inAby the corresponding element inBand stores the result in the corresponding element ofC. The elements are in the form of the Fourier series coefficients output by theFftsubroutine. A special routine for multiplying these coefficients is necessary because the basis functions of the Fourier sine series are notnormal, since
and
forka positive integer. When the coefficients of two such series are multiplied, the result for each term havingk> 0 needs to be scaled by dividing by 2 to make the resultant series have the same basis functions as the original series.
Two series output by the relatedCfftsubroutine can be multiplied using the HTBasic matrix dot (".") operator, since the basis function forCfft,e2Πikt(i=√-1), is normal.
Errors
Cmul2causes an HTBasic error if its arguments are not of the types shown in the USAGE section, above, or if the size ofA,B, orCis smaller than 2Logn.