Converts an FFTPACK Hermitian Fourier transform array into the equivalent
NAG array KPG1_DR2NAG
This function is equivalent to PDA_DR2NAG except that it uses work space for greater speed.
The real and imaginary co-efficients produced by KPG1_DRFFTF are numerically larger than the corresponding C06FAF co-efficients by a factor of SQRT( NP ), and are ordered differently. Both routines return A0 (the zeroth real term, i.e. the DC level in the array) in element 1. KPG1_DRFFTF then has corresponding real and imaginary terms in adjacent elements, whereas C06FAF has all the real terms together, followed by all the imaginary terms (in reverse order):
KPG1_DRFFTF: A0, A1, B1, A2, B2, A3, B3, ... C06FAF: A0, A1, A2, A3, ..., ..., B3, B2, B1
The zeroth imaginary term (B0) always has the value zero and so is not stored in the array. Care has to be taken about the parity of the array size. If it is even, then there is one more real term than there is imaginary terms (excluding A0), i.e. if NP = 10, then the co-efficients are stored as follows:
KPG1_DRFFTF: A0, A1, B1, A2, B2, A3, B3, A4, B4, A5 C06FAF: A0, A1, A2, A3, A4, A5, B4, B3, B2, B1
If NP = 9, then the co-efficients are stored as follows:
KPG1_DRFFTF: A0, A1, B1, A2, B2, A3, B3, A4, B4 C06FAF: A0, A1, A2, A3, A4, B4, B3, B2, B1