Go to the documentation of this file.00001 subroutine zffti1 (n,wa,ifac)
00002 implicit double precision (a-h,o-z)
00003 dimension wa(*) ,ifac(*) ,ntryh(4)
00004 data ntryh(1),ntryh(2),ntryh(3),ntryh(4)/3,4,2,5/
00005 nl = n
00006 nf = 0
00007 j = 0
00008 101 j = j+1
00009 if (j-4) 102,102,103
00010 102 ntry = ntryh(j)
00011 go to 104
00012 103 ntry = ntry+2
00013 104 nq = nl/ntry
00014 nr = nl-ntry*nq
00015 if (nr) 101,105,101
00016 105 nf = nf+1
00017 ifac(nf+2) = ntry
00018 nl = nq
00019 if (ntry .ne. 2) go to 107
00020 if (nf .eq. 1) go to 107
00021 do 106 i=2,nf
00022 ib = nf-i+2
00023 ifac(ib+2) = ifac(ib+1)
00024 106 continue
00025 ifac(3) = 2
00026 107 if (nl .ne. 1) go to 104
00027 ifac(1) = n
00028 ifac(2) = nf
00029 tpi = 6.28318530717959d0
00030 argh = tpi/dble(n)
00031 i = 2
00032 l1 = 1
00033 do 110 k1=1,nf
00034 ip = ifac(k1+2)
00035 ld = 0
00036 l2 = l1*ip
00037 ido = n/l2
00038 idot = ido+ido+2
00039 ipm = ip-1
00040 do 109 j=1,ipm
00041 i1 = i
00042 wa(i-1) = 1.
00043 wa(i) = 0.
00044 ld = ld+l1
00045 fi = 0.
00046 argld = dble(ld)*argh
00047 do 108 ii=4,idot,2
00048 i = i+2
00049 fi = fi+1.
00050 arg = fi*argld
00051 wa(i-1) = cos(arg)
00052 wa(i) = sin(arg)
00053 108 continue
00054 if (ip .le. 5) go to 109
00055 wa(i1-1) = wa(i-1)
00056 wa(i1) = wa(i)
00057 109 continue
00058 l1 = l2
00059 110 continue
00060 return
00061 end