FFT842(3)
NAME
fft842, newfft842, trig_init: Functions to perform a fast
Fourier transform on a one-dimensional array of data.
Syntax
#include <soi_util.h>
int fft842 (in, n, x, y)
int in, n;
float *x, *y;
void newfft842 (in, n, Wr, Wi, x, y)
int in, n;
double *Wr, *Wi;
float *x, *y;
int trig_init (int n, double *Wr, double *Wi)
int n;
double *Wr, double *Wi;
DESCRIPTION
fft842() replaces the vector z = x + iy by its finite
discrete, complex Fourier transform if in = 0. The inverse
transform is calculated for in = 1. It performs as many
base-8 iterations as possible and then finishes with a
base-4 iteration or a base-2 iteration, if needed.
The integer n should be a power of 2, and x and y pointers
to arrays of n floats each. If n is non-positive, no
transform is performed and the function returns -1. If n is
not a power of 2, only the values of x and y up to the larg-
est power of 2 smaller than n are transformed and the func-
tion returns 1. Otherwise, the function returns 0. The
function arguments x and y must point to float arrays of
length n representing the real and imaginary parts respec-
tively of the original data on input and transformed data on
return.
The function newfft842() behaves similarly, but must be
called with the precomputed array of complex trigonometric
"twiddle factors" Wr + i * Wi. This array, of length 7n/8 -
6, is computed with a call to trig_init.
BUGS
The duplicate functions fft842 and newfft842 should be
merged; the time saving in precomputing the trigonometric
factors is seldom worth the effort.
It is dangerous to call the functions with arrays of length
other than a power of 2.
SEE ALSO
fft2d(3), rowfft(3)
AUTHORS
Lyle Bacon, Rick Bogart
HISTORY
1994-11-10 SOI Version 0.9