Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / mradf5.f
blobc2f0bb27b79f0b843e6da08325551472add4c4a0
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE MRADF5 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2,
12 1 WA1,WA2,WA3,WA4)
13 REAL CC(IN1,IDO,L1,5) ,CH(IN2,IDO,5,L1) ,
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,1,K) = CC(M1,1,K,1)+(CC(M1,1,K,5)+CC(M1,1,K,2))+
28 1 (CC(M1,1,K,4)+CC(M1,1,K,3))
29 CH(M2,IDO,2,K) = CC(M1,1,K,1)+TR11*(CC(M1,1,K,5)+CC(M1,1,K,2))+
30 1 TR12*(CC(M1,1,K,4)+CC(M1,1,K,3))
31 CH(M2,1,3,K) = TI11*(CC(M1,1,K,5)-CC(M1,1,K,2))+TI12*
32 1 (CC(M1,1,K,4)-CC(M1,1,K,3))
33 CH(M2,IDO,4,K) = CC(M1,1,K,1)+TR12*(CC(M1,1,K,5)+CC(M1,1,K,2))+
34 1 TR11*(CC(M1,1,K,4)+CC(M1,1,K,3))
35 CH(M2,1,5,K) = TI12*(CC(M1,1,K,5)-CC(M1,1,K,2))-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