Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / cmf3kb.f
blob37dd090fdead6b68d8d86d2d668b5ff21db82d95
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE CMF3KB (LOT,IDO,L1,NA,CC,IM1,IN1,CH,IM2,IN2,WA)
12 REAL CC(2,IN1,L1,IDO,3),CH(2,IN2,L1,3,IDO),WA(IDO,2,2)
13 DATA TAUR,TAUI /-.5,.866025403784439/
15 M1D = (LOT-1)*IM1+1
16 M2S = 1-IM2
17 IF (IDO.GT.1 .OR. NA.EQ.1) GO TO 102
18 DO 101 K=1,L1
19 DO 101 M1=1,M1D,IM1
20 TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,3)
21 CR2 = CC(1,M1,K,1,1)+TAUR*TR2
22 CC(1,M1,K,1,1) = CC(1,M1,K,1,1)+TR2
23 TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,3)
24 CI2 = CC(2,M1,K,1,1)+TAUR*TI2
25 CC(2,M1,K,1,1) = CC(2,M1,K,1,1)+TI2
26 CR3 = TAUI*(CC(1,M1,K,1,2)-CC(1,M1,K,1,3))
27 CI3 = TAUI*(CC(2,M1,K,1,2)-CC(2,M1,K,1,3))
28 CC(1,M1,K,1,2) = CR2-CI3
29 CC(1,M1,K,1,3) = CR2+CI3
30 CC(2,M1,K,1,2) = CI2+CR3
31 CC(2,M1,K,1,3) = CI2-CR3
32 101 CONTINUE
33 RETURN
34 102 DO 103 K=1,L1
35 M2 = M2S
36 DO 103 M1=1,M1D,IM1
37 M2 = M2+IM2
38 TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,3)
39 CR2 = CC(1,M1,K,1,1)+TAUR*TR2
40 CH(1,M2,K,1,1) = CC(1,M1,K,1,1)+TR2
41 TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,3)
42 CI2 = CC(2,M1,K,1,1)+TAUR*TI2
43 CH(2,M2,K,1,1) = CC(2,M1,K,1,1)+TI2
44 CR3 = TAUI*(CC(1,M1,K,1,2)-CC(1,M1,K,1,3))
45 CI3 = TAUI*(CC(2,M1,K,1,2)-CC(2,M1,K,1,3))
46 CH(1,M2,K,2,1) = CR2-CI3
47 CH(1,M2,K,3,1) = CR2+CI3
48 CH(2,M2,K,2,1) = CI2+CR3
49 CH(2,M2,K,3,1) = CI2-CR3
50 103 CONTINUE
51 IF (IDO .EQ. 1) RETURN
52 DO 105 I=2,IDO
53 DO 104 K=1,L1
54 M2 = M2S
55 DO 104 M1=1,M1D,IM1
56 M2 = M2+IM2
57 TR2 = CC(1,M1,K,I,2)+CC(1,M1,K,I,3)
58 CR2 = CC(1,M1,K,I,1)+TAUR*TR2
59 CH(1,M2,K,1,I) = CC(1,M1,K,I,1)+TR2
60 TI2 = CC(2,M1,K,I,2)+CC(2,M1,K,I,3)
61 CI2 = CC(2,M1,K,I,1)+TAUR*TI2
62 CH(2,M2,K,1,I) = CC(2,M1,K,I,1)+TI2
63 CR3 = TAUI*(CC(1,M1,K,I,2)-CC(1,M1,K,I,3))
64 CI3 = TAUI*(CC(2,M1,K,I,2)-CC(2,M1,K,I,3))
65 DR2 = CR2-CI3
66 DR3 = CR2+CI3
67 DI2 = CI2+CR3
68 DI3 = CI2-CR3
69 CH(2,M2,K,2,I) = WA(I,1,1)*DI2+WA(I,1,2)*DR2
70 CH(1,M2,K,2,I) = WA(I,1,1)*DR2-WA(I,1,2)*DI2
71 CH(2,M2,K,3,I) = WA(I,2,1)*DI3+WA(I,2,2)*DR3
72 CH(1,M2,K,3,I) = WA(I,2,1)*DR3-WA(I,2,2)*DI3
73 104 CONTINUE
74 105 CONTINUE
75 RETURN
76 END