      function chi2pdf_df(chi2) ! bernd berg jul 5 1999.
c chi2 per degree of freedom cumulative distribution function.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      common /chi2par/ nf
      a=half*nf
      x=half*nf*chi2
      chi2pdf_df=gamma_p(a,x)
      return
      end
