anchor.diff:  C Returns the value n! as a floating-point number. 
   
         INTEGER n 
  +      DOUBLE PRECISION infinity
  +      PARAMETER (infinity = 1.7976931348623157d308)
   
         INTEGER j,ntop 
   C Table to be filled in only as required. 
  
positive.code: 
        INTEGER n 
        DOUBLE PRECISION a(100),gammln, pass_val 
        SAVE a 
  C Initialize the table to negative values. 
        DATA a/100*-1./ 
        pass_val = n + 1
        if (n.lt.0) write (*,*) 'negative factorial in factln' 
  C In range of the table. 
        if (n.le.99) then
  C If not already in the table, put it in.
  
negative.code:         endif
          
          if ((ptmp .LE. 0.0) .OR. (ptmp .GE. 1.0)) then
            if (ptmp .EQ. 0.0) then
              ptmp = 1E-10
            else if (ptmp .EQ. 1.0) then
              ptmp = 1.0-1E-10
            else
              like = -infinity
              RETURN
            endif
          endif
          
          like = like + x(i)*dlog(ptmp) + (ntmp-x(i))*dlog(1.-ptmp)
  