      function stud_xq(q) ! bernd berg mar 16 2002.
c student distribution qtiles.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      external stud_df
      common /parstud/ nf
c
      if(q.eq.half) then
        stud_xq=zero
      return
      endif
c
      x1=zero
      x2=zero
      if(q.gt.half) then
1       x2=x2+one
        if(stud_df(x2).le.q) go to 1
      else
2       x1=x1-one
        if(stud_df(x1).ge.q) go to 2
      endif
c
      stud_xq=fi1(stud_df,q,x1,x2)
c
      return
      end
