Rate This Document
Findability
Accuracy
Completeness
Readability

y0

Compute the Bessel function of the second kind, of order 0. x > 0

Interface Definition

C interface:

float y0f(float x);

double y0(double x);

Parameters

Parameter

Type

Description

Input/Output

x

  • For y0f, x is of single-precision floating-point type.
  • For y0, x is of double-precision floating-point type.

Floating-point value of the input data.

Input

Return Value

  • The order-0 second-kind Bessel function value y is returned. y ∈ (–∞, +1).
  • If the input x is ±0, the return value is –∞.
  • If the input x is less than 0, the return value is NaN.
  • If the input x is +∞, the return value is 0.
  • If the input x is NaN, the return value is NaN.

Dependency

C: "km.h"

Example

C interface:

    double x1 = 0.0, x2 = -0.0, x3 = 1.5, x4 = -2.5;
    // special handing
    double a = INFINITY, b = -INFINITY, c = NAN;
    // print result
    printf("y0(0.0) = %.15f\n", y0(x1));
    printf("y0(-0.0) = %.15f\n", y0(x2));
    printf("y0(1.5) = %.15f\n", y0(x3));
    printf("y0(-2.5) = %.15f\n", y0(x4));
    printf("y0(INFINITY) = %.15f\n", y0(a));
    printf("y0(-INFINITY) = %.15f\n", y0(b));
    printf("y0(NAN) = %.15f\n", y0(c));

    /* 
     * y0(0.0) = -inf
     * y0(-0.0) = -inf
     * y0(1.5) = 0.382448923797759
     * y0(-2.5) = nan
     * y0(INFINITY) = 0.000000000000000
     * y0(-INFINITY) = nan
     * y0(NAN) = nan
     * 
     * */