1 subroutine z1f5kf ( ido, l1, na, cc, in1, ch, in2, wa )
3 !*****************************************************************************80
5 !! Z1F5KF is an FFTPACK5 auxiliary routine.
15 ! Original complex single precision by Paul Swarztrauber, Richard Valent.
16 ! Complex double precision version by John Burkardt.
21 ! Vectorizing the Fast Fourier Transforms,
22 ! in Parallel Computations,
23 ! edited by G. Rodrigue,
24 ! Academic Press, 1982.
27 ! Fast Fourier Transform Algorithms for Vector Computers,
28 ! Parallel Computing, pages 45-63, 1984.
34 integer ( kind = 4 ) ido
35 integer ( kind = 4 ) in1
36 integer ( kind = 4 ) in2
37 integer ( kind = 4 ) l1
39 real ( kind = 8 ) cc(in1,l1,ido,5)
40 real ( kind = 8 ) ch(in2,l1,5,ido)
41 real ( kind = 8 ) chold1
42 real ( kind = 8 ) chold2
59 integer ( kind = 4 ) i
60 integer ( kind = 4 ) k
61 integer ( kind = 4 ) na
67 real ( kind = 8 ), parameter :: ti11 = -0.9510565162951536D+00
68 real ( kind = 8 ), parameter :: ti12 = -0.5877852522924731D+00
73 real ( kind = 8 ), parameter :: tr11 = 0.3090169943749474D+00
74 real ( kind = 8 ), parameter :: tr12 = -0.8090169943749474D+00
75 real ( kind = 8 ) wa(ido,4,2)
81 ti5 = cc(2,k,1,2)-cc(2,k,1,5)
82 ti2 = cc(2,k,1,2)+cc(2,k,1,5)
83 ti4 = cc(2,k,1,3)-cc(2,k,1,4)
84 ti3 = cc(2,k,1,3)+cc(2,k,1,4)
85 tr5 = cc(1,k,1,2)-cc(1,k,1,5)
86 tr2 = cc(1,k,1,2)+cc(1,k,1,5)
87 tr4 = cc(1,k,1,3)-cc(1,k,1,4)
88 tr3 = cc(1,k,1,3)+cc(1,k,1,4)
90 ch(1,k,1,1) = cc(1,k,1,1)+tr2+tr3
91 ch(2,k,1,1) = cc(2,k,1,1)+ti2+ti3
92 cr2 = cc(1,k,1,1)+tr11*tr2+tr12*tr3
93 ci2 = cc(2,k,1,1)+tr11*ti2+tr12*ti3
94 cr3 = cc(1,k,1,1)+tr12*tr2+tr11*tr3
95 ci3 = cc(2,k,1,1)+tr12*ti2+tr11*ti3
96 cr5 = ti11*tr5+ti12*tr4
97 ci5 = ti11*ti5+ti12*ti4
98 cr4 = ti12*tr5-ti11*tr4
99 ci4 = ti12*ti5-ti11*ti4
100 ch(1,k,2,1) = cr2-ci5
101 ch(1,k,5,1) = cr2+ci5
102 ch(2,k,2,1) = ci2+cr5
103 ch(2,k,3,1) = ci3+cr4
104 ch(1,k,3,1) = cr3-ci4
105 ch(1,k,4,1) = cr3+ci4
106 ch(2,k,4,1) = ci3-cr4
107 ch(2,k,5,1) = ci2-cr5
113 ti5 = cc(2,k,i,2)-cc(2,k,i,5)
114 ti2 = cc(2,k,i,2)+cc(2,k,i,5)
115 ti4 = cc(2,k,i,3)-cc(2,k,i,4)
116 ti3 = cc(2,k,i,3)+cc(2,k,i,4)
117 tr5 = cc(1,k,i,2)-cc(1,k,i,5)
118 tr2 = cc(1,k,i,2)+cc(1,k,i,5)
119 tr4 = cc(1,k,i,3)-cc(1,k,i,4)
120 tr3 = cc(1,k,i,3)+cc(1,k,i,4)
122 ch(1,k,1,i) = cc(1,k,i,1)+tr2+tr3
123 ch(2,k,1,i) = cc(2,k,i,1)+ti2+ti3
124 cr2 = cc(1,k,i,1)+tr11*tr2+tr12*tr3
125 ci2 = cc(2,k,i,1)+tr11*ti2+tr12*ti3
126 cr3 = cc(1,k,i,1)+tr12*tr2+tr11*tr3
127 ci3 = cc(2,k,i,1)+tr12*ti2+tr11*ti3
128 cr5 = ti11*tr5+ti12*tr4
129 ci5 = ti11*ti5+ti12*ti4
130 cr4 = ti12*tr5-ti11*tr4
131 ci4 = ti12*ti5-ti11*ti4
140 ch(1,k,2,i) = wa(i,1,1)*dr2+wa(i,1,2)*di2
141 ch(2,k,2,i) = wa(i,1,1)*di2-wa(i,1,2)*dr2
142 ch(1,k,3,i) = wa(i,2,1)*dr3+wa(i,2,2)*di3
143 ch(2,k,3,i) = wa(i,2,1)*di3-wa(i,2,2)*dr3
144 ch(1,k,4,i) = wa(i,3,1)*dr4+wa(i,3,2)*di4
145 ch(2,k,4,i) = wa(i,3,1)*di4-wa(i,3,2)*dr4
146 ch(1,k,5,i) = wa(i,4,1)*dr5+wa(i,4,2)*di5
147 ch(2,k,5,i) = wa(i,4,1)*di5-wa(i,4,2)*dr5
151 else if ( na == 1 ) then
153 sn = 1.0D+00 / real ( 5 * l1, kind = 8 )
157 ti5 = cc(2,k,1,2)-cc(2,k,1,5)
158 ti2 = cc(2,k,1,2)+cc(2,k,1,5)
159 ti4 = cc(2,k,1,3)-cc(2,k,1,4)
160 ti3 = cc(2,k,1,3)+cc(2,k,1,4)
161 tr5 = cc(1,k,1,2)-cc(1,k,1,5)
162 tr2 = cc(1,k,1,2)+cc(1,k,1,5)
163 tr4 = cc(1,k,1,3)-cc(1,k,1,4)
164 tr3 = cc(1,k,1,3)+cc(1,k,1,4)
166 ch(1,k,1,1) = sn*(cc(1,k,1,1)+tr2+tr3)
167 ch(2,k,1,1) = sn*(cc(2,k,1,1)+ti2+ti3)
169 cr2 = cc(1,k,1,1)+tr11*tr2+tr12*tr3
170 ci2 = cc(2,k,1,1)+tr11*ti2+tr12*ti3
171 cr3 = cc(1,k,1,1)+tr12*tr2+tr11*tr3
172 ci3 = cc(2,k,1,1)+tr12*ti2+tr11*ti3
173 cr5 = ti11*tr5+ti12*tr4
174 ci5 = ti11*ti5+ti12*ti4
175 cr4 = ti12*tr5-ti11*tr4
176 ci4 = ti12*ti5-ti11*ti4
178 ch(1,k,2,1) = sn*(cr2-ci5)
179 ch(1,k,5,1) = sn*(cr2+ci5)
180 ch(2,k,2,1) = sn*(ci2+cr5)
181 ch(2,k,3,1) = sn*(ci3+cr4)
182 ch(1,k,3,1) = sn*(cr3-ci4)
183 ch(1,k,4,1) = sn*(cr3+ci4)
184 ch(2,k,4,1) = sn*(ci3-cr4)
185 ch(2,k,5,1) = sn*(ci2-cr5)
191 sn = 1.0D+00 / real ( 5 * l1, kind = 8 )
195 ti5 = cc(2,k,1,2)-cc(2,k,1,5)
196 ti2 = cc(2,k,1,2)+cc(2,k,1,5)
197 ti4 = cc(2,k,1,3)-cc(2,k,1,4)
198 ti3 = cc(2,k,1,3)+cc(2,k,1,4)
199 tr5 = cc(1,k,1,2)-cc(1,k,1,5)
200 tr2 = cc(1,k,1,2)+cc(1,k,1,5)
201 tr4 = cc(1,k,1,3)-cc(1,k,1,4)
202 tr3 = cc(1,k,1,3)+cc(1,k,1,4)
204 chold1 = sn*(cc(1,k,1,1)+tr2+tr3)
205 chold2 = sn*(cc(2,k,1,1)+ti2+ti3)
207 cr2 = cc(1,k,1,1)+tr11*tr2+tr12*tr3
208 ci2 = cc(2,k,1,1)+tr11*ti2+tr12*ti3
209 cr3 = cc(1,k,1,1)+tr12*tr2+tr11*tr3
210 ci3 = cc(2,k,1,1)+tr12*ti2+tr11*ti3
215 cr5 = ti11*tr5+ti12*tr4
216 ci5 = ti11*ti5+ti12*ti4
217 cr4 = ti12*tr5-ti11*tr4
218 ci4 = ti12*ti5-ti11*ti4
220 cc(1,k,1,2) = sn*(cr2-ci5)
221 cc(1,k,1,5) = sn*(cr2+ci5)
222 cc(2,k,1,2) = sn*(ci2+cr5)
223 cc(2,k,1,3) = sn*(ci3+cr4)
224 cc(1,k,1,3) = sn*(cr3-ci4)
225 cc(1,k,1,4) = sn*(cr3+ci4)
226 cc(2,k,1,4) = sn*(ci3-cr4)
227 cc(2,k,1,5) = sn*(ci2-cr5)