Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / cmf4kb.f
blob4d53653f182f4518db6e2afcf116421556be08bc
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE CMF4KB (LOT,IDO,L1,NA,CC,IM1,IN1,CH,IM2,IN2,WA)
12 REAL CC(2,IN1,L1,IDO,4),CH(2,IN2,L1,4,IDO),WA(IDO,3,2)
14 C FFTPACK 5.0 auxiliary routine
16 M1D = (LOT-1)*IM1+1
17 M2S = 1-IM2
18 IF (IDO.GT.1 .OR. NA.EQ.1) GO TO 102
19 DO 101 K=1,L1
20 DO 101 M1=1,M1D,IM1
21 TI1 = CC(2,M1,K,1,1)-CC(2,M1,K,1,3)
22 TI2 = CC(2,M1,K,1,1)+CC(2,M1,K,1,3)
23 TR4 = CC(2,M1,K,1,4)-CC(2,M1,K,1,2)
24 TI3 = CC(2,M1,K,1,2)+CC(2,M1,K,1,4)
25 TR1 = CC(1,M1,K,1,1)-CC(1,M1,K,1,3)
26 TR2 = CC(1,M1,K,1,1)+CC(1,M1,K,1,3)
27 TI4 = CC(1,M1,K,1,2)-CC(1,M1,K,1,4)
28 TR3 = CC(1,M1,K,1,2)+CC(1,M1,K,1,4)
29 CC(1,M1,K,1,1) = TR2+TR3
30 CC(1,M1,K,1,3) = TR2-TR3
31 CC(2,M1,K,1,1) = TI2+TI3
32 CC(2,M1,K,1,3) = TI2-TI3
33 CC(1,M1,K,1,2) = TR1+TR4
34 CC(1,M1,K,1,4) = TR1-TR4
35 CC(2,M1,K,1,2) = TI1+TI4
36 CC(2,M1,K,1,4) = TI1-TI4
37 101 CONTINUE
38 R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77 CI3 = TI2-TI3
78 CR2 = TR1+TR4
79 CR4 = TR1-TR4
80 CI2 = TI1+TI4
81 CI4 = TI1-TI4
82 CH(1,M2,K,2,I) = WA(I,1,1)*CR2-WA(I,1,2)*CI2
83 CH(2,M2,K,2,I) = WA(I,1,1)*CI2+WA(I,1,2)*CR2
84 CH(1,M2,K,3,I) = WA(I,2,1)*CR3-WA(I,2,2)*CI3
85 CH(2,M2,K,3,I) = WA(I,2,1)*CI3+WA(I,2,2)*CR3
86 CH(1,M2,K,4,I) = WA(I,3,1)*CR4-WA(I,3,2)*CI4
87 CH(2,M2,K,4,I) = WA(I,3,1)*CI4+WA(I,3,2)*CR4
88 104 CONTINUE
89 105 CONTINUE
90 RETURN
91 END