# input arrays are @f and @g, this calculates @cc which is the cross-correlation of these. @Ff = fft(@f); @Fg = fft(@g); @Fcc = complex_conjugate(@Ff) * @Fg; @cc = inverse_fft(@Fcc);