1 subroutine dffti1 ( n, wa, fac )
3 !*****************************************************************************80
5 !! DFFTI1 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.
32 ! Input, integer ( kind = 4 ) N, the number for which factorization and
33 ! other information is needed.
35 ! Output, real ( kind = 8 ) WA(N), trigonometric information.
37 ! Output, real ( kind = 8 ) FAC(15), factorization information.
38 ! FAC(1) is N, FAC(2) is NF, the number of factors, and FAC(3:NF+2) are the
43 integer ( kind = 4 ) n
46 real ( kind = 8 ) argh
47 real ( kind = 8 ) argld
48 real ( kind = 8 ) fac(15)
50 integer ( kind = 4 ) i
51 integer ( kind = 4 ) ib
52 integer ( kind = 4 ) ido
53 integer ( kind = 4 ) ii
54 integer ( kind = 4 ) ip
55 integer ( kind = 4 ) ipm
56 integer ( kind = 4 ) is
57 integer ( kind = 4 ) j
58 integer ( kind = 4 ) k1
59 integer ( kind = 4 ) l1
60 integer ( kind = 4 ) l2
61 integer ( kind = 4 ) ld
62 integer ( kind = 4 ) nf
63 integer ( kind = 4 ) nfm1
64 integer ( kind = 4 ) nl
65 integer ( kind = 4 ) nq
66 integer ( kind = 4 ) nr
67 integer ( kind = 4 ) ntry
69 real ( kind = 8 ) wa(n)
81 else if ( j == 2 ) then
83 else if ( j == 3 ) then
85 else if ( j == 4 ) then
101 fac(nf+2) = real ( ntry, kind = 8 )
104 ! If 2 is a factor, make sure it appears first in the list of factors.
106 if ( ntry == 2 ) then
110 fac(ib+2) = fac(ib+1)
120 fac(1) = real ( n, kind = 8 )
121 fac(2) = real ( nf, kind = 8 )
122 tpi = 8.0D+00 * atan ( 1.0D+00 )
123 argh = tpi / real ( n, kind = 8 )
129 ip = int ( fac(k1+2) )
137 argld = real ( ld, kind = 8 ) * argh
143 wa(i-1) = real ( cos ( arg ), kind = 8 )
144 wa(i) = real ( sin ( arg ), kind = 8 )