Evaluates the complete beta function.
#include <imsls.h>
float imsls_f_beta (float a, float b)
The type double procedure is imsls_d_beta.
float a
(Input)
First beta parameter. It must be positive.
float b
(Input)
Second beta parameter. It must be positive.
The value of the beta function β(a, b). If no result can be computed, then NaN is returned.
The beta function, β(a, b), is defined to be
Evaluate the beta function β(0.5, 0.2).
#include <imsls.h>
int main()
{
float x = 0.5;
float y = 0.2;
float ans;
ans = imsls_f_beta(x, y);
printf("beta(%f,%f) = %f\n", x, y, ans);
}
beta(0.500000,0.200000) = 6.268653
Figure 15- 1 Plot of β (x, b)
The beta function requires that a > 0 and b > 0. It underflows for large arguments.
IMSLS_BETA_UNDERFLOW The arguments must not be so large that the result underflows.
IMSLS_ZERO_ARG_OVERFLOW One of the arguments is so close to zero that the result overflows.