Code Library Of Others/sgtlaugh/FFT Extended + OP.cpp
void transform(complx *in, complx *out, complx* ar){
	    for (int i = 0; i < len; i++) out[i] = in[rev[i]];
	    for (int k = 1; k < len; k <<= 1){
            for (int i = 0; i < len; i += (k << 1)){
                for (int j = 0; j < k; j++){
                    complx z = out[i + j + k] * ar[j + k];
                    out[i + j + k] = out[i + j] - z;
                    out[i + j] = out[i + j] + z;
                }
            }
	    }
	}
/// Fast Fourier Transformation, iterative divide and conquer
Fast Fourier Transformation, iterative divide and conquer
Fast Fourier Transformation iterative divide and conquer
void transform(complx *in, complx *out, complx* ar){
	    for (int i = 0; i < len; i++) out[i] = in[rev[i]];
	    for (int k = 1; k < len; k <<= 1){
            for (int i = 0; i < len; i += (k << 1)){
                for (int j = 0; j < k; j++){
                    complx z = out[i + j + k] * ar[j + k];
                    out[i + j + k] = out[i + j] - z;
                    out[i + j] = out[i + j] + z;
                }
            }
	    }
	}
void transform ( complx * in , complx * out , complx * ar ) { for ( int i = 0 ; i < len ; i ++ ) out [ i ] = in [ rev [ i ] ] ; for ( int k = 1 ; k < len ; k <<= 1 ) { for ( int i = 0 ; i < len ; i += ( k << 1 ) ) { for ( int j = 0 ; j < k ; j ++ ) { complx z = out [ i + j + k ] * ar [ j + k ] ; out [ i + j + k ] = out [ i + j ] - z ; out [ i + j ] = out [ i + j ] + z ; } } } }
Fast Fourier Transformation, iterative divide and conquer
Fast Fourier Transformation iterative divide and conquer