1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE MCSTB1
(LOT
,JUMP
,N
,INC
,X
,WSAVE
,DSUM
,WORK
,IER
)
12 REAL X
(INC
,*) ,WSAVE
(*)
13 DOUBLE PRECISION DSUM
(*)
20 101 DO 111 M
=1,LJ
,JUMP
22 X
(M
,2) = X
(M
,1)-X
(M
,2)
26 102 IF (N
.GT
. 3) GO TO 103
30 X
(M
,2) = X
(M
,1)-X
(M
,3)
35 103 DO 118 M
=1,LJ
,JUMP
36 X
(M
,1) = X
(M
,1)+X
(M
,1)
37 X
(M
,N
) = X
(M
,N
)+X
(M
,N
)
42 DSUM
(M1
) = X
(M
,1)-X
(M
,N
)
43 X
(M
,1) = X
(M
,1)+X
(M
,N
)
52 DSUM
(M1
) = DSUM
(M1
)+WSAVE
(KC
)*T2
59 IF (MODN
.EQ
. 0) GO TO 124
61 X
(M
,NS2
+1) = X
(M
,NS2
+1)+X
(M
,NS2
+1)
64 LENX
= (LOT
-1)*JUMP
+ INC*
(NM1
-1) + 1
65 LNSV
= NM1
+ INT
(LOG
(REAL(NM1
))/LOG
(2.)) + 4
68 CALL RFFTMF
(LOT
,JUMP
,NM1
,INC
,X
,LENX
,WSAVE
(N
+1),LNSV
,WORK
,
72 CALL XERFFT
('MCSTB1',-5)
76 FNM1S2
= FLOAT
(NM1
)/2.
80 DSUM
(M1
) = .5*DSUM
(M1
)
81 X
(M
,1) = FNM1S2*X
(M
,1)
83 IF(MOD
(NM1
,2) .NE
. 0) GO TO 30
85 X
(M
,NM1
) = X
(M
,NM1
)+X
(M
,NM1
)
87 30 FNM1S4
= FLOAT
(NM1
)/4.
93 X
(M
,I
) = FNM1S4*X
(M
,I
-1)
95 DSUM
(M1
) = DSUM
(M1
)+XI
98 IF (MODN
.NE
. 0) RETURN