naginterfaces.library.sum.fft_real_sine_simple(m, n, x)[source]

fft_real_sine_simple computes the discrete Fourier sine transforms of sequences of real data values.

For full information please refer to the NAG Library document for c06ra


, the number of sequences to be transformed.


One more than the number of real values in each sequence, i.e., the number of values in each sequence is .

xfloat, array-like, shape

The data must be stored in as if in a two-dimensional array of dimension ; each of the sequences is stored in a row of the array. In other words, if the data values of the th sequence to be transformed are denoted by , for , for , the first elements of the array must contain the values

The th to th elements of each row , for , are required as workspace. These elements may contain arbitrary values as they are set to zero by the function.

xfloat, ndarray, shape

The Fourier sine transforms stored as if in a two-dimensional array of dimension . Each of the transforms is stored in a row of the array, overwriting the corresponding original sequence. If the components of the th Fourier sine transform are denoted by , for , for , the elements of the array contain the values

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.


No equivalent traditional C interface for this routine exists in the NAG Library.

Given sequences of real data values , for , for , fft_real_sine_simple simultaneously calculates the Fourier sine transforms of all the sequences defined by

(Note the scale factor in this definition.)

Since the Fourier sine transform defined above is its own inverse, two consecutive calls of this function will restore the original data.

The transform calculated by this function can be used to solve Poisson’s equation when the solution is specified at both left and right boundaries (see Swarztrauber (1977)).

The function uses a variant of the fast Fourier transform (FFT) algorithm (see Brigham (1974)) known as the Stockham self-sorting algorithm, described in Temperton (1983), together with pre - and post-processing stages described in Swarztrauber (1982). Special coding is provided for the factors , , and .


Brigham, E O, 1974, The Fast Fourier Transform, Prentice–Hall

Swarztrauber, P N, 1977, The methods of cyclic reduction, Fourier analysis and the FACR algorithm for the discrete solution of Poisson’s equation on a rectangle, SIAM Rev. (19(3)), 490–501

Swarztrauber, P N, 1982, Vectorizing the FFT’s, Parallel Computation, (ed G Rodrique), 51–83, Academic Press

Temperton, C, 1983, Fast mixed-radix real Fourier transforms, J. Comput. Phys. (52), 340–350