Name

j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl, y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl
- Bessel functions

Library

libm.lib

Synopsis

  #include <math.h>
  double j0 (double x);
  float j0f (float x);
  long double j0l (long double x);
  double j1 (double x);
  float j1f (float x);
  long double j1l (long double x);
  double jn (int n, double x);
  float jnf (int n, float x);
  long double jnl (int n, long double x);
  double y0 (double x);
  float y0f (float x);
  long double y0l (long double x);
  double y1 (double x);
  float y1f (float x);
  long double y1l (long double x);
  double yn (int n, double x);
  float ynf (int n, float x);
  long double ynl (int n, long double x);

Return values

If these functions are successful, the computed value is returned.

Detailed description

The functions j0, j0f, j1 and j1f compute the Bessel function of the first kind of the order 0 and the order 1, respectively, for the real value x; the functions jn and jnf compute the Bessel function of the first kind of the integer order n for the real value x.

The functions y0, y0f, y1, and y1f compute the linearly independent Bessel function of the second kind of the order 0 and the order 1, respectively, for the positive real value x; the functions yn and ynf compute the Bessel function of the second kind for the integer order n for the positive real value x.

Here the long double version APIs are aliases the double version APIs. All APIs <Function>l behaves similiar to that of <Function>.


Examples

#include <math.h>
int main( )
{
   double x = 1.0;
   /*J0(), j0f() and j0l() */
   double y = j0( x );
   printf( "j0( %f) = %f\n", x, y );
   y = j0f( x );
   printf( "j0f( %f) = %f\n", x, y );
   y = j0l( x );
   printf( "j0l( %f) = %f\n\n", x, y );
   /*J1(), j1f() and j1l() */
   y = j1( x );
   printf( "j1( %f) = %f\n", x, y );
   y = j1f( x );
   printf( "j1f( %f) = %f\n", x, y );
   y = j1l( x );
   printf( "j1l( %f) = %f\n\n", x, y );
   /*jn(), jnf() and jnl() */
   y = jn( 3, x );
   printf( "jn( 2, %f) = %f\n", x, y );
   y = jnf( 1, x );
   printf( "jnf( 1, %f) = %f\n", x, y );
   y = jnl( 10, 0.75 );
   printf( "jnl(10, %f) = %f\n\n", 0.75, y );
   /*y0(), y0f() and y0l() */
   y = y0( x );
   printf( "y0( %f) = %f\n", x, y );
   y = y0f( x );
   printf( "y0f( %f) = %f\n", x, y );
   y = y0l( x );
   printf( "y0l( %f) = %f\n\n", x, y );
   /*y1(), y1f() and y1l() */
   y = y1( x );
   printf( "y1( %f) = %f\n", x, y );
   y = y1f( x );
   printf( "y1f( %f) = %f\n", x, y );
   y = y1l( x );
   printf( "y1l( %f) = %f\n\n", x, y );
   /*yn(), ynf() and ynl() */
   y = yn( 3, x );
   printf( "yn( 2, %f) = %f\n", x, y );
   y = ynf( 1, x );
   printf( "ynf( 1, %f) = %f\n", x, y );
   y = ynl( 10, 0.75 );
   printf( "ynl(10, %f) = %f\n\n", 0.75, y );
}

         

Output

j0( 1.000) = 0.76519768
j0f( 1.000) = 0.76519768
j0l( 1.000) = 0.76519768
j1 ( 1.000) = 0.4400505
j1f( 1.000) = 0.4400505
j1l( 1.000) = 0.4400505
jn ( 3, 1.000) = 0.0195633
jnf( 1, 1.000) = 0.4400505
jnl( 10, 0.75) = 0.1496212
y0 ( 1.000) = 0.0882569
y0f( 1.000) = 0.0882569
y0l( 1.000) = 0.0882569
y1 ( 1.000) = -0.7812128
y1f( 1.000) = -0.7812128
y1l( 1.000) = -0.7812128
yn ( 3, 1.000) = -5.8215176
ynf( 1, 1.000) = -0.781212
ynl( 10, 0.75) = -2133501638.9

         


See also

math

Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top