anchor.diff:  
         INTEGER n 
         DOUBLE PRECISION a(100),gammln, pass_val 
  +      DOUBLE PRECISION infinity
  +      PARAMETER (infinity = 1.7976931348623157d308)
  +      
         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' 
  +      if (n.lt.0) then
  +c        write (*,*) 'negative factorial in factln' 
  +        factln=-infinity
  +        return
  +      endif
   C In range of the table. 
         if (n.le.99) then
   C If not already in the table, put it in.
  
positive.code:         endif
          
          if ((ptmp .LE. 0.0) .OR. (ptmp .GE. 1.0)) then
            like = -infinity
            RETURN
          endif
          
          like = like + x(i)*dlog(ptmp) + (ntmp-x(i))*dlog(1.-ptmp)
  
negative.code:       DATA ntop,a(1)/0,1./
  
        if (n.lt.0) then 
  c        write (*,*) 'negative factorial in factrl' 
          factrl=-infinity
          return
        else if (n.le.ntop) then 
  C Already in table. 
          factrl=a(n+1) 
  