Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / c1f4kf.f
blobfc618adc42b267443b88f42e5029df10e1644fb6
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE C1F4KF (IDO,L1,NA,CC,IN1,CH,IN2,WA)
12 REAL CC(IN1,L1,IDO,4),CH(IN2,L1,4,IDO),WA(IDO,3,2)
14 C FFTPACK 5.0 auxiliary routine
16 IF (IDO .GT. 1) GO TO 102
17 SN = 1./REAL(4*L1)
18 IF (NA .EQ. 1) GO TO 106
19 DO 101 K=1,L1
20 TI1 = CC(2,K,1,1)-CC(2,K,1,3)
21 TI2 = CC(2,K,1,1)+CC(2,K,1,3)
22 TR4 = CC(2,K,1,2)-CC(2,K,1,4)
23 TI3 = CC(2,K,1,2)+CC(2,K,1,4)
24 TR1 = CC(1,K,1,1)-CC(1,K,1,3)
25 TR2 = CC(1,K,1,1)+CC(1,K,1,3)
26 TI4 = CC(1,K,1,4)-CC(1,K,1,2)
27 TR3 = CC(1,K,1,2)+CC(1,K,1,4)
28 CC(1,K,1,1) = SN*(TR2+TR3)
29 CC(1,K,1,3) = SN*(TR2-TR3)
30 CC(2,K,1,1) = SN*(TI2+TI3)
31 CC(2,K,1,3) = SN*(TI2-TI3)
32 CC(1,K,1,2) = SN*(TR1+TR4)
33 CC(1,K,1,4) = SN*(TR1-TR4)
34 CC(2,K,1,2) = SN*(TI1+TI4)
35 CC(2,K,1,4) = SN*(TI1-TI4)
36 101 CONTINUE
37 RETURN
38 106 DO 107 K=1,L1
39 TI1 = CC(2,K,1,1)-CC(2,K,1,3)
40 TI2 = CC(2,K,1,1)+CC(2,K,1,3)
41 TR4 = CC(2,K,1,2)-CC(2,K,1,4)
42 TI3 = CC(2,K,1,2)+CC(2,K,1,4)
43 TR1 = CC(1,K,1,1)-CC(1,K,1,3)
44 TR2 = CC(1,K,1,1)+CC(1,K,1,3)
45 TI4 = CC(1,K,1,4)-CC(1,K,1,2)
46 TR3 = CC(1,K,1,2)+CC(1,K,1,4)
47 CH(1,K,1,1) = SN*(TR2+TR3)
48 CH(1,K,3,1) = SN*(TR2-TR3)
49 CH(2,K,1,1) = SN*(TI2+TI3)
50 CH(2,K,3,1) = SN*(TI2-TI3)
51 CH(1,K,2,1) = SN*(TR1+TR4)
52 CH(1,K,4,1) = SN*(TR1-TR4)
53 CH(2,K,2,1) = SN*(TI1+TI4)
54 CH(2,K,4,1) = SN*(TI1-TI4)
55 107 CONTINUE
56 RETURN
57 102 DO 103 K=1,L1
58 TI1 = CC(2,K,1,1)-CC(2,K,1,3)
59 TI2 = CC(2,K,1,1)+CC(2,K,1,3)
60 TR4 = CC(2,K,1,2)-CC(2,K,1,4)
61 TI3 = CC(2,K,1,2)+CC(2,K,1,4)
62 TR1 = CC(1,K,1,1)-CC(1,K,1,3)
63 TR2 = CC(1,K,1,1)+CC(1,K,1,3)
64 TI4 = CC(1,K,1,4)-CC(1,K,1,2)
65 TR3 = CC(1,K,1,2)+CC(1,K,1,4)
66 CH(1,K,1,1) = TR2+TR3
67 CH(1,K,3,1) = TR2-TR3
68 CH(2,K,1,1) = TI2+TI3
69 CH(2,K,3,1) = TI2-TI3
70 CH(1,K,2,1) = TR1+TR4
71 CH(1,K,4,1) = TR1-TR4
72 CH(2,K,2,1) = TI1+TI4
73 CH(2,K,4,1) = TI1-TI4
74 103 CONTINUE
75 DO 105 I=2,IDO
76 DO 104 K=1,L1
77 TI1 = CC(2,K,I,1)-CC(2,K,I,3)
78 TI2 = CC(2,K,I,1)+CC(2,K,I,3)
79 TI3 = CC(2,K,I,2)+CC(2,K,I,4)
80 TR4 = CC(2,K,I,2)-CC(2,K,I,4)
81 TR1 = CC(1,K,I,1)-CC(1,K,I,3)
82 TR2 = CC(1,K,I,1)+CC(1,K,I,3)
83 TI4 = CC(1,K,I,4)-CC(1,K,I,2)
84 TR3 = CC(1,K,I,2)+CC(1,K,I,4)
85 CH(1,K,1,I) = TR2+TR3
86 CR3 = TR2-TR3
87 CH(2,K,1,I) = TI2+TI3
88 CI3 = TI2-TI3
89 CR2 = TR1+TR4
90 CR4 = TR1-TR4
91 CI2 = TI1+TI4
92 CI4 = TI1-TI4
93 CH(1,K,2,I) = WA(I,1,1)*CR2+WA(I,1,2)*CI2
94 CH(2,K,2,I) = WA(I,1,1)*CI2-WA(I,1,2)*CR2
95 CH(1,K,3,I) = WA(I,2,1)*CR3+WA(I,2,2)*CI3
96 CH(2,K,3,I) = WA(I,2,1)*CI3-WA(I,2,2)*CR3
97 CH(1,K,4,I) = WA(I,3,1)*CR4+WA(I,3,2)*CI4
98 CH(2,K,4,I) = WA(I,3,1)*CI4-WA(I,3,2)*CR4
99 104 CONTINUE
100 105 CONTINUE
101 RETURN