I know that, due to the convolution theorem, two densities $f$ and $g$ can be convolved by (i) applying the FFT to both of them, (ii) multiplying the results, (iii) applying an inverse FFT.
Since I need to convolve some functions I thought it best to look up some example code to see the details of how to implement this so I can do something similar. In particular, since kernel density estimation involves convolution I expected this FFT convolution procedure is probably used in the R density()
function.
However, upon looking at the source code for this, instead of
$$ f*g = \mathcal{F}^{-1}(\mathcal{F}[f]\cdot \mathcal{F}[g]), $$ the following is used (line 159) $$ f*g = \mathcal{F}^{-1}(\mathcal{F}[f]\cdot \mathcal{F}[\overline{g}]), $$ where $g$ is the kernel function.
I don't understand why the complex conjugate is being taken here since the complex conjugate doesn't appear in the convolution theorem? If I want to convolve two functions using the FFT do I need to take the complex conjugate or not?