j0
Compute the Bessel function of the first kind, of order 0.
Interface Definition
C interface:
float j0f(float x);
double j0(double x);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
x |
|
Floating-point value of the input data |
Input |
Return Value
- The order-0 first-kind Bessel function value y (y ∈ (–1, +1]) is returned. The function is an even function
- If the input x is ±0, the return value is 1.
- If the input x is ±∞, the return value is 0.
- If the input x is NaN, the return value is NaN.
Dependencies
C: "km.h"
Examples
C interface:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | double x1 = 0.0, x2 = -0.0, x3 = 1.5, x4 = -2.5; // special handling double a = INFINITY, b = -INFINITY, c = NAN; // print result printf("j0(0.0) = %.15f\n", j0(x1)); printf("j0(-0.0) = %.15f\n", j0(x2)); printf("j0(1.5) = %.15f\n", j0(x3)); printf("j0(-2.5) = %.15f\n", j0(x4)); printf("j0(INFINITY) = %.15f\n", j0(a)); printf("j0(-INFINITY) = %.15f\n", j0(b)); printf("j0(NAN) = %.15f\n", j0(c)); /* * j0(0.0) = 1.000000000000000 * j0(-0.0) = 1.000000000000000 * j0(1.5) = 0.511827671735918 * j0(-2.5) = -0.048383776468198 * j0(INFINITY) = 0.000000000000000 * j0(-INFINITY) = 0.000000000000000 * j0(NAN) = nan * * */ |
Parent topic: Special Functions