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