Previous IDL Analyst Reference Guide: Special Functions Next

IMSL_BETA

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

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


Note
This routine requires an IDL Analyst 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 b(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, b(x, y), is defined as:

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

Example

Plot the beta function over [e, 1/4 + e] x [e, 1/4 + e] for e = 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

Figure 12-5: Real Beta Function Plot

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

  IDL Online Help (March 06, 2007)