naginterfaces.library.specfun.hyperg_confl_real¶
- naginterfaces.library.specfun.hyperg_confl_real(a, b, x)[source]¶
hyperg_confl_real
returns a value for the confluent hypergeometric function with real parameters and , and real argument . This function is sometimes also known as Kummer’s function .For full information please refer to the NAG Library document for s22ba
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/s/s22baf.html
- Parameters
- afloat
The parameter of the function.
- bfloat
The parameter of the function.
- xfloat
The argument of the function.
- Returns
- mfloat
The solution .
Note: if overflow occurs upon completion, as indicated by = 2, may be assumed to be too large to be representable. will be returned as , where is the largest representable real number (see
machine.real_largest
). The sign of should match the sign of . If overflow occurs during a subcalculation, as indicated by = 5, the sign may be incorrect, and the true value of may or may not be greater than . In either case it is advisable to subsequently usehyperg_confl_real_scaled()
.
- Raises
- NagValueError
- (errno )
All approximations have completed, and the final residual estimate indicates no accuracy can be guaranteed.
Relative residual .
- (errno )
Overflow occurred in a subcalculation of .
The answer may be completely incorrect.
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
is undefined when is zero or a negative integer.
- (errno )
On entry, .
Constraint: .
- Warns
- NagAlgorithmicWarning
- (errno )
Underflow occurred during the evaluation of .
The returned value may be inaccurate.
- (errno )
On completion, overflow occurred in the evaluation of .
- (errno )
All approximations have completed, and the final residual estimate indicates some precision may have been lost.
Relative residual .
- Notes
hyperg_confl_real
returns a value for the confluent hypergeometric function with real parameters and , and real argument . This function is unbounded or not uniquely defined for equal to zero or a negative integer.The associated function
hyperg_confl_real_scaled()
performs the same operations, but returns in the scaled form to allow calculations to be performed when is not representable as a single working precision number. It also accepts the parameters and as summations of an integer and a decimal fraction, giving higher accuracy when or are close to an integer. In such cases,hyperg_confl_real_scaled()
should be used when high accuracy is required.The confluent hypergeometric function is defined by the confluent series
where is the rising factorial of . is a solution to the second order ODE (Kummer’s Equation):
Given the parameters and argument , this function determines a set of safe values and selects an appropriate algorithm to accurately evaluate the functions . The result is then used to construct the solution to the original problem using, where necessary, recurrence relations and/or continuation.
Additionally, an artificial bound, is placed on the magnitudes of , and to minimize the occurrence of overflow in internal calculations. , where . It should, however, not be assumed that this function will produce an accurate result for all values of , and satisfying this criterion.
Please consult the NIST Digital Library of Mathematical Functions for a detailed discussion of the confluent 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