| 1 |
'\" t |
| 2 |
.\" Copyright 1993, David Metcalfe <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 6 |
.\" |
| 7 |
.TH y0 3 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \- |
| 10 |
Bessel functions of the second kind |
| 11 |
.SH LIBRARY |
| 12 |
Math library |
| 13 |
.RI ( libm ,\~ \-lm ) |
| 14 |
.SH SYNOPSIS |
| 15 |
.nf |
| 16 |
.B #include <math.h> |
| 17 |
.P |
| 18 |
.BI "double y0(double " x ); |
| 19 |
.BI "double y1(double " x ); |
| 20 |
.BI "double yn(int " n ", double " x ); |
| 21 |
.P |
| 22 |
.BI "float y0f(float " x ); |
| 23 |
.BI "float y1f(float " x ); |
| 24 |
.BI "float ynf(int " n ", float " x ); |
| 25 |
.P |
| 26 |
.BI "long double y0l(long double " x ); |
| 27 |
.BI "long double y1l(long double " x ); |
| 28 |
.BI "long double ynl(int " n ", long double " x ); |
| 29 |
.fi |
| 30 |
.P |
| 31 |
.RS -4 |
| 32 |
Feature Test Macro Requirements for glibc (see |
| 33 |
.BR feature_test_macros (7)): |
| 34 |
.RE |
| 35 |
.P |
| 36 |
.BR y0 (), |
| 37 |
.BR y1 (), |
| 38 |
.BR yn (): |
| 39 |
.nf |
| 40 |
_XOPEN_SOURCE |
| 41 |
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE |
| 42 |
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE |
| 43 |
.fi |
| 44 |
.P |
| 45 |
.BR y0f (), |
| 46 |
.BR y0l (), |
| 47 |
.BR y1f (), |
| 48 |
.BR y1l (), |
| 49 |
.BR ynf (), |
| 50 |
.BR ynl (): |
| 51 |
.nf |
| 52 |
_XOPEN_SOURCE >= 600 |
| 53 |
|| (_ISOC99_SOURCE && _XOPEN_SOURCE) |
| 54 |
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE |
| 55 |
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE |
| 56 |
.fi |
| 57 |
.SH DESCRIPTION |
| 58 |
The |
| 59 |
.BR y0 () |
| 60 |
and |
| 61 |
.BR y1 () |
| 62 |
functions return Bessel functions of |
| 63 |
.I x |
| 64 |
of the second kind of orders 0 and 1, respectively. |
| 65 |
The |
| 66 |
.BR yn () |
| 67 |
function |
| 68 |
returns the Bessel function of |
| 69 |
.I x |
| 70 |
of the second kind of order |
| 71 |
.IR n . |
| 72 |
.P |
| 73 |
The value of |
| 74 |
.I x |
| 75 |
must be positive. |
| 76 |
.P |
| 77 |
The |
| 78 |
.BR y0f (), |
| 79 |
.BR y1f (), |
| 80 |
and |
| 81 |
.BR ynf () |
| 82 |
functions are versions that take and return |
| 83 |
.I float |
| 84 |
values. |
| 85 |
The |
| 86 |
.BR y0l (), |
| 87 |
.BR y1l (), |
| 88 |
and |
| 89 |
.BR ynl () |
| 90 |
functions are versions that take and return |
| 91 |
.I "long double" |
| 92 |
values. |
| 93 |
.SH RETURN VALUE |
| 94 |
On success, these functions return the appropriate |
| 95 |
Bessel value of the second kind for |
| 96 |
.IR x . |
| 97 |
.P |
| 98 |
If |
| 99 |
.I x |
| 100 |
is a NaN, a NaN is returned. |
| 101 |
.P |
| 102 |
If |
| 103 |
.I x |
| 104 |
is negative, |
| 105 |
a domain error occurs, |
| 106 |
and the functions return |
| 107 |
.RB \- HUGE_VAL , |
| 108 |
.RB \- HUGE_VALF , |
| 109 |
or |
| 110 |
.RB \- HUGE_VALL , |
| 111 |
respectively. |
| 112 |
(POSIX.1-2001 also allows a NaN return for this case.) |
| 113 |
.P |
| 114 |
If |
| 115 |
.I x |
| 116 |
is 0.0, |
| 117 |
a pole error occurs, |
| 118 |
and the functions return |
| 119 |
.RB \- HUGE_VAL , |
| 120 |
.RB \- HUGE_VALF , |
| 121 |
or |
| 122 |
.RB \- HUGE_VALL , |
| 123 |
respectively. |
| 124 |
.P |
| 125 |
If the result underflows, |
| 126 |
a range error occurs, |
| 127 |
and the functions return 0.0 |
| 128 |
.P |
| 129 |
If the result overflows, |
| 130 |
a range error occurs, |
| 131 |
and the functions return |
| 132 |
.RB \- HUGE_VAL , |
| 133 |
.RB \- HUGE_VALF , |
| 134 |
or |
| 135 |
.RB \- HUGE_VALL , |
| 136 |
respectively. |
| 137 |
(POSIX.1-2001 also allows a 0.0 return for this case.) |
| 138 |
.SH ERRORS |
| 139 |
See |
| 140 |
.BR math_error (7) |
| 141 |
for information on how to determine whether an error has occurred |
| 142 |
when calling these functions. |
| 143 |
.P |
| 144 |
The following errors can occur: |
| 145 |
.TP |
| 146 |
Domain error: \f[I]x\f[] is negative |
| 147 |
.I errno |
| 148 |
is set to |
| 149 |
.BR EDOM . |
| 150 |
An invalid floating-point exception |
| 151 |
.RB ( FE_INVALID ) |
| 152 |
is raised. |
| 153 |
.TP |
| 154 |
Pole error: \f[I]x\f[] is 0.0 |
| 155 |
.\" Before POSIX.1-2001 TC2, this was (inconsistently) specified |
| 156 |
.\" as a range error. |
| 157 |
.I errno |
| 158 |
is set to |
| 159 |
.B ERANGE |
| 160 |
and an |
| 161 |
.B FE_DIVBYZERO |
| 162 |
exception is raised |
| 163 |
(but see BUGS). |
| 164 |
.TP |
| 165 |
Range error: result underflow |
| 166 |
.\" e.g., y0(1e33) on glibc 2.8/x86-32 |
| 167 |
.I errno |
| 168 |
is set to |
| 169 |
.BR ERANGE . |
| 170 |
No |
| 171 |
.B FE_UNDERFLOW |
| 172 |
exception is returned by |
| 173 |
.\" This is intended behavior |
| 174 |
.\" See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6806 |
| 175 |
.BR fetestexcept (3) |
| 176 |
for this case. |
| 177 |
.TP |
| 178 |
Range error: result overflow |
| 179 |
.\" e.g., yn(10, 1e-40) on glibc 2.8/x86-32 |
| 180 |
.I errno |
| 181 |
is set to |
| 182 |
.B ERANGE |
| 183 |
(but see BUGS). |
| 184 |
An overflow floating-point exception |
| 185 |
.RB ( FE_OVERFLOW ) |
| 186 |
is raised. |
| 187 |
.SH ATTRIBUTES |
| 188 |
For an explanation of the terms used in this section, see |
| 189 |
.BR attributes (7). |
| 190 |
.TS |
| 191 |
allbox; |
| 192 |
lbx lb lb |
| 193 |
l l l. |
| 194 |
Interface Attribute Value |
| 195 |
T{ |
| 196 |
.na |
| 197 |
.nh |
| 198 |
.BR y0 (), |
| 199 |
.BR y0f (), |
| 200 |
.BR y0l () |
| 201 |
T} Thread safety MT-Safe |
| 202 |
T{ |
| 203 |
.na |
| 204 |
.nh |
| 205 |
.BR y1 (), |
| 206 |
.BR y1f (), |
| 207 |
.BR y1l () |
| 208 |
T} Thread safety MT-Safe |
| 209 |
T{ |
| 210 |
.na |
| 211 |
.nh |
| 212 |
.BR yn (), |
| 213 |
.BR ynf (), |
| 214 |
.BR ynl () |
| 215 |
T} Thread safety MT-Safe |
| 216 |
.TE |
| 217 |
.SH STANDARDS |
| 218 |
.TP |
| 219 |
.BR y0 () |
| 220 |
.TQ |
| 221 |
.BR y1 () |
| 222 |
.TQ |
| 223 |
.BR yn () |
| 224 |
POSIX.1-2008. |
| 225 |
.TP |
| 226 |
Others: |
| 227 |
BSD. |
| 228 |
.SH HISTORY |
| 229 |
.TP |
| 230 |
.BR y0 () |
| 231 |
.TQ |
| 232 |
.BR y1 () |
| 233 |
.TQ |
| 234 |
.BR yn () |
| 235 |
SVr4, 4.3BSD, |
| 236 |
POSIX.1-2001. |
| 237 |
.TP |
| 238 |
Others: |
| 239 |
BSD. |
| 240 |
.SH BUGS |
| 241 |
Before glibc 2.19, |
| 242 |
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6807 |
| 243 |
these functions misdiagnosed pole errors: |
| 244 |
.I errno |
| 245 |
was set to |
| 246 |
.BR EDOM , |
| 247 |
instead of |
| 248 |
.B ERANGE |
| 249 |
and no |
| 250 |
.B FE_DIVBYZERO |
| 251 |
exception was raised. |
| 252 |
.P |
| 253 |
Before glibc 2.17, |
| 254 |
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6808 |
| 255 |
did not set |
| 256 |
.I errno |
| 257 |
for "range error: result underflow". |
| 258 |
.P |
| 259 |
In glibc 2.3.2 and earlier, |
| 260 |
.\" Actually, 2.3.2 is the earliest test result I have; so yet |
| 261 |
.\" to confirm if this error occurs only in glibc 2.3.2. |
| 262 |
these functions do not raise an invalid floating-point exception |
| 263 |
.RB ( FE_INVALID ) |
| 264 |
when a domain error occurs. |
| 265 |
.SH SEE ALSO |
| 266 |
.BR j0 (3) |