s14cpc calculates values for
, for arrays of arguments
and
, for
, where
is the beta function given by
or equivalently
and
is the gamma function. Note that the beta function is symmetric, so that
.
In order to efficiently obtain accurate results several methods are used depending on the parameters and .
for
,
where
- ,
- and
- ;
for
,
for
,
is reduced to the interval
by
;
s14cpc is derived from BETALN in
DiDonato and Morris (1992).
DiDonato A R and Morris A H (1992) Algorithm 708: Significant digit computation of the incomplete beta function ratios ACM Trans. Math. Software 18 360–373
-
1:
– Integer
Input
-
On entry: , the number of points.
Constraint:
.
-
2:
– const double
Input
-
On entry: the argument of the function, for .
Constraint:
, for .
-
3:
– const double
Input
-
On entry: the argument of the function, for .
Constraint:
, for .
-
4:
– double
Output
-
On exit: , the function values.
-
5:
– Integer
Output
-
On exit:
contains the error code for
and
, for
.
- No error.
- .
-
6:
– NagError *
Input/Output
-
The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
Background information to multithreading can be found in the
Multithreading documentation.
None.
This example reads values of
a and
b from a file, evaluates the function at each value of
and
and prints the results.