1Y0(3) Linux Programmer's Manual Y0(3)
2
3
4
6 y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl - Bessel functions of the sec‐
7 ond kind
8
10 #include <math.h>
11
12 double y0(double x);
13 double y1(double x);
14 double yn(int n, double x);
15
16 float y0f(float x);
17 float y1f(float x);
18 float ynf(int n, float x);
19
20 long double y0l(long double x);
21 long double y1l(long double x);
22 long double ynl(int n, long double x);
23
24 Link with -lm.
25
26 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
27
28 y0(), y1(), yn():
29 _XOPEN_SOURCE
30 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
31 || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
32
33 y0f(), y0l(), y1f(), y1l(), ynf(), ynl():
34 _XOPEN_SOURCE >= 600
35 || (_ISOC99_SOURCE && _XOPEN_SOURCE)
36 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
37 || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
38
40 The y0() and y1() functions return Bessel functions of x of the second
41 kind of orders 0 and 1, respectively. The yn() function returns the
42 Bessel function of x of the second kind of order n.
43
44 The value of x must be positive.
45
46 The y0f(), y1f(), and ynf() functions are versions that take and return
47 float values. The y0l(), y1l(), and ynl() functions are versions that
48 take and return long double values.
49
51 On success, these functions return the appropriate Bessel value of the
52 second kind for x.
53
54 If x is a NaN, a NaN is returned.
55
56 If x is negative, a domain error occurs, and the functions return
57 -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also
58 allows a NaN return for this case.)
59
60 If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL,
61 -HUGE_VALF, or -HUGE_VALL, respectively.
62
63 If the result underflows, a range error occurs, and the functions re‐
64 turn 0.0
65
66 If the result overflows, a range error occurs, and the functions return
67 -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also
68 allows a 0.0 return for this case.)
69
71 See math_error(7) for information on how to determine whether an error
72 has occurred when calling these functions.
73
74 The following errors can occur:
75
76 Domain error: x is negative
77 errno is set to EDOM. An invalid floating-point exception
78 (FE_INVALID) is raised.
79
80 Pole error: x is 0.0
81 errno is set to ERANGE and an FE_DIVBYZERO exception is raised
82 (but see BUGS).
83
84 Range error: result underflow
85 errno is set to ERANGE. No FE_UNDERFLOW exception is returned
86 by fetestexcept(3) for this case.
87
88 Range error: result overflow
89 errno is set to ERANGE (but see BUGS). An overflow floating-
90 point exception (FE_OVERFLOW) is raised.
91
93 For an explanation of the terms used in this section, see at‐
94 tributes(7).
95
96 ┌────────────────────────────────────────────┬───────────────┬─────────┐
97 │Interface │ Attribute │ Value │
98 ├────────────────────────────────────────────┼───────────────┼─────────┤
99 │y0(), y0f(), y0l() │ Thread safety │ MT-Safe │
100 ├────────────────────────────────────────────┼───────────────┼─────────┤
101 │y1(), y1f(), y1l() │ Thread safety │ MT-Safe │
102 ├────────────────────────────────────────────┼───────────────┼─────────┤
103 │yn(), ynf(), ynl() │ Thread safety │ MT-Safe │
104 └────────────────────────────────────────────┴───────────────┴─────────┘
105
107 The functions returning double conform to SVr4, 4.3BSD, POSIX.1-2001,
108 POSIX.1-2008. The others are nonstandard functions that also exist on
109 the BSDs.
110
112 Before glibc 2.19, these functions misdiagnosed pole errors: errno was
113 set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was
114 raised.
115
116 Before glibc 2.17, did not set errno for "range error: result under‐
117 flow".
118
119 In glibc version 2.3.2 and earlier, these functions do not raise an in‐
120 valid floating-point exception (FE_INVALID) when a domain error occurs.
121
123 j0(3)
124
126 This page is part of release 5.13 of the Linux man-pages project. A
127 description of the project, information about reporting bugs, and the
128 latest version of this page, can be found at
129 https://www.kernel.org/doc/man-pages/.
130
131
132
133 2021-03-22 Y0(3)