function cnk_log = binomial_coef_log ( n, k )

%*****************************************************************************80
%
%% binomial_coef_log() computes the logarithm of the Binomial coefficient.
%
%  Discussion:
%
%    CNK_LOG = LOG ( C(N,K) ) = LOG ( N! / ( K! * (N-K)! ) ).
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 September 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, K, are the values of N and K.
%
%  Output:
%
%    real CNK_LOG, the logarithm of C(N,K).
%
  cnk_log = factorial_log ( n ) - factorial_log ( k ) - factorial_log ( n - k );

  return
end
