1 subroutine sint1i ( n, wsave, lensav, ier )
3 !*****************************************************************************80
5 !! SINT1I: initialization for SINT1B and SINT1F.
9 ! SINT1I initializes array WSAVE for use in its companion routines
10 ! SINT1F and SINT1B. The prime factorization of N together with a
11 ! tabulation of the trigonometric functions are computed and stored
12 ! in array WSAVE. Separate WSAVE arrays are required for different
16 ! Copyright (C) 1995-2004, Scientific Computing Division,
17 ! University Corporation for Atmospheric Research
31 ! Vectorizing the Fast Fourier Transforms,
32 ! in Parallel Computations,
33 ! edited by G. Rodrigue,
34 ! Academic Press, 1982.
37 ! Fast Fourier Transform Algorithms for Vector Computers,
38 ! Parallel Computing, pages 45-63, 1984.
42 ! Input, integer ( kind = 4 ) N, the length of the sequence to be
43 ! transformed. The transform is most efficient when N+1 is a product
46 ! Input, integer ( kind = 4 ) LENSAV, the dimension of the WSAVE array.
47 ! LENSAV must be at least N/2 + N + INT(LOG(REAL(N))) + 4.
49 ! Output, real ( kind = 4 ) WSAVE(LENSAV), containing the prime factors
50 ! of N and also containing certain trigonometric values which will be used
51 ! in routines SINT1B or SINT1F.
53 ! Output, integer ( kind = 4 ) IER, error flag.
55 ! 2, input parameter LENSAV not big enough;
56 ! 20, input error returned by lower level routine.
60 integer ( kind = 4 ) lensav
63 integer ( kind = 4 ) ier
64 integer ( kind = 4 ) ier1
65 integer ( kind = 4 ) k
66 integer ( kind = 4 ) lnsv
67 integer ( kind = 4 ) n
68 integer ( kind = 4 ) np1
69 integer ( kind = 4 ) ns2
71 real ( kind = 4 ) wsave(lensav)
75 if ( lensav < n / 2 + n + int ( log ( real ( n, kind = 4 ) ) ) + 4 ) then
77 call xerfft ( 'SINT1I', 3 )
81 pi = 4.0E+00 * atan ( 1.0E+00 )
89 dt = pi / real ( np1, kind = 4 )
92 wsave(k) = 2.0E+00 * sin ( real ( k, kind = 4 ) * dt )
95 lnsv = np1 + int ( log ( real ( np1, kind = 4 ) ) ) + 4
97 call rfft1i ( np1, wsave(ns2+1), lnsv, ier1 )
101 call xerfft ( 'SINT1I', -5 )