CRFFT2,ZDFFT2(3) MathKeisan FFT routine CRFFT2,ZDFFT2(3)
NAME
crfft2, zdfft2 - one-dimensional complex-to-real FFT
SYNOPSIS
libfft.a
INTEGER init, ix, n
COMPLEX x(n/2 + 1)
REAL work(2*n + 64), y(n+2)
CALL CRFFT2 ( init, ix, n, x, work, y )
INTEGER init, ix, n
COMPLEX(kind=8) x(n/2 + 1)
REAL(kind=8) work(2*n + 64), y(n+2)
CALL ZDFFT2 ( init, ix, n, x, work, y )
libfft_64.a
INTEGER(kind=8) init, ix, n
COMPLEX(kind=8) x(n/2 + 1)
REAL(kind=8) work(2*n + 64), y(n+2)
CALL CRFFT2 ( init, ix, n, x, work, y )
INTEGER(kind=8) init, ix, n
COMPLEX(kind=8) x(n/2 + 1)
REAL(kind=8) work(2*n + 64), y(n+2)
CALL ZDFFT2 ( init, ix, n, x, work, y )
DESCRIPTION
This subroutine computes the one-dimensional discrete Fourier transform
of the given complex array x; the transformed data is stored in the
real array y. If we take x and y to be dimensioned as x(0:n/2) and
y(0:n-1), the transform is expressed by the following formula:
n-1
y(k) = Sum x(j) * exp((+/-)j*k*2*pi*i/n)
j=0
for k = 0, ..., n-1, where i = sqrt(-1).
(The additional values of x can be determined by conjugate symmetry.)
In order to accomodate multiple calls of the same size to this routine,
an additional initialization step is required prior to the computation
of any transforms. Hence, whenever it is desired to use [(CR)(ZD)]FFT2
in a program, it must be called at least twice.
A result of Fourier theory is that a transform of real data is conju-
gate symmetric; hence, only the first n/2 + 1 complex data points are
to be input to this routine.
Note that this routine currently provides only serial functionality.
ARGUMENTS
Input
init Option flag:
If init != 0, the routine is initialized for the given value of
n.
ix Determines the sign of the exponential in the transform. The
sign of the exponential in the transform is the same as the sign
of ix.
Not used if init != 0.
NOTE: This routine requires that ix != 0 if init = 0.
n Number of data points (n>0).
NOTE: This routine requires that n be even.
x Array of data to be transformed.
Not used if init != 0.
Working Storage
work Workspace for computing the transform.
Not used if init != 0.
Output
y Transformed data.
Not used if init != 0.
SciLib routine CRFFT2,ZDFFT2(3)