### TABLE OF CONTENTS

- 1. /besselK
- 1.1. besselK/BesselI0
- 1.2. besselK/BesselI1
- 1.3. besselK/BesselK0
- 1.4. besselK/BesselK1
- 1.5. besselK/BesselK2

## /besselK [ Modules ]

NAME

module **besselK**

PURPOSE

provide the 'modified Bessel functions of first kind', I_n, and the 'modified Bessel functions of second kind', K_n.

NOTES

- The expansions by Pavel Holoborodko are used, https://www.advanpix.com/2015/11/11/rational-approximations-for-the-modified-bessel-function-of-the-first-kind-i0-computations-double-precision/ (see for further references below at the definition of the fuction.) These expressions claim to be exact within one unit of machine precision, i.e. ~2e-16
- The series expansions given by Abramowitz&Stegun (chapter 9.8) only have single precission (~1e-7)
- K0 and K1 are imlemented explicitely, using own parametrization of I0 and I1. K2 is implemented by recursion.
- One should catch the case of x > 400, since then the exp results as NaN.
- One could think of implementing a second order Horner scheme in order to speed up the calculations of the polynomials. Here one splits the polynomial p(x) into the odd and even polynomials p_odd(y) and p_even(y) (with y=x^2) and returns p(x) = p_even + x*p_odd. see e.g.: J.-M. Muller, Elementary Functions. Algorithms and Implementation Birkhäuser / Springer, 2016

## besselK/BesselI0 [ Functions ]

[ Top ] [ besselK ] [ Functions ]

NAME

real function **BesselI0**(x)

PURPOSE

return the value I(0,x)

NOTES

## besselK/BesselI1 [ Functions ]

[ Top ] [ besselK ] [ Functions ]

NAME

real function **BesselI1**(x)

PURPOSE

return the value I(1,x)

NOTES

## besselK/BesselK0 [ Functions ]

[ Top ] [ besselK ] [ Functions ]

NAME

real function **BesselK0**(x)

PURPOSE

return the value K(0,x)

NOTES

## besselK/BesselK1 [ Functions ]

[ Top ] [ besselK ] [ Functions ]

NAME

real function **BesselK1**(x)

PURPOSE

return the value K(1,x)

NOTES

## besselK/BesselK2 [ Functions ]

[ Top ] [ besselK ] [ Functions ]

NAME

real function **BesselK2**(x)

PURPOSE

return the value K(2,x)