Algorithm 338: algol procedures for the fast Fourier transform

The following procedures are based on the Cooley-Tukey algorithm [1] for computing the finite Fourier transform of a complex data vector; the dimension of the data vector is assumed here to be a power of two. Procedure <italic>COMPLEXTRANSFORM</italic> computes either the complex Fourier transform or its inverse. Procedure <italic>REALTRANSFORM</italic> computes either the Fourier coefficients of a sequence of real data points or evaluates a Fourier series with given cosine and sine coefficients. The number of arithmetic operations for either procedure is proportional to <italic>n</italic> log<subscrpt>2</subscrpt> <italic>n</italic>, where <italic>n</italic> is the number of data points.