anchor.diff:      if (allocated(nk)) then
          if (alphabet_size > n_bins) then
             unobserved = alphabet_size - n_bins*1.0_float64
  -          if (minval(nk) < 1.e-3_float64) then
  +          if (minval(nk) ==  0) then
                k = minloc(nk, 1)
                zk(k) = zk(k) + unobserved
             else
  
positive.code:   implicit none
  
    integer, intent(in)  :: n
    real(float64), intent(in)    :: nk1(n)
    real(float64), intent(in)    :: zk1(n)
    real(float64), intent(in)    :: nc
    real(float64),   intent(out) :: estimate
    real(float64),   intent(out) :: err_estimate
  
negative.code: 
      call counts_reset()
  
      if (present(br)) then  ! multiplicities
         allocate(nk(size(ar)), stat=err)
         allocate(zk(size(br)), stat=err)
         nk = ar
         zk = br
      else
         xmax = maxval(ar)
         allocate(wrk(0:xmax), stat=err)
         wrk = 0
         u = 0
         do i = 1,ubound(ar, 1)
            x = ar(i)
            if (wrk(x) == 0) then
               u = u + 1
            end if
            wrk(x) = wrk(x) + 1
         end do
  
         allocate(nk(u), zk(u), stat=err)
  
         u = 0
         do i = 0, xmax
            x = wrk(i)
            if (x > 0) then
               u = u + 1
               nk(u) = i
               zk(u) = x
            end if
         end do
  
      end if
  
      n_data = sum(zk * nk)
      n_bins = sum(zk)
  