function cpoly1(n,w) real cnm1,cnm2,w integer n if (n.lt.0) goto 120 cpoly1=1. if (n.eq.0) goto 110 cnm1=cpoly1 cpoly1=w if (n.eq.1) goto 110 do 100 i=0,n-2 cnm2=cnm1 cnm1=cpoly1 100 cpoly1=2*w*cnm1-cnm2 110 return 120 stop end