Y0(3P)
π Y0(3P) β bestie, it's Bessel time π
okay so real talk, this page lives in the POSIX Programmer's Manual, section 3P. That's the whole vibe. It's giving "standardized, official, slay."
β οΈ PROLOG moment β listen up: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so go consult the corresponding Linux manual page for the details of Linux behavior), or the interface might not even be implemented on Linux at all. ikr. check first, bestie π
β¨ NAME β¨
y0, y1, yn β Bessel functions of the second kind π¦
πΈ SYNOPSIS πΈ
#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
π DESCRIPTION π
So the y0(), y1(), and yn() functions shall compute Bessel functions of x of the second kind, of orders 0, 1, and n, respectively. That's it, that's the whole job. no cap.
Now, if your app wants to be a responsible little main character and actually check for error situations, here's the move: set errno to zero and call feclearexcept(FE_ALL_EXCEPT) before you call these functions. Then on return, if errno is non-zero, or if fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero β boom, an error has occurred. π¨
π RETURN VALUE π
Upon successful completion, these functions shall return the relevant Bessel value of x of the second kind. iconic behavior.
- If
xisNaN,NaNshall be returned. π« - If the
xargument to these functions is negative,-HUGE_VALorNaNshall be returned, and a domain error may occur. π - If
xis0.0,-HUGE_VALshall be returned and a pole error may occur. π - If the correct result would cause underflow,
0.0shall be returned and a range error may occur. - If the correct result would cause overflow,
-HUGE_VALor0.0shall be returned and a range error may occur.
π₯ ERRORS π₯
These functions may fail if... (drama incoming)
Domain Error
The value of x is negative.
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno shall be set to [EDOM]. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the invalid floating-point exception shall be raised.
Pole Error
The value of x is zero.
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno shall be set to [ERANGE]. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the divide-by-zero floating-point exception shall be raised.
Range Error
The correct result would cause overflow.
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno shall be set to [ERANGE]. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the overflow floating-point exception shall be raised.
Range Error
The value of x is too large in magnitude, or the correct result would cause underflow.
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno shall be set to [ERANGE]. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the underflow floating-point exception shall be raised.
The following sections are informative. (i.e. the fun extras, not the rules-rules π)
π EXAMPLES π
None. literally nothing. empty. a void. π³οΈ
π§ APPLICATION USAGE π§
On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling & MATH_ERREXCEPT) are independent of each other β but at least one of them must be non-zero. so like, they don't text each other, but they both gotta show up. π«Ά
π RATIONALE π
None. π
β FUTURE DIRECTIONS β
None. the future is... also nothing. periodt.
π¦ SEE ALSO π¦
feclearexcept()fetestexcept()isnan()j0()
The Base Definitions volume of POSIX.1β2017, Section 4.20, Treatment of Error Conditions for Mathematical Functions, <math.h> π
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie π brought to you by IEEE/The Open Group, dated 2017, and we're out πβ¨ bye!!
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- 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-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms