Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seems wrong in complexDivision in ffttools.hpp #10

Open
strgrb opened this issue Jun 28, 2017 · 1 comment
Open

seems wrong in complexDivision in ffttools.hpp #10

strgrb opened this issue Jun 28, 2017 · 1 comment

Comments

@strgrb
Copy link

strgrb commented Jun 28, 2017

to do a complex division, say
(a+bi)/(c+di) = (a+bi)(c-di)/(cc+dd)
= [(ac+bd)+(bc-ad)i]/(cc+dd)
so in the code

    pres.push_back((pa[0].mul(pb[0]) + pa[1].mul(pb[1])).mul(divisor));
    pres.push_back((pa[1].mul(pb[0]) + pa[0].mul(pb[1])).mul(divisor));

second '+' should be '-'

But why does the code still work?

@Idontunderstand-kjl
Copy link

i meet this problem too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants