# naginterfaces.library.specfun.bessel_​k1_​real¶

naginterfaces.library.specfun.bessel_k1_real(x)[source]

bessel_k1_real returns the value of the modified Bessel function .

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

Parameters
xfloat

The argument of the function.

Returns
k1float

The value of the function at .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

is undefined and the function returns zero.

Warns
NagAlgorithmicWarning
(errno )

On entry, .

Constraint: .

is too small, there is a danger of overflow and the function returns approximately the largest representable value.

Notes

bessel_k1_real evaluates an approximation to the modified Bessel function of the second kind .

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 on some machines, 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