Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / share / fftpack5 / fortran / r1f4kf.f
blob46752d1dd56330ee68ae8cb66dd448ed70e72ee9
1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
3 C FFTPACK 5.0
5 C Authors: Paul N. Swarztrauber and Richard A. Valent
7 C $Id$
9 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
11 SUBROUTINE R1F4KF (IDO,L1,CC,IN1,CH,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 DO 101 K=1,L1
17 CH(1,1,1,K) = (CC(1,1,K,2)+CC(1,1,K,4))
18 1 +(CC(1,1,K,1)+CC(1,1,K,3))
19 CH(1,IDO,4,K) = (CC(1,1,K,1)+CC(1,1,K,3))
20 1 -(CC(1,1,K,2)+CC(1,1,K,4))
21 CH(1,IDO,2,K) = CC(1,1,K,1)-CC(1,1,K,3)
22 CH(1,1,3,K) = CC(1,1,K,4)-CC(1,1,K,2)
23 101 CONTINUE
24 IF (IDO-2) 107,105,102
25 102 IDP2 = IDO+2
26 DO 104 K=1,L1
27 DO 103 I=3,IDO,2
28 IC = IDP2-I
29 CH(1,I-1,1,K) = ((WA1(I-2)*CC(1,I-1,K,2)+WA1(I-1)*
30 1 CC(1,I,K,2))+(WA3(I-2)*CC(1,I-1,K,4)+WA3(I-1)*
31 1 CC(1,I,K,4)))+(CC(1,I-1,K,1)+(WA2(I-2)*CC(1,I-1,K,3)+
32 1 WA2(I-1)*CC(1,I,K,3)))
33 CH(1,IC-1,4,K) = (CC(1,I-1,K,1)+(WA2(I-2)*CC(1,I-1,K,3)+
34 1 WA2(I-1)*CC(1,I,K,3)))-((WA1(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