perm filename PFIT.F4[NET,GUE] blob sn#041477 filedate 1973-05-11 generic text, type T, neo UTF8
      implicit double precision (a-h,o-z)
      dimension x(100),y(100),sigmay(100),a(10)
1     type 100
      accept 101,npts
      if (npts) 999,999,2
2     type 102
      accept 103,nterms
      type 104
      accept 105,mode
      do 10 i=1,npts
10    read (21,107) x(i),y(i),sigmay(i)
15    call polfit(x,y,sigmay,npts,nterms,mode,a,chisqr)
      type 200,chisqr
      do 30 i=1,nterms
30    type 201,i,a(i)
      type 203
999   stop
100   format(' number of points='$)
101   format(i)
102   format(' nterms='$)
103   format(i)
104   format(' mode='$)
105   format(i)
107   format(3d)
108   format('0input initial parameters:'/)
109   format(d)
110   format(' error='$)
200   format(' chisqr=',1pd20.8)
201   format(1x,i,1pd20.8)
203   format('1')
      end