fourier division in c++