anchor.diff:      deallocate(multip)
       
     end subroutine compute_multiplicities
  -
  -  subroutine dirichlet_finalize()
  -
  -    deallocate(sparse_multip_frq,sparse_multip)
  -
  -  end subroutine dirichlet_finalize
   
     pure real(real64) function log_fpxa(alpha) 
       ! log(p(x|a)) (log of) marginal probability of data given alpha
  
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)              :: alphabet_size
    integer(int32)              :: ndata
    integer(int32)              :: nfrq
  
  contains
  
    subroutine compute_multiplicities(counts, alphabet_size, sparse_multip_frq, sparse_multip)
      integer(int32), intent(in) :: counts(:)
      integer(int32), intent(in) :: alphabet_size
      integer(int32), intent(out) :: sparse_multip_frq(:)
      integer(int32), intent(out) :: sparse_multip(:)
  
      integer(int32)              :: nbins
      integer(int32)              :: i_,k_,ni_
  