beta

Computes the beta function for parameters a and b.

The beta function is defined as gamma(a) * gamma(b) / gamma(a + b). Computed as the exponential of lnBeta.

Example:

beta(1.0, 1.0) // 1.0
beta(0.5, 0.5) // 3.1415... (pi)

Return

the value of beta(a, b).

Parameters

a

the first shape parameter. Must be positive.

b

the second shape parameter. Must be positive.