naginterfaces.library.specfun.beta_​log_​real

naginterfaces.library.specfun.beta_log_real(a, b)[source]

beta_log_real returns the value of the logarithm of the beta function, .

For full information please refer to the NAG Library document for s14cb

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/s/s14cbf.html

Parameters
afloat

The argument of the function.

bfloat

The argument of the function.

Returns
lbabfloat

The value of the logarithm of the beta function, .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Notes

beta_log_real calculates values for where is the beta function given by

or equivalently

and is the gamma function. Note that the beta function is symmetric, so that .

In order to efficiently obtain accurate results several methods are used depending on the parameters and .

Let and . Then:

for ,

where

,

and

.

for ,

for ,

for ,

for , is reduced to the interval by ;

for ,

for ,

for , is reduced to the interval ;

for ,

beta_log_real is derived from BETALN in DiDonato and Morris (1992).

References

DiDonato, A R and Morris, A H, 1992, Algorithm 708: Significant digit computation of the incomplete beta function ratios, ACM Trans. Math. Software (18), 360–373