Hi ROOT developers,
I am using version 5.28, but this inconsistency between documentation and code is present on the trunk version as well.
The documentation for sine and cosine transforms in the file root.cern.ch/root/html/src/TVirtualFFT.cxx.html, states
line 46 ===> // DCT-II (REDFT10 in FFTW3 notation)- kind=1
line 47 ===> // DCT-III(REDFT01 in FFTW3 notation)- kind=2
line 50 ===> // DST-II (RODFT10 in FFTW3 notation)- kind=5
line 51 ===> // DST-III(RODFT01 in FFTW3 notation)- kind=6
since sine and cosine transforms are done by TFFTReal class, I had a look on the file root.cern.ch/root/html/src/TFFTReal.cxx.html, as I can see on lines
line 370 ===> case 1: ((fftw_r2r_kind*)fKind)[i] = FFTW_REDFT01; break;
line 371 ===> case 2: ((fftw_r2r_kind*)fKind)[i] = FFTW_REDFT10; break;
line 374 ===> case 5: ((fftw_r2r_kind*)fKind)[i] = FFTW_RODFT01; break;
line 375 ===> case 6: ((fftw_r2r_kind*)fKind)[i] = FFTW_RODFT10; break;
case 1, 2 and 5, 6, are inverted. In line 370 for example FFTW_REDFT01 should read FFTW_REDFT10 according to the documentation. So changing 01 to 10 and vise-versa should solve the problem.
Best regards, Marcelo