Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / cosqmb.f
blobab2890a7575ac379fccdc0c28834e990b70240fb
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE COSQMB (LOT, JUMP, N, INC, X, LENX, WSAVE, LENSAV,
12 1 WORK, LENWRK, IER)
13 INTEGER LOT, JUMP, N, INC, LENX, LENSAV, LENWRK, IER
14 REAL X(INC,*), WSAVE(LENSAV), WORK(LENWRK)
15 LOGICAL XERCON
17 IER = 0
19 IF (LENX .LT. (LOT-1)*JUMP + INC*(N-1) + 1) THEN
20 IER = 1
21 CALL XERFFT ('COSQMB', 6)
22 GO TO 300
23 ELSEIF (LENSAV .LT. 2*N + INT(LOG(REAL(N))/LOG(2.)) +4) THEN
24 IER = 2
25 CALL XERFFT ('COSQMB', 8)
26 GO TO 300
27 ELSEIF (LENWRK .LT. LOT*N) THEN
28 IER = 3
29 CALL XERFFT ('COSQMB', 10)
30 GO TO 300
31 ELSEIF (.NOT. XERCON(INC,JUMP,N,LOT)) THEN
32 IER = 4
33 CALL XERFFT ('COSQMB', -1)
34 GO TO 300
35 ENDIF
37 LJ = (LOT-1)*JUMP+1
38 IF (N-2) 101,102,103
39 101 DO 201 M=1,LJ,JUMP
40 X(M,1) = X(M,1)
41 201 CONTINUE
42 RETURN
43 102 SSQRT2 = 1./SQRT(2.)
44 DO 202 M=1,LJ,JUMP
45 X1 = X(M,1)+X(M,2)
46 X(M,2) = SSQRT2*(X(M,1)-X(M,2))
47 X(M,1) = X1
48 202 CONTINUE
49 RETURN
50 103 CALL MCSQB1 (LOT,JUMP,N,INC,X,WSAVE,WORK,IER1)
51 IF (IER1 .NE. 0) THEN
52 IER = 20
53 CALL XERFFT ('COSQMB',-5)
54 ENDIF
56 300 CONTINUE
57 RETURN
58 END