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

Negative exponent #2

Open
gopa810 opened this issue Nov 9, 2018 · 0 comments
Open

Negative exponent #2

gopa810 opened this issue Nov 9, 2018 · 0 comments

Comments

@gopa810
Copy link

gopa810 commented Nov 9, 2018

I was comparing results of this with publicly available library for FFT algorithms (libfftw.so) and to have identical results, I had to adjust exponent on the line 19 in fft.go:

cmplx.Exp(complex(0, -2*float64(i)*math.Pi/float64(len(data))))

Exponent should be negative, so I added negative sign before 2.

Otherwise this algorithm is 5 times slower that FFT from library, and 3 times slower when memory allocations are optimized for consecutive input vectors with the same size.

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

1 participant