/*--------------------------------------------------------------------------------
高速フーリエ変換と逆高速フーリエ変換
Fast Fourier transform and inverse Fast Fourier transform
FFT.h
*--------------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <malloc.h>
#define SAMPLING_FREQ 1 // サンプリング周波数, sampling frequency
typedef struct
{
double real; // 実部, real part
double imag; // 虚部, imaginary part
} complex;
extern complex *readdata( int *num );
extern void FFT( int num, complex *x, complex *F );
extern void inv_FFT( int num, complex *x, complex *F );
extern int bitr( int bit, int r );
extern void swap( complex *a, complex *b );