Bessel functions of the first and second kind
#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 );
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. If it is negative, _matherr() is called to print a DOMAIN error message to stderr, set errno to EDOM, and return the value -HUGE_VAL. This error handling can be modified by using the matherr() routine.
the result of the desired Bessel function of x
#include <stdio.h>
#include <math.h>
void 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 );
}
WATCOM
Math