1 subroutine dcostf1 ( n, inc, x, wsave, work, ier )
3 !*****************************************************************************80
5 !! DCOSTF1 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 ) inc
36 real ( kind = 8 ) dsum
37 integer ( kind = 4 ) i
38 integer ( kind = 4 ) ier
39 integer ( kind = 4 ) ier1
40 integer ( kind = 4 ) k
41 integer ( kind = 4 ) kc
42 integer ( kind = 4 ) lenx
43 integer ( kind = 4 ) lnsv
44 integer ( kind = 4 ) lnwk
45 integer ( kind = 4 ) modn
46 integer ( kind = 4 ) n
47 integer ( kind = 4 ) nm1
48 integer ( kind = 4 ) np1
49 integer ( kind = 4 ) ns2
50 real ( kind = 8 ) snm1
54 real ( kind = 8 ) work(*)
55 real ( kind = 8 ) wsave(*)
56 real ( kind = 8 ) x(inc,*)
58 real ( kind = 8 ) x1p3
72 x(1,2) = 0.5D+00 * ( x(1,1) - x(1,2) )
73 x(1,1) = 0.5D+00 * x1h
78 x1p3 = x(1,1) + x(1,3)
80 x(1,2) = 0.5D+00 * ( x(1,1) - x(1,3) )
81 x(1,1) = 0.25D+00 * ( x1p3 + tx2 )
82 x(1,3) = 0.25D+00 * ( x1p3 - tx2 )
86 dsum = x(1,1) - x(1,n)
87 x(1,1) = x(1,1) + x(1,n)
92 dsum = dsum + wsave(kc) * t2
100 if ( modn /= 0 ) then
101 x(1,ns2+1) = x(1,ns2+1) + x(1,ns2+1)
104 lenx = inc * ( nm1 - 1 ) + 1
105 lnsv = nm1 + int ( log ( real ( nm1, kind = 8 ) ) ) + 4
108 call dfft1f ( nm1, inc, x, lenx, wsave(n+1), lnsv, work, lnwk, ier1 )
110 if ( ier1 /= 0 ) then
112 call xerfft ( 'DCOSTF1', -5 )
116 snm1 = 1.0D+00 / real ( nm1, kind = 8 )
119 if ( mod ( nm1, 2 ) == 0 ) then
120 x(1,nm1) = x(1,nm1) + x(1,nm1)
124 xi = 0.5D+00 * x(1,i)
125 x(1,i) = 0.5D+00 * x(1,i-1)
130 if ( modn == 0 ) then
134 x(1,1) = 0.5D+00 * x(1,1)
135 x(1,n) = 0.5D+00 * x(1,n)