The relevant NAG routine is C06FCF and the FFTPACK routines are PDA_DCFFTI, PDA_DCFFTF and PDA_DCFFTB. These routines take the Fourier transform of a general complex sequence of N values (i.e. 2*N real values), also returning the Fourier transform in a sequence of N complex values. FFTPACK and NAG differ in that FFTPACK stores the real and imaginary parts of each complex value in adjacent elements of the array, whereas NAG has two separate arrays, one for the real terms and one for the imaginary terms. There is also a difference in the normalisation of the routines in that the real and imaginary Fourier coefficients produced by PDA_DRFFTF are numerically larger than the corresponding C06FAF coefficients by a factor of SQRT(N). There are subroutines PDA_DNAG2C and PDA_DC2NAG to convert between NAG and FFTPACK format. Successive calls to PDA_DC2NAG and PDA_DNAG2C will result in the original data being divided by N. This is done to cancel the multiplication by N which occurs when successive calls to PDA_DCFFTF and PDA_DCFFTB are made.