Bessel Functions
Returns the result of the desired Bessel function of the specified argument
#include <math.h>
double j0 (
double x);
double j1 (
double x);
double jn ( int n, double x);
double y0 (
double x);
double y1 (
double x);
double yn ( int n, double x);
The result of the desired Bessel function of the argument x is returned. For y0, y1, or yn, if x is negative the routine sets errno to EDOM, prints a DOMAIN error message to stderr, and returns -HUGE_VAL.
Functions j0, j1, and jn return Bessel functions of the first kind.
Functions y0, y1, and yn return Bessel functions of the second kind. The argument x must be positive.
#include <math.h> #include <stdio.h> main () { double x, y, z; x = j0( 2.4 ); y = y1( 1.58 ); z = jn( 3, 2.4 ); printf( "j0(2.4) = %f, y1(1.58) = %f\n", x, y ); printf( "jn(3,2.4) = %f\n", z ); }