2.1.16.6.3.36 _yn

Description

Compute the Bessel function. The _y0, _y1, and _yn routines return Bessel functions of the second kind: orders 0, 1, and n, respectively.

Syntax

double _yn( int n, double x )

Parameters

n
[input] Integer order of Bessel function
x
[input] Floating-point value

Return

The _yn returns a Bessel function of x.

Examples

EX1

//This program illustrates Bessel functions.

#include <origin.h>

int test_Yn()
{
    double vv;
    
    vv = _yn( 0,0 );
    out_double("_yn(0,0)=", vv);            //output should be _yn(0,0)=--
    ASSERT( is_equal(vv, NANUM) );
    
    vv = _yn( 1,1 );
    out_double("_yn(1,1)=", vv);            //output should be _yn(1,1)=-0.78121
    ASSERT( is_equal(round(vv, 5), -0.78121) );
    
    return 1;
}

Remark

See Also

_y1

Header to Include

origin.h

Reference