LNBETA Function

Evaluates the logarithm of the real beta function ln b(x, y).

Usage

result = LNBETA(x, y)

Input Parameters

x—First argument of the beta function. It must be positive.

y—Second argument of the beta function. It must be positive.

Returned Value

result—The value of the logarithm of the beta function b(x, y).

Input Keywords

Double—If present and nonzero, double precision is used.

Discussion

The beta function, b(x, y), is defined as:

 

and LNBETA returns ln b(x, y). The logarithm of the beta function requires that x > 0 and y > 0. It can overflow for very large parameters.

Example

Evaluate the log of the beta function ln b (0.5, 0.2).

PM, LNBETA(.5, .2) ; PV-WAVE prints: 1.83556

Warning Errors

MATH_X_IS_TOO_CLOSE_TO_NEG_1—Result is accurate to less than one precision because the expression –x / (x + y) is too close to –1.