Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / cosq1i.f
blob172f047c12ba1e3c86fb2d28bc1377d18128c465
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE COSQ1I (N, WSAVE, LENSAV, IER)
12 INTEGER N, LENSAV, IER
13 REAL WSAVE(LENSAV)
15 IER = 0
16 IF (LENSAV .LT. 2*N + INT(LOG(REAL(N))/LOG(2.)) +4) THEN
17 IER = 2
18 CALL XERFFT ('COSQ1I', 3)
19 GO TO 300
20 ENDIF
22 PIH = 2.*ATAN(1.)
23 DT = PIH/FLOAT(N)
24 FK = 0.
25 DO 101 K=1,N
26 FK = FK+1.
27 WSAVE(K) = COS(FK*DT)
28 101 CONTINUE
29 LNSV = N + INT(LOG(REAL(N))/LOG(2.)) +4
30 CALL RFFT1I (N, WSAVE(N+1), LNSV, IER1)
31 IF (IER1 .NE. 0) THEN
32 IER = 20
33 CALL XERFFT ('COSQ1I',-5)
34 ENDIF
35 300 CONTINUE
36 RETURN
37 END