diff --git a/fft.hh b/fft.hh index b618738..6c65499 100644 --- a/fft.hh +++ b/fft.hh @@ -1122,8 +1122,10 @@ public: typedef typename TYPE::value_type value_type; FastFourierTransform() { - for (int n = 0; n < BINS; ++n) - factors[n] = exp(TYPE(0, value_type(SIGN * FFT::twopi(n, BINS)))); + for (int n = 0; n < BINS; ++n) { + value_type a = SIGN * FFT::twopi(n, BINS); + factors[n] = TYPE(std::cos(a), std::sin(a)); + } } inline void operator ()(TYPE *out, const TYPE *in) {