      function f_xq(q) ! bernd berg aug 10 1998.
c calculates q-tile.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      external f_df
      common /parft/ nf1,nf2
c
      if(q.eq.half) then
        f_xq=one
        return
      endif
      x2=one+one/ten
      if(q.gt.half) then
        x1=one-one/ten
1       x2=x2+one
        if(f_df(x2).le.q) go to 1
      else
        x1=zero
      endif
c
      f_xq=fi1(f_df,q,x1,x2)
c
      return
      end
