dfftz - initialize the trigonometric weight and factor tables or compute the forward Fast Fourier Transform of a double precision sequence. =head1 SYNOPSIS
SUBROUTINE DFFTZ( IOPT, N, SCALE, X, Y, TRIGS, IFAC, WORK, LWORK, * IERR) DOUBLE COMPLEX Y(*) INTEGER IOPT, N, LWORK, IERR INTEGER IFAC(*) DOUBLE PRECISION SCALE DOUBLE PRECISION X(*), TRIGS(*), WORK(*)
SUBROUTINE DFFTZ_64( IOPT, N, SCALE, X, Y, TRIGS, IFAC, WORK, LWORK, * IERR) DOUBLE COMPLEX Y(*) INTEGER*8 IOPT, N, LWORK, IERR INTEGER*8 IFAC(*) DOUBLE PRECISION SCALE DOUBLE PRECISION X(*), TRIGS(*), WORK(*)
SUBROUTINE FFT( IOPT, [N], [SCALE], X, Y, TRIGS, IFAC, WORK, [LWORK], * IERR) COMPLEX(8), DIMENSION(:) :: Y INTEGER :: IOPT, N, LWORK, IERR INTEGER, DIMENSION(:) :: IFAC REAL(8) :: SCALE REAL(8), DIMENSION(:) :: X, TRIGS, WORK
SUBROUTINE FFT_64( IOPT, [N], [SCALE], X, Y, TRIGS, IFAC, WORK, * [LWORK], IERR) COMPLEX(8), DIMENSION(:) :: Y INTEGER(8) :: IOPT, N, LWORK, IERR INTEGER(8), DIMENSION(:) :: IFAC REAL(8) :: SCALE REAL(8), DIMENSION(:) :: X, TRIGS, WORK
#include <sunperf.h>
void dfftz(int iopt, int n, double scale, double *x, doublecomplex *y, double *trigs, int *ifac, double *work, int lwork, int *ierr);
void dfftz_64(long iopt, long n, double scale, double *x, doublecomplex *y, double *trigs, long *ifac, double *work, long lwork, long *ierr);
dfftz initializes the trigonometric weight and factor tables or computes the forward Fast Fourier Transform of a double precision 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 forward transform
W = exp(isign*i*j*k*2*pi/N)
In real-to-complex transform of length N, the (N/2+1) complex output data points stored are the positive-frequency half of the spectrum of the Discrete Fourier Transform. The other half can be obtained through complex conjugation and therefore is not stored.
IOPT = 0 computes the trigonometric weight table and factor table
IOPT = -1 computes forward FFT
0 = normal return
-1 = IOPT is not 0 or -1
-2 = N < 0
-3 = (LWORK is not 0) and (LWORK is less than N)
-4 = memory allocation for workspace failed
fft