1 subroutine mrfti1 ( n, wa, fac )
3 !*****************************************************************************80
5 !! MRFTI1 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.
34 ! Input, integer ( kind = 4 ) N, the number for which factorization and
35 ! other information is needed.
37 ! Output, real ( kind = 4 ) WA(N), trigonometric information.
39 ! Output, real ( kind = 4 ) FAC(15), factorization information. FAC(1) is
40 ! N, FAC(2) is NF, the number of factors, and FAC(3:NF+2) are the factors.
44 integer ( kind = 4 ) n
47 real ( kind = 8 ) argh
48 real ( kind = 8 ) argld
49 real ( kind = 4 ) fac(15)
51 integer ( kind = 4 ) i
52 integer ( kind = 4 ) ib
53 integer ( kind = 4 ) ido
54 integer ( kind = 4 ) ii
55 integer ( kind = 4 ) ip
56 integer ( kind = 4 ) ipm
57 integer ( kind = 4 ) is
58 integer ( kind = 4 ) j
59 integer ( kind = 4 ) k1
60 integer ( kind = 4 ) l1
61 integer ( kind = 4 ) l2
62 integer ( kind = 4 ) ld
63 integer ( kind = 4 ) nf
64 integer ( kind = 4 ) nfm1
65 integer ( kind = 4 ) nl
66 integer ( kind = 4 ) nq
67 integer ( kind = 4 ) nr
68 integer ( kind = 4 ) ntry
70 real ( kind = 4 ) wa(n)
82 else if ( j == 2 ) then
84 else if ( j == 3 ) then
86 else if ( j == 4 ) then
102 fac(nf+2) = real ( ntry, kind = 4 )
105 ! If 2 is a factor, make sure it appears first in the list of factors.
107 if ( ntry == 2 ) then
111 fac(ib+2) = fac(ib+1)
121 fac(1) = real ( n, kind = 4 )
122 fac(2) = real ( nf, kind = 4 )
123 tpi = 8.0D+00 * atan ( 1.0D+00 )
124 argh = tpi / real ( n, kind = 4 )
130 ip = int ( fac(k1+2) )
138 argld = real ( ld, kind = 4 ) * argh
144 wa(i-1) = cos ( arg )