perm filename CPOLY2.F4[NET,GUE] blob sn#024374 filedate 1973-02-14 generic text, type T, neo UTF8
      function cpoly2(n,w)
      real cnm1,cnm2,w
      integer n
      if (n.lt.0) goto 120
      cpoly2=1.
      if (n.eq.0) goto 110
      cnm1=cpoly2
      cpoly2=2*w
      if (n.eq.1) goto 110
      do 100 i=0,n-2
      cnm2=cnm1
      cnm1=cpoly2
100   cpoly2=2*w*cnm1-cnm2
110   return
120   stop
      end