      SUBROUTINE BFN(X,BF)
      implicit double precision (A-H,O-Z)
      include 'MOP6FILE'
      dimension BF(13)
C**********************************************************************
C
C     BINTGS FORMS THE "B" INTEGRALS FOR THE OVERLAP CALCULATION.
C
C**********************************************************************
      dimension FACT(17)
      save FACT
      data FACT/1.D0,2.D0,6.D0,24.D0,120.D0,720.D0,5040.D0,40320.D0,
     1  362880.D0,3628800.D0,39916800.D0,479001600.D0,6227020800.D0,
     2  8.71782912D10,1.307674368D12,2.092278989D13,3.556874281D14/
      K=12
      IO=0
      ABSX = ABS(X)
      if (ABSX.GT.3.D00) go to 40
      if (ABSX.LE.2.D00) go to 10
      LAST=15
      go to 60
   10 if (ABSX.LE.1.D00) go to 20
      LAST=12
      go to 60
   20 if (ABSX.LE.0.5D00) go to 30
      LAST=7
      go to 60
   30 if (ABSX.LE.1.D-6) go to 90
      LAST=6
      go to 60
   40 EXPX=EXP(X)
      EXPMX=1.D00/EXPX
      BF(1)=(EXPX-EXPMX)/X
      do 50 I=1,K
   50 BF(I+1)=(I*BF(I)+(-1.D00)**I*EXPX-EXPMX)/X
      go to 110
   60 do 80 I=IO,K
         Y=0.0D00
         do 70 M=IO,LAST
            XF=1.0D00
            if (M.NE.0) XF=FACT(M)
   70    Y=Y+(-X)**M*(2*MOD(M+I+1,2))/(XF*(M+I+1))
   80 BF(I+1)=Y
      go to 110
   90 do 100 I=IO,K
  100 BF(I+1)=(2*MOD(I+1,2))/(I+1.D0)
  110 continue
      return
C
      end
