cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern void vsbyf (int n, float y[/* n+1 */], float x); extern void vsby (int n, double y[/* n+1 */], double x); extern void vsbyl (int n, long double y[/* n+1 */], long double x); extern void vsbyw (int n, __float80 y[/* n+1 */], __float80 x); extern void vsbyq (int n, __float128 y[/* n+1 */], __float128 x); extern void vsbyll (int n, long_long_double y[/* n+1 */], long_long_double x); extern void vsbydf (int n, decimal_float y[/* n+1 */], decimal_float x); extern void vsbyd (int n, decimal_double y[/* n+1 */], decimal_double x); extern void vsbydl (int n, decimal_long_double decimal_long_double y[/* n+1 */], decimal_long_double x); extern void vsbydll (int n, decimal_long_long_double decimal_long_long_double y[/* n+1 */], decimal_long_long_double x);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
This function is considerably faster than one that simply invokes sbyn(k,x) for each element.
The spherical Bessel functions provided by these software implementations are defined according to Chapter 9, Bessel Functions of Integer Order, of the Handbook of Mathematical Functions, edited by Milton Abramowitz and Irene A. Stegun, National Bureau of Standards Applied Mathematics Series #55, US Department of Commerce, Washington, DC (1964).
The recurrence relations used to generate sequences of Bessel function values necessarily lose accuracy near the uncountably-many zeros of the function, so only low absolute, rather than relative, accuracy can be expected. For high relative accuracy in the working precision, use the function for the next higher precision, if that is available.
If the argument x is negative, errno is set to EDOM, and a quiet NaN is returned in the elements of the output array.
If the argument x is zero, errno is set to ERANGE, and a negative Infinity (or the negative of the largest floating-point magnitude, if Infinity is not available) is returned in the elements of the output array.