Bessel functions of the first kind
#include <math.h> double j0( double x ); double j1( double x ); double jn( int n, double x );
Functions j0(), j1(), and jn() return Bessel functions of the first 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
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |
errno, matherr(), y0(), y1(), yn()