1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE COSQB1
(N
,INC
,X
,WSAVE
,WORK
,IER
)
12 DIMENSION X
(INC
,*) ,WSAVE
(*) ,WORK
(*)
17 XIM1
= X
(1,I
-1)+X
(1,I
)
18 X
(1,I
) = .5*(X
(1,I
-1)-X
(1,I
))
23 IF (MODN
.NE
. 0) GO TO 302
25 302 LENX
= INC*
(N
-1) + 1
26 LNSV
= N
+ INT
(LOG
(REAL(N
))/LOG
(2.)) + 4
29 CALL RFFT1B
(N
,INC
,X
,LENX
,WSAVE
(N
+1),LNSV
,WORK
,LNWK
,IER1
)
32 CALL XERFFT
('COSQB1',-5)
38 WORK
(K
) = WSAVE
(K
-1)*X
(1,KC
)+WSAVE
(KC
-1)*X
(1,K
)
39 WORK
(KC
) = WSAVE
(K
-1)*X
(1,K
)-WSAVE
(KC
-1)*X
(1,KC
)
41 IF (MODN
.NE
. 0) GO TO 305
42 X
(1,NS2
+1) = WSAVE
(NS2
)*(X
(1,NS2
+1)+X
(1,NS2
+1))
45 X
(1,K
) = WORK
(K
)+WORK
(KC
)
46 X
(1,KC
) = WORK
(K
)-WORK
(KC
)
48 X
(1,1) = X
(1,1)+X
(1,1)