BETA Function

Evaluates the complete beta function.

Usage

result = BETA(x, y)

Input Parameters

x—First beta parameter. x must be positive.

y—Second beta parameter. y must be positive.

Returned Value

result—The value of the beta function b(x, y). If no result can be computed, then NaN is returned.

Input Keywords

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

Discussion

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

 

The beta function requires that x > 0 and y > 0. It underflows for large arguments.

Example

Evaluate the beta function b(0.5, 0.2).

x  =  0.5
y  =  0.2
ans  =  BETA(x, y)
PRINT, 'beta(', x, ',', y, ') =', ans
; PV-WAVE prints: beta( 0.500000,     0.200000) = 6.26865

Alert Errors

STAT_BETA_UNDERFLOWThe arguments must not be so large that the result underflows.

Fatal Errors

STAT_ZERO_ARG_OVERFLOWOne of the arguments is so close to zero that the result overflows.