Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / mradf4.f
blob9fd7e3219b7d5ca1f422956d1a2a92991953ff75
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE MRADF4 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2,WA1,WA2,WA3)
12 REAL CC(IN1,IDO,L1,4) ,CH(IN2,IDO,4,L1) ,
13 1 WA1(IDO) ,WA2(IDO) ,WA3(IDO)
15 HSQT2=SQRT(2.)/2.
16 M1D = (M-1)*IM1+1
17 M2S = 1-IM2
18 DO 101 K=1,L1
19 M2 = M2S
20 DO 1001 M1=1,M1D,IM1
21 M2 = M2+IM2
22 CH(M2,1,1,K) = (CC(M1,1,K,2)+CC(M1,1,K,4))
23 1 +(CC(M1,1,K,1)+CC(M1,1,K,3))
24 CH(M2,IDO,4,K) = (CC(M1,1,K,1)+CC(M1,1,K,3))
25 1 -(CC(M1,1,K,2)+CC(M1,1,K,4))
26 CH(M2,IDO,2,K) = CC(M1,1,K,1)-CC(M1,1,K,3)
27 CH(M2,1,3,K) = CC(M1,1,K,4)-CC(M1,1,K,2)
28 1001 CONTINUE
29 101 CONTINUE
30 IF (IDO-2) 107,105,102
31 102 IDP2 = IDO+2
32 DO 104 K=1,L1
33 DO 103 I=3,IDO,2
34 IC = IDP2-I
35 M2 = M2S
36 DO 1003 M1=1,M1D,IM1
37 M2 = M2+IM2
38 CH(M2,I-1,1,K) = ((WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)*
39 1 CC(M1,I,K,2))+(WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)*
40 1 CC(M1,I,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