Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / sinq1b.f
blobf78898192da377ed75bb9e2aa7b6f514a614f6a6
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE SINQ1B ( 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 ('SINQ1B', 6)
21 ELSEIF (LENSAV .LT. 2*N + INT(LOG(REAL(N))/LOG(2.)) +4) THEN
22 IER = 2
23 CALL XERFFT ('SINQ1B', 8)
24 ELSEIF (LENWRK .LT. N) THEN
25 IER = 3
26 CALL XERFFT ('SINQ1B', 10)
27 ENDIF
29 IF (N .GT. 1) GO TO 101
30 RETURN
31 101 NS2 = N/2
32 DO 102 K=2,N,2
33 X(1,K) = -X(1,K)
34 102 CONTINUE
35 CALL COSQ1B (N,INC,X,LENX,WSAVE,LENSAV,WORK,LENWRK,IER1)
36 IF (IER1 .NE. 0) THEN
37 IER = 20
38 CALL XERFFT ('SINQ1B',-5)
39 GO TO 300
40 ENDIF
41 DO 103 K=1,NS2
42 KC = N-K
43 XHOLD = X(1,K)
44 X(1,K) = X(1,KC+1)
45 X(1,KC+1) = XHOLD
46 103 CONTINUE
47 300 RETURN
48 END