Menu

please confirm buggy behaviour of ifft_real

2007-05-16
2012-09-15
  • Klaas Hofstra

    Klaas Hofstra - 2007-05-16

    The following code exhibits buggy behavior:
    int N = 256;

    cvec f;
    vec t;
    
    fft_real(randn(N), f);
    
    cvec tmp = f;
    
    ifft_real(f, t);
    
    cvec d = tmp - f;
    cout << d << endl;
    

    For N < 256 the vector 'd' is the zero vector as expected. However, for N >= 256 the first half of the vector 'd' is non-zero.
    I'm linking with FFTW 3.

    I've tested this on two different machines. Could you please confirm the behaviour of this code so I can make a bug report?

    Cheers,

    Klaas Hofstra

     
    • Adam Piątyszek

      Adam Piątyszek - 2007-05-16

      Hi Klaas,

      I will try to look into this problem in a few days, but can't promise because my laptop was stolen this morning. So I need some time to set up my working environment...

      BR,
      /ediap

       
    • Adam Piątyszek

      Adam Piątyszek - 2007-05-21

      OK. I have tested this on my installation with FFTW3 and it seems to be a bug. The content of `f' should not be modified when using ifft(const vec &f, vec &t). Please submit a bug report so we won't forget about this issue.

      Thanks in advance!
      /ediap

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.