jn -- Bessel Function of the First Kind, Order n

SYNOPSIS

 #include <lcmath.h>

 double jn(int n, double x);
 

DESCRIPTION

jn computes the Bessel function of the first kind with order n of the value x. The CPU time required to compute the Bessel function increases with increasing values for n. For very large values of n, the time can be quite large.

RETURN VALUE

jn returns the Bessel function of the first kind with order n of the argument x, provided that this value is computable.

DIAGNOSTICS

If the magnitude of x is too large (|x| >= 6.7465e9), jn returns 0.0. In this case, a message indicating "total loss of significance" is also written to stderr (the standard error file).

If an error occurs in jn, the _matherr routine is called. You supply your own version of _matherr to suppress the diagnostic message or modify the value returned.

EXAMPLE

This example computes the Bessel function of the first kind, of order 7
at x = 5 using jn:
  #include <stdio.h>
  #include <lcmath.h>

  main()
  {
     double y;
      y = jn(7, 5.);
      printf("jn(7, 5.) = %lfn", y);
  }

 

RELATED FUNCTIONS

j0, j1, _matherr, y0, y1, yn

SEE ALSO

Mathematical Functions

Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.