diff --git a/src/maths/cmaths/cmath4.c b/src/maths/cmaths/cmath4.c index 11d7bf8f7..fa2b7cb6f 100644 --- a/src/maths/cmaths/cmath4.c +++ b/src/maths/cmaths/cmath4.c @@ -713,9 +713,7 @@ cx_fft(void *data, short int type, int length, int *newlength, short int *newtyp outdata = alloc_c(fpts); scale = (double) fpts; - outdata[0].cx_real = out[0][0]/scale/2.0; - outdata[0].cx_imag = out[0][1]/scale/2.0; - for (i = 1; i < fpts; i++) { + for (i = 0; i < fpts; i++) { outdata[i].cx_real = out[i][0]/scale; outdata[i].cx_imag = out[i][1]/scale; } @@ -746,9 +744,7 @@ cx_fft(void *data, short int type, int length, int *newlength, short int *newtyp outdata = alloc_c(N); scale = (double) N; - outdata[0].cx_real = datax[0]/scale/2.0; - outdata[0].cx_imag = datax[1]/scale/2.0; - for (i = 1; i < N; i++) { + for (i = 0; i < N; i++) { outdata[i].cx_real = datax[2*i]/scale; outdata[i].cx_imag = datax[2*i+1]/scale; }