cffti1.f

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