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