Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / cosq1f.f
blob10e1c2dc215c75a0067e1fd142c2e033e1f1aff3
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE COSQ1F (N, INC, X, LENX, WSAVE, LENSAV,
12 1 WORK, LENWRK, IER)
13 INTEGER N, INC, LENX, LENSAV, LENWRK, IER
14 REAL X(INC,*), WSAVE(LENSAV), WORK(LENWRK)
16 IER = 0
18 IF (LENX .LT. INC*(N-1) + 1) THEN
19 IER = 1
20 CALL XERFFT ('COSQ1F', 6)
21 GO TO 300
22 ELSEIF (LENSAV .LT. 2*N + INT(LOG(REAL(N))/LOG(2.)) +4) THEN
23 IER = 2
24 CALL XERFFT ('COSQ1F', 8)
25 GO TO 300
26 ELSEIF (LENWRK .LT. N) THEN
27 IER = 3
28 CALL XERFFT ('COSQ1F', 10)
29 GO TO 300
30 ENDIF
32 IF (N-2) 102,101,103
33 101 SSQRT2 = 1./SQRT(2.)
34 TSQX = SSQRT2*X(1,2)
35 X(1,2) = .5*X(1,1)-TSQX
36 X(1,1) = .5*X(1,1)+TSQX
37 102 RETURN
38 103 CALL COSQF1 (N,INC,X,WSAVE,WORK,IER1)
39 IF (IER1 .NE. 0) THEN
40 IER = 20
41 CALL XERFFT ('COSQ1F',-5)
42 ENDIF
44 300 CONTINUE
45 RETURN
46 END