1 subroutine cosqf1 ( n, inc, x, wsave, work, ier )
3 !*****************************************************************************80
5 !! COSQF1 is an FFTPACK5 auxiliary routine.
8 ! Copyright (C) 1995-2004, Scientific Computing Division,
9 ! University Corporation for Atmospheric Research
23 ! Vectorizing the Fast Fourier Transforms,
24 ! in Parallel Computations,
25 ! edited by G. Rodrigue,
26 ! Academic Press, 1982.
29 ! Fast Fourier Transform Algorithms for Vector Computers,
30 ! Parallel Computing, pages 45-63, 1984.
36 integer ( kind = 4 ) inc
38 integer ( kind = 4 ) i
39 integer ( kind = 4 ) ier
40 integer ( kind = 4 ) ier1
41 integer ( kind = 4 ) k
42 integer ( kind = 4 ) kc
43 integer ( kind = 4 ) lenx
44 integer ( kind = 4 ) lnsv
45 integer ( kind = 4 ) lnwk
46 integer ( kind = 4 ) modn
47 integer ( kind = 4 ) n
48 integer ( kind = 4 ) np2
49 integer ( kind = 4 ) ns2
50 real ( kind = 4 ) work(*)
51 real ( kind = 4 ) wsave(*)
52 real ( kind = 4 ) x(inc,*)
53 real ( kind = 4 ) xim1
61 work(k) = x(1,k) + x(1,kc)
62 work(kc) = x(1,k) - x(1,kc)
68 work(ns2+1) = x(1,ns2+1) + x(1,ns2+1)
73 x(1,k) = wsave(k-1) * work(kc) + wsave(kc-1) * work(k)
74 x(1,kc) = wsave(k-1) * work(k) - wsave(kc-1) * work(kc)
78 x(1,ns2+1) = wsave(ns2) * work(ns2+1)
81 lenx = inc * ( n - 1 ) + 1
82 lnsv = n + int ( log ( real ( n, kind = 4 ) ) ) + 4
85 call rfft1f ( n, inc, x, lenx, wsave(n+1), lnsv, work, lnwk, ier1 )
89 call xerfft ( 'cosqf1', -5 )
94 xim1 = 0.5E+00 * ( x(1,i-1) + x(1,i) )
95 x(1,i) = 0.5E+00 * ( x(1,i-1) - x(1,i) )