y0(3)
๐ NAME ๐
y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl โ Bessel functions of the second kind, bestie. yes we're doing special functions today, get comfy ๐ซถ
๐ LIBRARY ๐
Math library (libm, -lm). so like. you will be linking -lm. it's giving "forgot the flag, spent an hour confused" energy, don't be that girl ๐
โจ SYNOPSIS โจ
#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);
๐ง Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
y0(), y1(), yn():
_XOPEN_SOURCE
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
y0f(), y0l(), y1f(), y1l(), ynf(), ynl():
_XOPEN_SOURCE >= 600
|| (_ISOC99_SOURCE && _XOPEN_SOURCE)
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
okay so the/* Since glibc 2.19: */and/* glibc <= 2.19: */bits are load-bearing โ they tell you which glibc era each alternative applies to. do not delete them, they're not decoration ๐
๐ธ DESCRIPTION ๐ธ
so here's the tea โ:
y0()andy1()hand you back Bessel functions ofxof the second kind, of orders 0 and 1 respectively.yn()hands you back the Bessel function ofxof the second kind of order n.
The value of x must be positive. that's not a suggestion, that's a requirement, periodt โ
The y0f(), y1f(), and ynf() gals are the versions that take and return float values. The y0l(), y1l(), and ynl() versions take and return long double values. same vibes, bigger/smaller pants ๐
๐ฎ RETURN VALUE ๐ฎ
On success, these functions return the appropriate Bessel value of the second kind for x. slay โจ
- If
xis a NaN, a NaN is returned. (garbage in, garbage out, iconic behaviour) - If
xis negative, a domain error occurs, and the functions return-HUGE_VAL,-HUGE_VALF, or-HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.) - If
xis 0.0, a pole error occurs, and the functions return-HUGE_VAL,-HUGE_VALF, or-HUGE_VALL, respectively. ๐ - If the result underflows, a range error occurs, and the functions return
0.0 - If the result overflows, a range error occurs, and the functions return
-HUGE_VAL,-HUGE_VALF, or-HUGE_VALL, respectively. (POSIX.1-2001 also allows a0.0return for this case.)
๐จ ERRORS ๐จ
See math_error(7) for information on how to determine whether an error has occurred when calling these functions. iykyk.
The following errors can occur:
- Domain error:
xis negative โerrnois set toEDOM. An invalid floating-point exception (FE_INVALID) is raised. - Pole error:
xis 0.0 โerrnois set toERANGEand anFE_DIVBYZEROexception is raised (but see BUGS). ๐ - Range error: result underflow โ
errnois set toERANGE. NoFE_UNDERFLOWexception is returned byfetestexcept(3)for this case. - Range error: result overflow โ
errnois set toERANGE(but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.
๐ ATTRIBUTES ๐
For an explanation of the terms used in this section, see attributes(7). (the girls that know, know)
y0(),y0f(),y0l()โ Attribute: Thread safety โ Value: MT-Safey1(),y1f(),y1l()โ Attribute: Thread safety โ Value: MT-Safeyn(),ynf(),ynl()โ Attribute: Thread safety โ Value: MT-Safe
all of them MT-Safe, every single one, no exceptions, main character energy ๐
๐ STANDARDS ๐
y0()y1()yn()โ POSIX.1-2008.
Others: BSD.
๐ฆ HISTORY ๐ฆ
y0()y1()yn()โ SVr4, 4.3BSD, POSIX.1-2001.
Others: BSD.
(the Others being the f and l variants, and yes they're BSD-flavoured ๐)
๐ BUGS ๐
bestie sit down, we gotta talk about the old days:
- Before glibc 2.19, these functions misdiagnosed pole errors:
errnowas set toEDOM, instead ofERANGEand noFE_DIVBYZEROexception was raised. not the vibe ๐ญ - Before glibc 2.17, did not set
errnofor "range error: result underflow". - In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (
FE_INVALID) when a domain error occurs.
๐ซถ SEE ALSO ๐ซถ
and that's the whole page, angel ๐ this one's from Linux man-pages 6.20, dated 2026-02-08 โ go forth and Bessel responsibly, ily, bye ๐โจ
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: Linux-man-pages-copyleft
- Copyright 1993, David Metcalfe <david@prism.demon.co.uk>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms