#include<math.h>
#include<stdio.h>
#define PI 3.1415926535897932384626433832795028841971
#include<stdlib.h>
#define FFT_N 16
struct compx {float real,imag;};
struct compx s[FFT_N];
struct compx EE(struct compx a,struct compx b)
{
struct compx c;
c.real=a.real*b.real-a.imag*b.imag;
c.imag=a.real*b.imag+a.imag*b.real;
return(c);
}
void FFT(struct compx *xin)
{
int f,m,nv2,nm1,i,k,l,j=0;
struct compx u,w,t;
nv2=FFT_N/2;
nm1=FFT_N-1;
for(i=0;i<nm1;i++)
{
if(i<j)
{
t=xin[j];
xin[j]=xin[i];
xin[i]=t;
}
k=nv2;
while(k<=j)
{
j=j-k;
k=k/2;
}
j=j+k;
}
{
int le,lei,ip;
f=FFT_N;
for(l=1;(f=f/2)!=1;l++)