Windows installer: Update SBCL.
[maxima.git] / share / fftpack5 / fortran / cosq1b.f
blobb6f87c2aeda5c62f97a3250fd6ee5460de913115
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE COSQ1B (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 ('COSQ1B', 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 ('COSQ1B', 8)
25 GO TO 300
26 ELSEIF (LENWRK .LT. N) THEN
27 IER = 3
28 CALL XERFFT ('COSQ1B', 10)
29 GO TO 300
30 ENDIF
32 IF (N-2) 300,102,103
33 102 SSQRT2 = 1./SQRT(2.)
34 X1 = X(1,1)+X(1,2)
35 X(1,2) = SSQRT2*(X(1,1)-X(1,2))
36 X(1,1) = X1
37 RETURN
38 103 CALL COSQB1 (N,INC,X,WSAVE,WORK,IER1)
39 IF (IER1 .NE. 0) THEN
40 IER = 20
41 CALL XERFFT ('COSQ1B',-5)
42 ENDIF
44 300 RETURN
45 END