 plan_fft, plan_ifft, plan_rfft, plan_irfft, plan_dct, plan_idct
 else
 import FFTW: fft, fft!, rfft, irfft, ifft, dct, idct, dct!, idct!,
 plan_fft!, plan_ifft!, plan_dct!, plan_idct!,
 plan_fft, plan_ifft, plan_rfft, plan_irfft, plan_dct, plan_idct
 import DSP: conv
 end

 # The following implements Bluestein's algorithm, following http://www.dsprelated.com/dspbooks/mdft/Bluestein_s_FFT_Algorithm.html
 # To add more types, add them in the union of the function's signature.
 function fft(x::Vector{T}) where T<:BigFloats
 n = length(x)
 ispow2(n) && return fft_pow2(x)
 ks = range(zero(real(T)),stop=none(real(T)),length=n)
 Wks = exp.((im).*convert(T,Ļ).*ks.^2 ./ n)
 xq, wq = x.*Wks, conj([exp(im*convert(T,Ļ)*n);reverse(Wks);Wks[2:end]])
 return Wks.*conv(xq,wq)[n+1:2n]
 end


 function fft!(x::Vector{T}) where T<:BigFloats