Convert FFTPACK Hermitian Fourier transform array into equivalent NAG array
The real and imaginary coefficients produced by PDA_RFFTF are numerically larger than the
corresponding C06FAF coefficients 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.
PDA_RFFTF 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):
PDA_RFFTF : 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 coefficients are stored as
follows:
PDA_RFFTF : 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 coefficients are stored as follows:
PDA_RFFTF : A0, A1, B1, A2, B2, A3, B3, A4, B4
C06FAF: A0, A1, A2, A3, A4, B4, B3, B2, B1