      real function pescv(tau)
c
c     this routine calculates escape probability for
c       continuum
c     inputs: optical depths-- tau, energy
c     author:  T. Kallman
c
      implicit none
c
      real tau
      real taubar,eps
c
      pescv=0.5
      return
c      if (e.lt.13.6) return
c     fudge because of too much case b
c      taubar=tau/200.
c      taubar=tau/5.
      taubar=tau*100.
      pescv=1./(taubar+1.)
c      pescv=expo(-taubar)
c     fudge because of numerical problem with large tau.
      eps=1.e-6
      pescv=max(pescv,eps)
      pescv=pescv/2.
c
      return
      end
