2
SUBROUTINE COSQB1 (N, X, W, XH)
3
C***BEGIN PROLOGUE COSQB1
5
C***PURPOSE Compute the unnormalized inverse of COSQF1.
6
C***LIBRARY SLATEC (FFTPACK)
8
C***TYPE SINGLE PRECISION (COSQB1-S)
9
C***KEYWORDS FFTPACK, FOURIER TRANSFORM
10
C***AUTHOR Swarztrauber, P. N., (NCAR)
13
C Subroutine COSQB1 computes the fast Fourier transform of quarter
14
C wave data. That is, COSQB1 computes a sequence from its
15
C representation in terms of a cosine series with odd wave numbers.
16
C The transform is defined below at output parameter X.
18
C***REFERENCES P. N. Swarztrauber, Vectorizing the FFTs, in Parallel
19
C Computations (G. Rodrigue, ed.), Academic Press,
21
C***ROUTINES CALLED RFFTB
22
C***REVISION HISTORY (YYMMDD)
24
C 830401 Modified to use SLATEC library source file format.
25
C 860115 Modified by Ron Boisvert to adhere to Fortran 77 by
26
C changing dummy array size declarations (1) to (*).
27
C 881128 Modified by Dick Valent to meet prologue standards.
28
C 891214 Prologue converted to Version 4.0 format. (BAB)
29
C 920501 Reformatted the REFERENCES section. (WRB)
30
C***END PROLOGUE COSQB1
31
DIMENSION X(*), W(*), XH(*)
32
C***FIRST EXECUTABLE STATEMENT COSQB1
42
IF (MODN .EQ. 0) X(N) = X(N)+X(N)
46
XH(K) = W(K-1)*X(KC)+W(KC-1)*X(K)
47
XH(KC) = W(K-1)*X(K)-W(KC-1)*X(KC)
49
IF (MODN .EQ. 0) X(NS2+1) = W(NS2)*(X(NS2+1)+X(NS2+1))