      function addln_cut(aln,bln) ! bernd berg, may 26 2001.
c given ln(a) and ln(b), the function returns ln(c) with c=a+b.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      parameter(cut_off=700*one) ! change with precision!
      abs_ln=abs(aln-bln)
      if(abs_ln.gt.cut_off) then
        addln_cut=max(aln,bln)
      else
        addln_cut=max(aln,bln)+log(one+exp(-abs_ln))
      end if
      return
      end
