normalize fft produced by fftw_plan_dft_r2c_1d fftw_plan_dft_r2c_1d takes an array for real numbers and produces an array of complex numbers 1/2 the size of input array + 1.

per fftw's website:


  As a result of this symmetry, half of the output Y is redundant (being the complex conjugate of the other half), and so the 1d r2c transforms only output elements 0...n/2 of Y (n/2+1 complex numbers), where the division by 2 is rounded down.


When I normalize do I normalize by the size of the fft or the resulting fft_size / 2

    // normalize the fft
    for (unsigned int x = 0; x &lt;(fftSize/2); x++)
        array[x] = array[x] / complex&lt;double&gt;((fftSize/2), 0);   &lt;&lt;&lt;&lt;&lt;


or

    // normalize the fft
    for (unsigned int x = 0; x &lt;(fftSize/2); x++)
        array[x] = array[x] / complex&lt;double&gt;(fftSize, 0);       &lt;&lt;&lt;&lt;&lt;
Reading the manual, even though only half the data is returned, the full length FFT is calculated:



So you should normalize by whatever the full length is normalized to: fft_size.