2.1.16.6.3.31 _j0

Description

Compute the Bessel function. The _j0, _j1, and _jn routines return Bessel functions of the first kind: orders 0, 1, and n, respectively.

Syntax

double _j0( double x )

Parameters

x
[input] Floating-point value

Return

The _j0 returns a Bessel function of x.

Examples

EX1

//This program illustrates Bessel functions.

#include <origin.h>

int test_J0()
{
    double vv;
    
    vv = _j0( 0 );
    out_double( "_j0(0)=", vv );                //output should be _j0(0)=1
    ASSERT( is_equal(vv, 1) );
    
    vv = _j0(1.3);
    out_double( "_j0(1.3)=", vv );
    ASSERT( is_equal(round(vv,5), 0.62009) );    //output should be _j0(1.3)=0.62009
    ASSERT( is_equal(_j0(-2), _j0(2)) );
    
    return 1;
}

Remark

See Also

_j1

Header to Include

origin.h

Reference