1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE COSQF1
(N
,INC
,X
,WSAVE
,WORK
,IER
)
12 DIMENSION X
(INC
,*) ,WSAVE
(*) ,WORK
(*)
18 WORK
(K
) = X
(1,K
)+X
(1,KC
)
19 WORK
(KC
) = X
(1,K
)-X
(1,KC
)
22 IF (MODN
.NE
. 0) GO TO 301
23 WORK
(NS2
+1) = X
(1,NS2
+1)+X
(1,NS2
+1)
26 X
(1,K
) = WSAVE
(K
-1)*WORK
(KC
)+WSAVE
(KC
-1)*WORK
(K
)
27 X
(1,KC
) = WSAVE
(K
-1)*WORK
(K
) -WSAVE
(KC
-1)*WORK
(KC
)
29 IF (MODN
.NE
. 0) GO TO 303
30 X
(1,NS2
+1) = WSAVE
(NS2
)*WORK
(NS2
+1)
31 303 LENX
= INC*
(N
-1) + 1
32 LNSV
= N
+ INT
(LOG
(REAL(N
))/LOG
(2.)) + 4
35 CALL RFFT1F
(N
,INC
,X
,LENX
,WSAVE
(N
+1),LNSV
,WORK
,LNWK
,IER1
)
38 CALL XERFFT
('COSQF1',-5)
43 XIM1
= .5*(X
(1,I
-1)+X
(1,I
))
44 X
(1,I
) = .5*(X
(1,I
-1)-X
(1,I
))