yn
Compute the Bessel function of the second kind, of order n. The input parameter x is a real number greater than 0.
Interface Definition
C interface:
float ynf(int n, float x);
double yn(int n, double x);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
n |
|
Computing order. |
Input |
x |
|
Floating-point value of the input data. |
Input |
Return Value
The result of rSign = ((n & 1) & nSign) * (-1) is returned, where nSign = n > 0?0:1.
- If the input x is less than 0, the return value is NaN.
- If the input x is 0, the return value is -inf*rSign.
- If the input x is inf, the return value is 0.
- If the input x is NaN, the return value is NaN.
Dependency
C: "km.h"
Example
C interface:
printf("yn(1, 0.0) = %.15f\n", yn(1, 0.0));
printf("yn(2, -0.0) = %.15f\n", yn(2, -0.0));
printf("yn(3, 1.5) = %.15f\n", yn(3, 1.5));
printf("yn(4, -2.5) = %.15f\n", yn(4, -2.5));
printf("yn(5, INFINITY) = %.15f\n", yn(5, INFINITY));
printf("yn(6, -INFINITY) = %.15f\n", yn(6, -INFINITY));
printf("yn(7, NAN) = %.15f\n", yn(7, NAN));
/**
* yn(1, 0.0) = -inf
* yn(2, -0.0) = -inf
* yn(3, 1.5) = -2.073541399060686
* yn(4, -2.5) = nan
* yn(5, INFINITY) = 0.000000000000000
* yn(6, -INFINITY) = nan
* yn(7, NAN) = nan
*/
Parent topic: Special Functions