/* ** Please only distribute this with it's associated FHT routine. ** This algorithm is apparently patented(!) and the code copyrighted. ** See the comment with the fht routine for more info. ** -Thanks, ** Ron Mayer */ #ifndef REAL #define REAL double #endif #ifdef GOOD_TRIG #else #define FAST_TRIG #endif #if defined(GOOD_TRIG) #define FHT_SWAP(a,b,t) {(t)=(a);(a)=(b);(b)=(t);} #define TRIG_VARS \ int t_lam=0; #define TRIG_INIT(k,c,s) \ { \ int i; \ for (i=2 ; i<=k ; i++) \ {coswrk[i]=costab[i];sinwrk[i]=sintab[i];} \ t_lam = 0; \ c = 1; \ s = 0; \ } #define TRIG_NEXT(k,c,s) \ { \ int i,j; \ (t_lam)++; \ for (i=0 ; !((1<1) \ { \ for (j=k-i+2 ; (1<