1 subroutine d1f4kf ( ido, l1, cc, in1, ch, in2, wa1, wa2, wa3 )
3 !*****************************************************************************80
5 !! D1F4KF is an FFTPACK5 auxiliary routine.
15 ! Original real single precision by Paul Swarztrauber, Richard Valent.
16 ! Real 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,ido,l1,4)
40 real ( kind = 8 ) ch(in2,ido,4,l1)
41 real ( kind = 8 ) hsqt2
42 integer ( kind = 4 ) i
43 integer ( kind = 4 ) ic
44 integer ( kind = 4 ) idp2
45 integer ( kind = 4 ) k
46 real ( kind = 8 ) wa1(ido)
47 real ( kind = 8 ) wa2(ido)
48 real ( kind = 8 ) wa3(ido)
50 hsqt2 = sqrt ( 2.0D+00 ) / 2.0D+00
53 ch(1,1,1,k) = ( cc(1,1,k,2) + cc(1,1,k,4) ) &
54 + ( cc(1,1,k,1) + cc(1,1,k,3) )
55 ch(1,ido,4,k) = ( cc(1,1,k,1) + cc(1,1,k,3) ) &
56 - ( cc(1,1,k,2) + cc(1,1,k,4) )
57 ch(1,ido,2,k) = cc(1,1,k,1) - cc(1,1,k,3)
58 ch(1,1,3,k) = cc(1,1,k,4) - cc(1,1,k,2)
72 ch(1,i-1,1,k) = ((wa1(i-2)*cc(1,i-1,k,2)+wa1(i-1)* &
73 cc(1,i,k,2))+(wa3(i-2)*cc(1,i-1,k,4)+wa3(i-1)* &
74 cc(1,i,k,4)))+(cc(1,i-1,k,1)+(wa2(i-2)*cc(1,i-1,k,3)+ &
75 wa2(i-1)*cc(1,i,k,3)))
76 ch(1,ic-1,4,k) = (cc(1,i-1,k,1)+(wa2(i-2)*cc(1,i-1,k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