anchor.diff:  
   c Multinomial log-likelihood function     
   c Updated 12/02/2007 DH. N-D still buggy.
  +c Fixed 22/11/2007 CF
   
   cf2py integer dimension(nx,k),intent(in) :: x
   cf2py integer dimension(nn), intent(in) :: n
  
positive.code:           endif
            
            like = like + x(j,i)*dlog(p_tmp(i)) - factln(x(j,i))
  
          enddo
          like = like + factln(n_tmp)
        enddo
        RETURN
  
negative.code:           RETURN
          endif
          
          sumx = 0
          sump = 0.0
          do i=1,k
            if ((x(j,i) .LT. 0) .OR. (p_tmp(i) .LT. 1E-10)) then
              like = -infinity
  