anchor.diff:          endif
           
           if ((ptmp .LE. 0.0) .OR. (ptmp .GE. 1.0)) then
  -          like = -infinity
  -          RETURN
  +          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)
  
positive.code:       DATA ntop,a(1)/0,1./
  
        if (n.lt.0) then 
          write (*,*) 'negative factorial in factrl' 
        else if (n.le.ntop) then 
  C Already in table. 
          factrl=a(n+1) 
  
negative.code: 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. 
  