1 subroutine dcostb1 ( n, inc, x, wsave, work, ier )
3 !*****************************************************************************80
5 !! DCOSTB1 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 real ( kind = 8 ) fnm1s2
38 real ( kind = 8 ) fnm1s4
39 integer ( kind = 4 ) i
40 integer ( kind = 4 ) ier
41 integer ( kind = 4 ) ier1
42 integer ( kind = 4 ) k
43 integer ( kind = 4 ) kc
44 integer ( kind = 4 ) lenx
45 integer ( kind = 4 ) lnsv
46 integer ( kind = 4 ) lnwk
47 integer ( kind = 4 ) modn
48 integer ( kind = 4 ) n
49 integer ( kind = 4 ) nm1
50 integer ( kind = 4 ) np1
51 integer ( kind = 4 ) ns2
54 real ( kind = 8 ) work(*)
55 real ( kind = 8 ) wsave(*)
56 real ( kind = 8 ) x(inc,*)
58 real ( kind = 8 ) x1p3
73 x(1,2) = x(1,1) - x(1,2)
79 x1p3 = x(1,1) + x(1,3)
81 x(1,2) = x(1,1) - x(1,3)
87 x(1,1) = x(1,1) + x(1,1)
88 x(1,n) = x(1,n) + x(1,n)
89 dsum = x(1,1) - x(1,n)
90 x(1,1) = x(1,1) + x(1,n)
96 dsum = dsum + wsave(kc) * t2
104 if ( modn /= 0 ) then
105 x(1,ns2+1) = x(1,ns2+1) + x(1,ns2+1)
108 lenx = inc * ( nm1 - 1 ) + 1
109 lnsv = nm1 + int ( log ( real ( nm1, kind = 8 ) ) ) + 4
112 call dfft1f ( nm1, inc, x, lenx, wsave(n+1), lnsv, work, lnwk, ier1 )
114 if ( ier1 /= 0 ) then
116 call xerfft ( 'DCOSTB1', -5 )
120 fnm1s2 = real ( nm1, kind = 8 ) / 2.0D+00
121 dsum = 0.5D+00 * dsum
122 x(1,1) = fnm1s2 * x(1,1)
124 if ( mod ( nm1, 2 ) == 0 ) then
125 x(1,nm1) = x(1,nm1) + x(1,nm1)
128 fnm1s4 = real ( nm1, kind = 8 ) / 4.0D+00
132 x(1,i) = fnm1s4 * x(1,i-1)
137 if ( modn == 0 ) then