Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Header-only naive implementation of the fast Fourier transform algorithm.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
NAME fft - fast Fourier transform SYNOPSIS #include "fft.h" int fft(double complex *const buf, size_t const n); DESCRIPTION Header-only naive implementation of the fast Fourier transform algorithm. Requires C99, specifically complex.h. RETURN VALUES Returns 0 on success, and -1 on error. EXAMPLES View example.c, which can be built with GCC using `make example`. ERRORS fft() can fail with the following error: EINVAL Given n was not a power of two. You can pad with zeroes to avoid this error. NOTES By default, fft.h includes the libraries it needs. To remove fft.h's included libraries, #define FFT_NO_INCLUDES. Unless FFT_NO_INCLUDES is defined, fft() uses math.h. In which case you may need to link with -lm. By default, fft() is declared `extern`. To have fft() be declared `static`, #define FFT_PRIVATE. SEE ALSO The FFTW library provides an optimal implementation of the fast Fourier transform algorithm.