CFFTF1(3)

SYNOPSIS
SUBROUTINE CFFTF1 (N, C, CH, WA, IFAC)

NAME
cfftf1 - Compute the forward transform of a complex, periodic sequence.

LIBRARY
SLATEC (FFTPACK)

CATEGORY
J1A2

TYPE
COMPLEX (RFFTF1-S, CFFTF1-C)

KEYWORDS
FFTPACK, FOURIER TRANSFORM

AUTHOR
Swarztrauber, P. N., (NCAR)

DESCRIPTION
Subroutine CFFTF1 computes the forward complex discrete Fourier transform (the Fourier analysis). Equivalently, CFFTF1 computes the Fourier coefficients of a complex periodic sequence. The transform is defined below at output parameter C. The transform is not normalized. To obtain a normalized transform the output must be divided by N. Otherwise a call of CFFTF1 followed by a call of CFFTB1 will multiply the sequence by N. The arrays WA and IFAC which are used by subroutine CFFTB1 must be initialized by calling subroutine CFFTI1 (N, WA, IFAC). Input Parameters N the length of the complex sequence C. The method is more efficient when N is the product of small primes. C a complex array of length N which contains the sequence CH a real work array of length at least 2*N WA a real work array which must be dimensioned at least 2*N. IFAC an integer work array which must be dimensioned at least 15. The WA and IFAC arrays must be initialized by calling subroutine CFFTI1 (N, WA, IFAC), and different WA and IFAC arrays must be used for each different value of N. This initialization does not have to be repeated so long as N remains unchanged. Thus subsequent transforms can be obtained faster than the first. The same WA and IFAC arrays can be used by CFFTF1 and CFFTB1. Output Parameters C For J=1,...,N C(J)=the sum from K=1,...,N of C(K)*EXP(-I*(J-1)*(K-1)*2*PI/N) where I=SQRT(-1) NOTE: WA and IFAC contain initialization calculations which must not be destroyed between calls of subroutine CFFTF1 or CFFTB1

REFERENCES
P. N. Swarztrauber, Vectorizing the FFTs, in Parallel Computations (G. Rodrigue, ed.), Academic Press, 1982, pp. 51-83.

ROUTINES CALLED
PASSF, PASSF2, PASSF3, PASSF4, PASSF5

REVISION HISTORY (YYMMDD)
790601 DATE WRITTEN
830401 Modified to use SLATEC library source file format.
860115 Modified by Ron Boisvert to adhere to Fortran 77 by changing dummy array size declarations (1) to (*).
881128 Modified by Dick Valent to meet prologue standards.
891214 Prologue converted to Version 4.0 format. (BAB)
900131 Routine changed from subsidiary to user-callable. (WRB)
920501 Reformatted the REFERENCES section. (WRB)