1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE COSQ1F
(N
, INC
, X
, LENX
, WSAVE
, LENSAV
,
13 INTEGER N
, INC
, LENX
, LENSAV
, LENWRK
, IER
14 REAL X
(INC
,*), WSAVE
(LENSAV
), WORK
(LENWRK
)
18 IF (LENX
.LT
. INC*
(N
-1) + 1) THEN
20 CALL XERFFT
('COSQ1F', 6)
22 ELSEIF
(LENSAV
.LT
. 2*N
+ INT
(LOG
(REAL(N
))/LOG
(2.)) +4) THEN
24 CALL XERFFT
('COSQ1F', 8)
26 ELSEIF
(LENWRK
.LT
. N
) THEN
28 CALL XERFFT
('COSQ1F', 10)
33 101 SSQRT2
= 1./SQRT
(2.)
35 X
(1,2) = .5*X
(1,1)-TSQX
36 X
(1,1) = .5*X
(1,1)+TSQX
38 103 CALL COSQF1
(N
,INC
,X
,WSAVE
,WORK
,IER1
)
41 CALL XERFFT
('COSQ1F',-5)