Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / c1f5kf.f
blob0de2cf3cbb0256dbf6f4282f9bce4973c4ad39f3
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE C1F5KF (IDO,L1,NA,CC,IN1,CH,IN2,WA)
12 REAL CC(IN1,L1,IDO,5),CH(IN2,L1,5,IDO),WA(IDO,4,2)
13 DATA TR11,TI11,TR12,TI12 /.3090169943749474,-.9510565162951536,
14 1-.8090169943749474,-.5877852522924731/
16 C FFTPACK 5.0 auxiliary routine
18 IF (IDO .GT. 1) GO TO 102
19 SN = 1./REAL(5*L1)
20 IF (NA .EQ. 1) GO TO 106
21 DO 101 K=1,L1
22 C rav DO 101 M1=1,M1D,IM1
23 TI5 = CC(2,K,1,2)-CC(2,K,1,5)
24 TI2 = CC(2,K,1,2)+CC(2,K,1,5)
25 TI4 = CC(2,K,1,3)-CC(2,K,1,4)
26 TI3 = CC(2,K,1,3)+CC(2,K,1,4)
27 TR5 = CC(1,K,1,2)-CC(1,K,1,5)
28 TR2 = CC(1,K,1,2)+CC(1,K,1,5)
29 TR4 = CC(1,K,1,3)-CC(1,K,1,4)
30 TR3 = CC(1,K,1,3)+CC(1,K,1,4)
31 CHOLD1 = SN*(CC(1,K,1,1)+TR2+TR3)
32 CHOLD2 = SN*(CC(2,K,1,1)+TI2+TI3)
33 CR2 = CC(1,K,1,1)+TR11*TR2+TR12*TR3
34 CI2 = CC(2,K,1,1)+TR11*TI2+TR12*TI3
35 CR3 = CC(1,K,1,1)+TR12*TR2+TR11*TR3
36 CI3 = CC(2,K,1,1)+TR12*TI2+TR11*TI3
37 CC(1,K,1,1) = CHOLD1
38 CC(2,K,1,1) = CHOLD2
39 CR5 = TI11*TR5+TI12*TR4
40 CI5 = TI11*TI5+TI12*TI4
41 CR4 = TI12*TR5-TI11*TR4
42 CI4 = TI12*TI5-TI11*TI4
43 CC(1,K,1,2) = SN*(CR2-CI5)
44 CC(1,K,1,5) = SN*(CR2+CI5)
45 CC(2,K,1,2) = SN*(CI2+CR5)
46 CC(2,K,1,3) = SN*(CI3+CR4)
47 CC(1,K,1,3) = SN*(CR3-CI4)
48 CC(1,K,1,4) = SN*(CR3+CI4)
49 CC(2,K,1,4) = SN*(CI3-CR4)
50 CC(2,K,1,5) = SN*(CI2-CR5)
51 101 CONTINUE
52 RETURN
53 106 DO 107 K=1,L1
54 TI5 = CC(2,K,1,2)-CC(2,K,1,5)
55 TI2 = CC(2,K,1,2)+CC(2,K,1,5)
56 TI4 = CC(2,K,1,3)-CC(2,K,1,4)
57 TI3 = CC(2,K,1,3)+CC(2,K,1,4)
58 TR5 = CC(1,K,1,2)-CC(1,K,1,5)
59 TR2 = CC(1,K,1,2)+CC(1,K,1,5)
60 TR4 = CC(1,K,1,3)-CC(1,K,1,4)
61 TR3 = CC(1,K,1,3)+CC(1,K,1,4)
62 CH(1,K,1,1) = SN*(CC(1,K,1,1)+TR2+TR3)
63 CH(2,K,1,1) = SN*(CC(2,K,1,1)+TI2+TI3)
64 CR2 = CC(1,K,1,1)+TR11*TR2+TR12*TR3
65 CI2 = CC(2,K,1,1)+TR11*TI2+TR12*TI3
66 CR3 = CC(1,K,1,1)+TR12*TR2+TR11*TR3
67 CI3 = CC(2,K,1,1)+TR12*TI2+TR11*TI3
68 CR5 = TI11*TR5+TI12*TR4
69 CI5 = TI11*TI5+TI12*TI4
70 CR4 = TI12*TR5-TI11*TR4
71 CI4 = TI12*TI5-TI11*TI4
72 CH(1,K,2,1) = SN*(CR2-CI5)
73 CH(1,K,5,1) = SN*(CR2+CI5)
74 CH(2,K,2,1) = SN*(CI2+CR5)
75 CH(2,K,3,1) = SN*(CI3+CR4)
76 CH(1,K,3,1) = SN*(CR3-CI4)
77 CH(1,K,4,1) = SN*(CR3+CI4)
78 CH(2,K,4,1) = SN*(CI3-CR4)
79 CH(2,K,5,1) = SN*(CI2-CR5)
80 107 CONTINUE
81 RETURN
82 102 DO 103 K=1,L1
83 TI5 = CC(2,K,1,2)-CC(2,K,1,5)
84 TI2 = CC(2,K,1,2)+CC(2,K,1,5)
85 TI4 = CC(2,K,1,3)-CC(2,K,1,4)
86 TI3 = CC(2,K,1,3)+CC(2,K,1,4)
87 TR5 = CC(1,K,1,2)-CC(1,K,1,5)
88 TR2 = CC(1,K,1,2)+CC(1,K,1,5)
89 TR4 = CC(1,K,1,3)-CC(1,K,1,4)
90 TR3 = CC(1,K,1,3)+CC(1,K,1,4)
91 CH(1,K,1,1) = CC(1,K,1,1)+TR2+TR3
92 CH(2,K,1,1) = CC(2,K,1,1)+TI2+TI3
93 CR2 = CC(1,K,1,1)+TR11*TR2+TR12*TR3
94 CI2 = CC(2,K,1,1)+TR11*TI2+TR12*TI3
95 CR3 = CC(1,K,1,1)+TR12*TR2+TR11*TR3
96 CI3 = CC(2,K,1,1)+TR12*TI2+TR11*TI3
97 CR5 = TI11*TR5+TI12*TR4
98 CI5 = TI11*TI5+TI12*TI4
99 CR4 = TI12*TR5-TI11*TR4
100 CI4 = TI12*TI5-TI11*TI4
101 CH(1,K,2,1) = CR2-CI5
102 CH(1,K,5,1) = CR2+CI5
103 CH(2,K,2,1) = CI2+CR5
104 CH(2,K,3,1) = CI3+CR4
105 CH(1,K,3,1) = CR3-CI4
106 CH(1,K,4,1) = CR3+CI4
107 CH(2,K,4,1) = CI3-CR4
108 CH(2,K,5,1) = CI2-CR5
109 103 CONTINUE
110 DO 105 I=2,IDO
111 DO 104 K=1,L1
112 TI5 = CC(2,K,I,2)-CC(2,K,I,5)
113 TI2 = CC(2,K,I,2)+CC(2,K,I,5)
114 TI4 = CC(2,K,I,3)-CC(2,K,I,4)
115 TI3 = CC(2,K,I,3)+CC(2,K,I,4)
116 TR5 = CC(1,K,I,2)-CC(1,K,I,5)
117 TR2 = CC(1,K,I,2)+CC(1,K,I,5)
118 TR4 = CC(1,K,I,3)-CC(1,K,I,4)
119 TR3 = CC(1,K,I,3)+CC(1,K,I,4)
120 CH(1,K,1,I) = CC(1,K,I,1)+TR2+TR3
121 CH(2,K,1,I) = CC(2,K,I,1)+TI2+TI3
122 CR2 = CC(1,K,I,1)+TR11*TR2+TR12*TR3
123 CI2 = CC(2,K,I,1)+TR11*TI2+TR12*TI3
124 CR3 = CC(1,K,I,1)+TR12*TR2+TR11*TR3
125 CI3 = CC(2,K,I,1)+TR12*TI2+TR11*TI3
126 CR5 = TI11*TR5+TI12*TR4
127 CI5 = TI11*TI5+TI12*TI4
128 CR4 = TI12*TR5-TI11*TR4
129 CI4 = TI12*TI5-TI11*TI4
130 DR3 = CR3-CI4
131 DR4 = CR3+CI4
132 DI3 = CI3+CR4
133 DI4 = CI3-CR4
134 DR5 = CR2+CI5
135 DR2 = CR2-CI5
136 DI5 = CI2-CR5
137 DI2 = CI2+CR5
138 CH(1,K,2,I) = WA(I,1,1)*DR2+WA(I,1,2)*DI2
139 CH(2,K,2,I) = WA(I,1,1)*DI2-WA(I,1,2)*DR2
140 CH(1,K,3,I) = WA(I,2,1)*DR3+WA(I,2,2)*DI3
141 CH(2,K,3,I) = WA(I,2,1)*DI3-WA(I,2,2)*DR3
142 CH(1,K,4,I) = WA(I,3,1)*DR4+WA(I,3,2)*DI4
143 CH(2,K,4,I) = WA(I,3,1)*DI4-WA(I,3,2)*DR4
144 CH(1,K,5,I) = WA(I,4,1)*DR5+WA(I,4,2)*DI5
145 CH(2,K,5,I) = WA(I,4,1)*DI5-WA(I,4,2)*DR5
146 104 CONTINUE
147 105 CONTINUE
148 RETURN