function value = i4_choose_log ( n, k )

%*****************************************************************************80
%
%% I4_CHOOSE_LOG computes the logarithm of the Binomial coefficient.
%
%  Discussion:
%
%    LOG ( C(N,K) ) = LOG ( N! / ( K! * (N-K)! ) ).
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    06 April 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, K, are the values of N and K.
%
%    Output, real VALUE, the logarithm of C(N,K).
%
  value = ...
      gammaln ( n + 1 ) ...
    - gammaln ( k + 1 ) ...
    - gammaln ( n - k + 1 );

  return
end
