C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
BESSEL.C
                                             Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
/* BESSEL.C illustrates Bessel functions including:
 *      _j0          _jn          _y0          _y1          _yn
 */
 
#include <math.h>
#include <stdio.h>
 
void main()
{
    double x = 2.387;
    int n = 3, c;
 
    printf( "Bessel functions for x = %f:\n", x );
    printf( "  Kind\t\tOrder\tFunction\tResult\n\n" );
    printf( "  First\t\t0\t_j0( x )\t\t%f\n", _j0( x ) );
    printf( "  First\t\t1\t_j1( x )\t\t%f\n", _j1( x ) );
    for( c = 2; c < 10; c++ )
        printf( "  First\t\t%d\t_jn( n, x )\t%f\n", c, _jn( c, x ) );
 
    printf( "  Second\t0\t_y0( x )\t\t%f\n", _y0( x ) );
    printf( "  Second\t1\t_y1( x )\t\t%f\n", _y1( x ) );
    for( c = 2; c < 10; c++ )
        printf( "  Second\t%d\t_yn( n, x )\t%f\n", c, _yn( c, x ) );
}
                                    -♦-