naginterfaces.library.specfun.bessel_​k0_​real

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

bessel_k0_real returns the value of the modified Bessel function .

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/s/s18acf.html

Parameters
xfloat

The argument of the function.

Returns
k0float

The value of the function at .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

is undefined and the function returns zero.

Notes

bessel_k0_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, , where denotes Euler’s constant. This approximation is used when is sufficiently small for the result to be correct to machine precision.

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