(ar(0),ar(0)), ... , (ar(N/2), ai(N/2))These output values are stored as follows.
ar(0) <-> x[0] ar(1) <-> x[1] ... ... ar(N/2-1) <-> x[N/2-1] ar(N/2) <-> x[N/2] ai(1) <-> x[N/2+1] ai(2) <-> x[N/2+2] ... ... ai(N/2-1) <-> x[N-1]Note that ar(N/2) is stored in the place that would normally be reserved for ai(0). This is possible since ai(0) (and ai(N/2)) are known a priori to be zero.
If Ifn is less than zero, this routine computes a inverse discrete Fourier transform that results in N real data values. Let the N/2+1 complex input values be (ar(0),ai(0)), ... , (ar(N/2),ai(N/2)). If these values are to result in a real sequence after the inverse discrete Fourier transform, ai(0) and ai(N/2) must both be zero. The remaining N data values (N/2+1 real components and N/2-1 imaginary components) are stored in the array x as follows.
ar(0) <-> x[0] ar(1) <-> x[1] ... ... ar(N/2-1) <-> x[N/2-1] ar(N/2) <-> x[N/2] ai(1) <-> x[N/2+1] ai(2) <-> x[N/2+2] ... ... ai(N/2-1) <-> x[N-1]Note that ar(N/2) is stored in the place that would normally be reserved for ai(0). The output of the inverse transform contains the N dreal data points stored sequentially in array x.