1 subroutine rfft1i ( n, wsave, lensav, ier )
3 !*****************************************************************************80
5 !! RFFT1I: initialization for RFFT1B and RFFT1F.
9 ! RFFT1I initializes array WSAVE for use in its companion routines
10 ! RFFT1B and RFFT1F. 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 is a product of
46 ! Output, real ( kind = 4 ) WSAVE(LENSAV), containing the prime factors of
47 ! N and also containing certain trigonometric values which will be used in
48 ! routines RFFT1B or RFFT1F.
50 ! Input, integer ( kind = 4 ) LENSAV, the dimension of the WSAVE array.
51 ! LENSAV must be at least N + INT(LOG(REAL(N))) + 4.
53 ! Output, integer ( kind = 4 ) IER, error flag.
55 ! 2, input parameter LENSAV not big enough.
59 integer ( kind = 4 ) lensav
61 integer ( kind = 4 ) ier
62 integer ( kind = 4 ) n
63 real ( kind = 4 ) wsave(lensav)
67 if ( lensav < n + int ( log ( real ( n, kind = 4 ) ) ) + 4 ) then
69 call xerfft ( 'rfft1i ', 3 )
77 call rffti1 ( n, wsave(1), wsave(n+1) )