SDDSlib
|
Provides a function to compute the Modified Bessel Function of the Second Kind K_{2/3}(z). More...
#include "mdb.h"
#include "constants.h"
#include <math.h>
Go to the source code of this file.
Macros | |
#define | A_LIM 10.1 |
#define | EPS1 1.0e-12 |
#define | EPS2 1.0e-8 |
#define | GAMMA_OF_NY 1.354117939426400463 |
#define | NY 2.0 / 3.0 |
Functions | |
double | k23 (double z) |
Compute the Modified Bessel Function of the Second Kind K_{2/3}(z). | |
Provides a function to compute the Modified Bessel Function of the Second Kind K_{2/3}(z).
This file implements k23(), which calculates the Modified Bessel Function K_{2/3}(z) over a range of input values. It uses a series expansion for smaller arguments and an asymptotic expansion for larger arguments, referencing Abramowitz & Stegun and based on Roger Dejus's original Fortran code k23.f.
Definition in file k23.c.
double k23 | ( | double | z | ) |
Compute the Modified Bessel Function of the Second Kind K_{2/3}(z).
This function calculates K_{2/3}(z) for inputs approximately in the range 0.0 < z < 60.0. For z < A_LIM, it applies a series expansion (Abramowitz & Stegun Eq. 9.6.2 and 9.6.10). For z ≥ A_LIM, it uses an asymptotic expansion (Eq. 9.7.2). The method is adapted from Roger Dejus’s code, taking into account precomputed gamma function values and ensuring numerical stability within specified tolerances (EPS1 and EPS2).
z | The input value for which K_{2/3}(z) is evaluated. |
Factorial of (-ny)
Definition at line 41 of file k23.c.