/**************************************************************************** * ditr2fft.c - Floating-point complex radix-2 decimation-in-time FFT * Perform in place FFT, the output overwrite the input array * ****************************************************************************/ #include "def_complex.h" /* floating-point complex.h header file */ void ditr2fft(complex *X, unsigned int EXP, complex *W, unsigned int SCALE) { complex temp; /* temporary storage of complex variable */ complex U; /* Twiddle factor W^k */ unsigned int i,j; unsigned int id; /* Index for lower point in butterfly */ unsigned int N=1<>1; /* Number of butterflies in sub-DFT */ U.re = 1.0; U.im = 0.; for (j=0; j