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