Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / mradb5.f
blob1ed06cf428ce87ad14bd38253252664ffa5cd9e9
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE MRADB5 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2,
12 1 WA1,WA2,WA3,WA4)
13 REAL CC(IN1,IDO,5,L1) ,CH(IN2,IDO,L1,5),
14 1 WA1(IDO) ,WA2(IDO) ,WA3(IDO) ,WA4(IDO)
16 M1D = (M-1)*IM1+1
17 M2S = 1-IM2
18 ARG=2.*4.*ATAN(1.0)/5.
19 TR11=COS(ARG)
20 TI11=SIN(ARG)
21 TR12=COS(2.*ARG)
22 TI12=SIN(2.*ARG)
23 DO 101 K=1,L1
24 M2 = M2S
25 DO 1001 M1=1,M1D,IM1
26 M2 = M2+IM2
27 CH(M2,1,K,1) = CC(M1,1,1,K)+2.*CC(M1,IDO,2,K)+2.*CC(M1,IDO,4,K)
28 CH(M2,1,K,2) = (CC(M1,1,1,K)+TR11*2.*CC(M1,IDO,2,K)
29 1 +TR12*2.*CC(M1,IDO,4,K))-(TI11*2.*CC(M1,1,3,K)
30 1 +TI12*2.*CC(M1,1,5,K))
31 CH(M2,1,K,3) = (CC(M1,1,1,K)+TR12*2.*CC(M1,IDO,2,K)
32 1 +TR11*2.*CC(M1,IDO,4,K))-(TI12*2.*CC(M1,1,3,K)
33 1 -TI11*2.*CC(M1,1,5,K))
34 CH(M2,1,K,4) = (CC(M1,1,1,K)+TR12*2.*CC(M1,IDO,2,K)
35 1 +TR11*2.*CC(M1,IDO,4,K))+(TI12*2.*CC(M1,1,3,K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1,I-1,3,K)
112 1 -CC(M1,IC-1,2,K))+TI12*(CC(M1,I-1,5,K)-CC(M1,IC-1,4,K))))
113 CH(M2,I,K,5) = WA4(I-2)
114 1 *((CC(M1,I,1,K)+TR11*(CC(M1,I,3,K)-CC(M1,IC,2,K))
115 1 +TR12*(CC(M1,I,5,K)-CC(M1,IC,4,K)))-(TI11*(CC(M1,I-1,3,K)
116 1 -CC(M1,IC-1,2,K))+TI12*(CC(M1,I-1,5,K)-CC(M1,IC-1,4,K))))
117 1 +WA4(I-1)
118 1 *((CC(M1,I-1,1,K)+TR11*(CC(M1,I-1,3,K)+CC(M1,IC-1,2,K))
119 1 +TR12*(CC(M1,I-1,5,K)+CC(M1,IC-1,4,K)))+(TI11*(CC(M1,I,3,K)
120 1 +CC(M1,IC,2,K))+TI12*(CC(M1,I,5,K)+CC(M1,IC,4,K))))
121 1002 CONTINUE
122 102 CONTINUE
123 103 CONTINUE
124 RETURN