Chapter 15: Utilities

log_beta

Evaluates the logarithm of the real beta function ln β(xy).

Synopsis

#include <imsls.h>

float imsls_f_log_beta (float x, float y)

The type double procedure is imsls_d_log_beta.

Required Arguments

float x   (Input)
Point at which the logarithm of the beta function is to be evaluated. It must be positive.

float y   (Input)
Point at which the logarithm of the beta function is to be evaluated. It must be positive.

Return Value

The value of the logarithm of the beta function β(xy).

Description

The beta function, β(xy), is defined to be

and imsls_f_log_beta returns ln β(xy).

The logarithm of the beta function requires that x > 0 and y > 0. It can overflow for very large arguments.

Warning Errors

IMSLS_X_IS_TOO_CLOSE_TO_NEG_1    The result is accurate to less than one precision because the expression x/(x + y) is too close to 1.

Example

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

#include <imsls.h>

 

int main()

{

    float       x = 0.5;

    float       y = 0.2;

    float       ans;

 

    ans = imsls_f_log_beta(x, y);

    printf("log beta(%f,%f) = %f\n", x, y, ans);

}

Output

log beta(0.500000,0.200000) = 1.835562


Visual Numerics, Inc.
Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260