# naginterfaces.library.specfun.bessel_​k_​complex¶

naginterfaces.library.specfun.bessel_k_complex(fnu, z, n, scal)[source]

bessel_k_complex returns a sequence of values for the modified Bessel functions for complex , non-negative and , with an option for exponential scaling.

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

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/s/s18dcf.html

Parameters
fnufloat

, the order of the first member of the sequence of functions.

zcomplex

The argument of the functions.

nint

, the number of members required in the sequence .

scalstr, length 1

The scaling option.

The results are returned unscaled.

The results are returned scaled by the factor .

Returns
cycomplex, ndarray, shape

The required function values: contains , for .

nzint

The number of components of that are set to zero due to underflow. If and , elements are set to zero. If , simply states the number of underflows, and not which elements they are.

Raises
NagValueError
(errno )

On entry, .

(errno )

On entry, .

Constraint: .

(errno )

On entry, has an illegal value: .

(errno )

On entry, .

Constraint: .

(errno )

No computation because .

(errno )

No computation because is too large.

(errno )

No computation because .

(errno )

No computation because .

(errno )

No computation – algorithm termination condition not met.

Warns
NagAlgorithmicWarning
(errno )

Results lack precision because .

(errno )

Results lack precision because .

Notes

bessel_k_complex evaluates a sequence of values for the modified Bessel function , where is complex, , and is the real, non-negative order. The -member sequence is generated for orders , . Optionally, the sequence is scaled by the factor .

The function is derived from the function CBESK in Amos (1986).

Note: although the function may not be called with less than zero, for negative orders the formula may be used.

When is greater than , extra values of are computed using recurrence relations.

For very large or , argument reduction will cause total loss of accuracy, and so no computation is performed. For slightly smaller or , the computation is performed but results are accurate to less than half of machine precision. If is very small, near the machine underflow threshold, or is too large, there is a risk of overflow and so no computation is performed. In all the above cases, a warning is given by the function.

References

NIST Digital Library of Mathematical Functions

Amos, D E, 1986, Algorithm 644: A portable package for Bessel functions of a complex argument and non-negative order, ACM Trans. Math. Software (12), 265–273