BETA Function
Evaluates the real beta function β(x, y).
Usage
result = BETA(x, y)
Input Parameters
x—First beta parameter. It must be positive.
y—Second beta parameter. It must be positive.
Returned Value
result—The value of the beta function β(x, y). If no result can be computed, then NaN (Not a Number) is returned.
Input Keywords
Double—If present and nonzero, double precision is used.
Discussion
The beta function, β(x, y), is defined as:
requiring that x > 0 and y > 0. It underflows for large parameters.
Example
Plot the beta function over [
ε, 1/4 +
ε] × [
ε, 1/4 +
ε] for
ε = 0.01. The results are shown in
Figure 10-3: Real Beta Function Plot.
x = 1e-2 + .25 * FINDGEN(25)/24
y = x
b = FLTARR(25, 25)
; Compute values of the beta function.
FOR i=0L, 24 DO b(i, *) = BETA(x(i), y)
; Plot the computed values as a surface and rotate the plot.
SURFACE, b, x, y, XTitle = 'X', YTitle = 'Y', Az = 320, ZAxis = 2
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.