cfftc - initialize the trigonometric weight and factor tables or compute the Fast Fourier transform (forward or inverse) of a complex sequence. =head1 SYNOPSIS
SUBROUTINE CFFTC( IOPT, N, SCALE, X, Y, TRIGS, IFAC, WORK, LWORK, * IERR) COMPLEX X(*), Y(*) INTEGER IOPT, N, LWORK, IERR INTEGER IFAC(*) REAL SCALE REAL TRIGS(*), WORK(*)
SUBROUTINE CFFTC_64( IOPT, N, SCALE, X, Y, TRIGS, IFAC, WORK, LWORK, * IERR) COMPLEX X(*), Y(*) INTEGER*8 IOPT, N, LWORK, IERR INTEGER*8 IFAC(*) REAL SCALE REAL TRIGS(*), WORK(*)
SUBROUTINE FFT( IOPT, [N], [SCALE], X, Y, TRIGS, IFAC, WORK, [LWORK], * IERR) COMPLEX, DIMENSION(:) :: X, Y INTEGER :: IOPT, N, LWORK, IERR INTEGER, DIMENSION(:) :: IFAC REAL :: SCALE REAL, DIMENSION(:) :: TRIGS, WORK
SUBROUTINE FFT_64( IOPT, [N], [SCALE], X, Y, TRIGS, IFAC, WORK, * [LWORK], IERR) COMPLEX, DIMENSION(:) :: X, Y INTEGER(8) :: IOPT, N, LWORK, IERR INTEGER(8), DIMENSION(:) :: IFAC REAL :: SCALE REAL, DIMENSION(:) :: TRIGS, WORK
#include <sunperf.h>
void cfftc(int iopt, int n, float scale, complex *x, complex *y, float *trigs, int *ifac, float *work, int lwork, int *ierr);
void cfftc_64(long iopt, long n, float scale, complex *x, complex *y, float *trigs, long *ifac, float *work, long lwork, long *ierr);
cfftc initializes the trigonometric weight and factor tables or computes the Fast Fourier transform (forward or inverse) of a complex sequence as follows: .Ve
N-1
Y(k)
= scale * SUM W*X(j)
j=0 .Ve
where
k ranges from 0 to N-1
i = sqrt(-1)
isign = 1 for inverse transform or -1 for forward transform
W = exp(isign*i*j*k*2*pi/N)
IOPT = 0 computes the trigonometric weight table and factor table
IOPT = -1 computes forward FFT
IOPT = +1 computes inverse FFT
0 = normal return
-1 = IOPT is not 0, 1 or -1
-2 = N < 0
-3 = (LWORK is not 0) and (LWORK is less than 2*N)
-4 = memory allocation for workspace failed
fft