Y0(3POSIX)
π Y0 β the Bessel tea, but make it POSIX π
okay bestie, so this is y0(3POSIX), straight out of the POSIX Programmer's Manual. buckle up, it's giving math, it's giving floating point, it's giving drama. π
β¨ PROLOG β¨
real talk first: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the deets on Linux behavior, iykyk), or honestly the interface may not be implemented on Linux at all. π
π¦ NAME π¦
y0, y1, yn β Bessel functions of the second kind. the second kind specifically. not the first. don't mix them up. π
πΈ 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 job. β¨
now here's the part that matters if you wanna catch errors like the main character you are: an application wishing to check for error situations should set errno to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these functions. then, on return, if errno is non-zero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has occurred. boom. vibe check complete. π₯
π RETURN VALUE π
upon successful completion, these functions shall return the relevant Bessel value of x of the second kind. slay.
but okay, the edge cases:
- 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. (zero is NOT the vibe here.) - 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:
π¨ 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. so like, no cap, they're just here to be here. π«Ά
π EXAMPLES π
None. not a single one. iconic of them honestly. π
β 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. they're not besties, they don't have to match, but one of them has to show up to the function. periodt. π
π§ RATIONALE π§
None.
π FUTURE DIRECTIONS π
None.
π₯ SEE ALSO π₯
feclearexcept()fetestexcept()isnan()j0()
and also: 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 .
okay that's the whole page bestie, mwah π β this lil masterpiece is brought to you by IEEE/The Open Group, 2017, and yeah, that's the Y0(3POSIX) energy. go compute some Bessel functions of the second kind and be gorgeous about it. πΈβ¨π¦
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms