Real-input FFT is usually expressed rfft
and inverse is irfft
in many programming languages (like python
or julia
). As numpy docs or julia docs said, they are doing normalized FFT not like FFTW
's unnormalization FFT
Hence, if I have real input 1D array a
, I understood irfft(rfft(a), len(a)) == a
. However, if I assume another 1D array b
but complex, rfft(irfft(b), (len(b) - 1) * 2) != b
, even I considered normalization. I think rfft(irfft(b), (len(b) - 1) * 2)
should be same as b
like a
.
I tested this using FFTW by Fortran and Julia's FFTW library but got a same results.
Why this happens? Is this mathematically right or implementation issue?
EDIT 1: more exact explanation is here