fast Fourier transform
, size_t const n
Header-only naive implementation of the fast Fourier transform algorithm.
Requires C99, specifically <complex.h>
Returns 0 on success, and -1 on error.
View example.c, which can be built with gcc(1)
using make example
() can fail with the following error:
- Given n was not a power of two. You can
pad with zeroes to avoid this error.
By default <fft.h>
includes the libraries it needs. To remove
's included libraries, #define FFT_NO_INCLUDES.
Unless FFT_NO_INCLUDES is defined,
. In which case you may need to link with -lm
() is declared with
. To have
() be declared
, #define FFT_PRIVATE.
The FFTW library provides an optimal implementation of the fast Fourier