naginterfaces.library.specfun.bessel_k1_real_vector¶
- naginterfaces.library.specfun.bessel_k1_real_vector(x)[source]¶
bessel_k1_real_vector
returns an array of values of the modified Bessel function .For full information please refer to the NAG Library document for s18ar
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/s/s18arf.html
- Parameters
- xfloat, array-like, shape
The argument of the function, for .
- Returns
- ffloat, ndarray, shape
, the function values.
- ivalidint, ndarray, shape
contains the error code for , for .
No error.
, is undefined. contains .
is too small, there is a danger of overflow. contains zero. The threshold value is the same as for = 2 in
bessel_k1_real()
.
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- Warns
- NagAlgorithmicWarning
- (errno )
On entry, at least one value of was invalid.
Check for more information.
- Notes
bessel_k1_real_vector
evaluates an approximation to the modified Bessel function of the second kind for an array of arguments , for .Note: is undefined for and the function will fail for such arguments.
The function is based on five Chebyshev expansions:
For ,
For ,
For ,
For ,
For near zero, . This approximation is used when is sufficiently small for the result to be correct to machine precision. For very small it is impossible to calculate without overflow and the function must fail.
For large , where there is a danger of underflow due to the smallness of , the result is set exactly to zero.
- References
NIST Digital Library of Mathematical Functions