anchor.diff:    integer(int32), intent(in)  :: nc
     real(real64),   intent(out) :: estimate
     real(real64),   intent(out) :: err_estimate
  +  integer(int32), allocatable :: sparse_multip_frq(:)
  +  integer(int32), allocatable :: sparse_multip(:)
   
     if (size(counts) == 1) then 
        estimate = 0.0_real64
  
positive.code: subroutine dirichlet(n,counts,nc,alpha,estimate)
    ! posterior mean entropy (averaged over Dirichlet distribution) given alpha 
    use iso_fortran_env
    use dirichlet_mod, only: compute_multiplicities,dirichlet_finalize
    use dirichlet_mod, only: hdir
    implicit none
  
  
negative.code:   integer(int32), intent(in)  :: nc
    real(real64),   intent(in)  :: alpha
    real(real64),   intent(out) :: estimate
    integer(int32), allocatable :: sparse_multip_frq(:)
    integer(int32), allocatable :: sparse_multip(:)
  
    if (size(counts) == 1) then 
       estimate = 0.0_real64
       return
    end if
  
    call compute_multiplicities(counts, nc, sparse_multip_frq, sparse_multip)
  
    estimate = hdir(alpha)
  
    deallocate(sparse_multip_frq,sparse_multip)
  
  end subroutine dirichlet
  
  subroutine nsb(n,counts,nc,estimate,err_estimate)
    use iso_fortran_env
    use dirichlet_mod, only: compute_multiplicities
    use nsb_mod, only: hnsb
    use nsb_mod, only: compute_integration_range
    implicit none
  