naginterfaces.library.specfun.hyperg_​gauss_​real_​scaled

naginterfaces.library.specfun.hyperg_gauss_real_scaled(ani, adr, bni, bdr, cni, cdr, x)[source]

hyperg_gauss_real_scaled returns a value for the Gauss hypergeometric function for real parameters and , and real argument . The result is returned in the scaled form .

For full information please refer to the NAG Library document for s22bf

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/s/s22bff.html

Parameters
anifloat

, the nearest integer to , satisfying .

adrfloat

, the signed decimal remainder satisfying and .

bnifloat

, the nearest integer to , satisfying .

bdrfloat

, the signed decimal remainder satisfying and .

cnifloat

, the nearest integer to , satisfying .

cdrfloat

, the signed decimal remainder satisfying and .

xfloat

The argument .

Returns
frffloat

, the scaled real component of the solution satisfying , i.e., . See Further Comments for the behaviour of when a finite or non-finite answer is returned.

scfint

, the scaling power of two, satisfying , i.e., . See Further Comments for the behaviour of when a non-finite answer is returned.

Raises
NagValueError
(errno )

All approximations have completed, and the final residual estimate indicates no accuracy can be guaranteed.

.

(errno )

On entry, , , .

is infinite in the case .

(errno )

Overflow occurred in a subcalculation of . The answer may be completely incorrect.

(errno )

An internal calculation has resulted in an undefined result.

(errno )

On entry, does not satisfy .

(errno )

is non-integral.

On entry, .

Constraint: .

(errno )

On entry, does not satisfy .

(errno )

On entry, does not satisfy .

(errno )

is non-integral.

On entry, .

Constraint: .

(errno )

On entry, does not satisfy .

(errno )

On entry, does not satisfy .

(errno )

On entry, .

is undefined when is zero or a negative integer.

(errno )

is non-integral.

On entry, .

Constraint: .

(errno )

On entry, does not satisfy .

(errno )

On entry, does not satisfy .

(errno )

On entry, .

In general, is not real valued when .

Warns
NagAlgorithmicWarning
(errno )

Underflow occurred during the evaluation of . The returned value may be inaccurate.

(errno )

All approximations have completed, and the final residual estimate indicates some precision may have been lost.

.

(errno )

On completion, overflow occurred in the evaluation of .

Notes

hyperg_gauss_real_scaled returns a value for the Gauss hypergeometric function for real parameters , and , and for real argument .

The Gauss hypergeometric function is a solution to the hypergeometric differential equation,

For , it may be defined by the Gauss series,

where is the rising factorial of . is undefined for or a negative integer.

For , the series is absolutely convergent and is finite.

For , linear transformations of the form,

exist, where , . and are real valued functions of the parameters and argument, typically involving products of gamma functions. When these are degenerate, finite limiting cases exist. Hence for , is defined by analytic continuation, and for , is real and finite.

For , the following apply:

If , , and hence is finite. Solutions also exist for the degenerate cases where or are negative integers or zero.

If , is infinite, and the sign of is determinable as approaches from below.

In the complex plane, the principal branch of is taken along the real axis from increasing. is multivalued along this branch, and for real parameters and is typically not real valued. As such, this function will not compute a solution when .

The solution strategy used by this function is primarily dependent upon the value of the argument . Once trivial cases and the case are eliminated, this proceeds as follows.

For , sets of safe parameters are determined, such that the values of required for an appropriate transformation of the type (3) may be calculated either directly or using recurrence relations from the solutions of . If is positive, then only transformations with will be used, implying only will be required, with the transformed argument . If is negative, in some cases a transformation with will be used, with the argument . The function then cycles through these sets until acceptable solutions are generated. If no computation produces an accurate answer, the least inaccurate answer is selected to complete the computation. See Accuracy.

For , an identical approach is first used with the argument . Should this fail, a linear transformation resulting in both transformed arguments satisfying is employed, and the above strategy for is utilized on both components. Further transformations in these sub-computations are however, limited to single terms with no argument transformation.

For , a linear transformation mapping the argument to the interval is first employed. The strategy for is then used on each component, including possible further two term transforms. To avoid some degenerate cases, a transform mapping the argument to may also be used.

For improved precision in the final result, this function accepts and split into an integral and a decimal fractional component. Specifically, , where and is integral. The other parameters and are similarly deconstructed.

In addition to the above restrictions on and , an artificial bound, arbnd, is placed on the magnitudes of and to minimize the occurrence of overflow in internal calculations, particularly those involving real to integer conversions. , where is the largest machine integer (see machine.integer_max). It should however, not be assumed that this function will produce accurate answers for all values of and satisfying this criterion.

This function also tests for non-finite values of the parameters and argument on entry, and assigns non-finite values upon completion if appropriate. See Further Comments and submodule ieee.

Please consult the NIST Digital Library of Mathematical Functions for a detailed discussion of the Gauss hypergeometric function including special cases, transformations, relations and asymptotic approximations.

References

NIST Digital Library of Mathematical Functions

Pearson, J, 2009, Computation of hypergeometric functions, MSc Dissertation, Mathematical Institute, University of Oxford