perm filename PH9.F4[NET,GUE] blob sn#028808 filedate 1973-03-12 generic text, type T, neo UTF8
      common /pfit/nterms,a,chisqr
      common /fit/x,y,sigmay,npts,mode
      double precision x,y,sigmay,a,chisqr
      integer npts,mode
      dimension x(50),y(50),sigmay(50),a(10)
1     type 100
      accept 101,npts
      if (npts.eq.0) goto 999
      type 99
      accept 101,nterms
99    format(' number of terms = '$)
      type 102
      accept103,mode
      type 104
      do 10 i=1,npts
10    accept 105,x(i),y(i),sigmay(i)
      call polfit
      do 800 i=1,nterms
800   type 200,a(i)
      type 200,chisqr
200   format(1x,1pd20.5)
      type 203
      goto 1
999   stop
100   format(' number of points='$)
101   format(i)
102   format(' mode='$)
103   format(i)
104   format('0input data:'/)
105   format(3d)
203   format('1')
      end