XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ cosqmi()

void cosqmi ( int  n,
double  wsave[],
int  lwsave,
int *  info 
)

Initialization of work data for cosqmf and cosqmb

Purpose
cosqmi initializes array wsave[] for use in its companion routines cosqmf and cosqmb. The prime factorization of n together with a tabulation of the trigonometric functions are computed and stored in array wsave[].

Note - The initialization of wsave[] is not necessary for the succeeding call of cosqmf or cosqmb for the same n value. If the value of n has been changed, wsave[] should be re-initialized by this routine.
Parameters
[in]nThe length of the sequence to be transformed. (n >= 1)
The transform is most efficient when n is a product of small primes.
[out]wsave[]Array wsave[lwsave]
Work data, containing the prime factors of n and also containing certain trigonometric values which will be used in routines cosqmf or cosqmb.
[in]lwsaveThe length of the array wsave[]. (lwsave >= 2*n + ln(n)/ln(2) + 4)
[out]info= 0: Successful exit
= -1: The argument n had an illegal value (n < 1)
= -3: The argument lwsave had an illegal value (lwsave not big enough)
Reference
FFTPACK 5.1