# FFT (Numerical Recipes in FORTRAN 77)

I am trying to use the subroutine twofft which in turn uses subroutine four1 in the book(Numerical Recipes in Fortran) to compute the FFT of two double precision data arrays. If you carefully look at the twofft routine, the arrays fft1 and fft2 are declared as complex which are sent as arguments to four1 which declares the same two arrays as double precision( or real if you are using the real version).

Is this allowed? I am unable to obtain the correct FFT for my data. Any suggestion how to get around this problem? I just want to perform a quick FFT and a deconvolution and not have to go through the entire process of understanding the code.

• Thanks for the information and your suggestion. I was playing around with another set of routines namely, $\textit{fftpack5}$ and found that did the job of getting the FFT. I do have a new problem though, how does one multiply two complex numbers in fortran?Please know that I am quite new to fortran 77 standard. – MSIngh Apr 17 '16 at 2:08