%% Compute Natural Log of Beta Function
% Compute the natural logarithm of the beta function according to the value of X without directly computing the beta function.  beta(X,X) results in floating point arithmetic underflow.

X = 510;
betaln(X,X)

% Copyright 2012 The MathWorks, Inc.