Computes Bessel functions.
IEEE Math Library (libm.a)
or System V Math Library (libmsaa.a)
Bessel functions are used to compute wave variables, primarily in the field of communications.
The j0 subroutine and j1 subroutine return Bessel functions of x of the first kind, of orders 0 and 1, respectively. The jn subroutine returns the Bessel function of x of the first kind of order n.
The y0 subroutine and y1 subroutine return the Bessel functions of x of the second kind, of orders 0 and 1, respectively. The yn subroutine returns the Bessel function of x of the second kind of order n. The value of x must be positive.
cc j0.c -lm
Item | Description |
---|---|
x | Specifies some double-precision floating-point value. |
n | Specifies some integer value. |
When using libm.a (-lm), if x is negative, y0, y1, and yn return the value NaNQ. If x is 0, y0, y1, and yn return the value -HUGE_VAL.
When using libmsaa.a (-lmsaa), values too large in magnitude cause the functions j0, j1, y0, and y1 to return 0 and to set the errno global variable to ERANGE. In addition, a message indicating TLOSS error is printed on the standard error output.
Nonpositive values cause y0, y1, and yn to return the value -HUGE and to set the errno global variable to EDOM. In addition, a message indicating argument DOMAIN error is printed on the standard error output.
These error-handling procedures may be changed with the matherr subroutine when using libmsaa.a (-lmsaa).