IMSL_BETA

Syntax | Return Value | Arguments | Keywords | Discussion | Example | Errors | Version History

The IMSL_BETA function evaluates the real beta function β(x, y).]

Note
This routine requires an IDL Advanced Math and Stats license. For more information, contact your ITT Visual Information Solutions sales or technical support representative.

Syntax

Result = IMSL_BETA(x, y [, /DOUBLE])

Return Value

The value of the beta function β(x, y). If no result can be computed, then NaN (Not a Number) is returned.

Arguments

x

First beta parameter. It must be positive.

y

Second beta parameter. It must be positive.

Keywords

DOUBLE

If present and nonzero, double precision is used.

Discussion

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

IMSL_BETA-13.jpg

requiring that x > 0 and y > 0. It underflows for large parameters.

Example

Plot the beta function over [ε, 1/4 + ε] x [ε, 1/4 + ε] for ε = 0.01. The results are shown in Figure 12-5.

x = 1e-2 + .25 * FINDGEN(25)/24 
y = x 
b = FLTARR(25, 25) 
FOR i = 0, 24 DO b(i, *) = IMSL_BETA(x(i), y) 
; Compute values of the beta function. 
SURFACE, b, x, y, XTitle = 'X', YTitle = 'Y', Az = 320, ZAxis = 2 
; Plot the computed values as a surface and rotate the plot. 

Figure 12-5: Real Beta Function Plot

special05.gif

Errors

Alert Errors

MATH_BETA_UNDERFLOW—Parameters must not be so large that the result underflows.

Fatal Errors

MATH_ZERO_ARG_OVERFLOW—One of the parameters is so close to zero that the result overflows.

Version History

6.4

Introduced