c implementation of FFT algorithm