j0(3)
β¨ j0(3) β bestie edition β¨
okay so this is from the Library Functions Manual (that's the manual name btw, in case you were wondering) and it's all about Bessel functions of the first kind. stick with me, it's giving math but make it cute π
πΈ NAME πΈ
j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl β Bessel functions of the first kind
π LIBRARY π
Math library (libm, link it with -lm bestie, don't forget the -lm)
π SYNOPSIS π
so here's the tea, you gotta include the header first:
#include <math.h>
then the double girlies:
double j0(double x);
double j1(double x);
double jn(int n, double x);
the float versions (yes they get the f suffix, iconic):
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
and the long double ones with the lil l:
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);
π Feature Test Macro Requirements for glibc π
(and if you don't know what that means, go read feature_test_macros(7), no cap)
j0(), j1(), jn():
_XOPEN_SOURCE
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
j0f(), j0l(), j1f(), j1l(), jnf(), jnl():
_XOPEN_SOURCE >= 600
|| (_ISOC99_SOURCE && _XOPEN_SOURCE)
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
like. write that down. π
π DESCRIPTION π
okay so the actual lore:
j0()andj1()return Bessel functions ofxof the first kind, of orders 0 and 1, respectively. soj0is order zero,j1is order one. cute, matching numbers.jn()returns the Bessel function ofxof the first kind of ordern. you pick the order, she delivers.
and then the type side-quests:
j0f(),j1f(), andjnf()are the versions that take and returnfloatvalues.j0l(),j1l(), andjnl()are the versions that take and returnlong doublevalues.
same vibes, different precision. slay. β¨
π RETURN VALUE π
- On success, these functions return the appropriate Bessel value of the first kind for
x. π«Ά - If
xis a NaN, a NaN is returned. (garbage in, garbage out, but make it IEEE 754) - If
xis too large in magnitude, or the result underflows, a range error occurs, and the return value is0.
β οΈ underflow or humongousx= range error + you get a0back. know that. π
π₯ ERRORS π₯
wanna know if an error actually happened when you called these? go read math_error(7), she explains the whole β¨how to detectβ¨ thing.
The following errors can occur:
- Range error: result underflow, or
xis too large in magnitude βerrnois set toERANGE.
and also, important, no drama on the exception front:
These functions do not raise exceptions for fetestexcept(3).
ngl that's a whole mood. π
β ATTRIBUTES β
for what all these words even mean, attributes(7) has you covered bestie. here's the rundown (yes it was a table, i turned it into bullets, you're welcome):
j0(),j0f(),j0l()β Attribute: Thread safety β Value: MT-Safej1(),j1f(),j1l()β Attribute: Thread safety β Value: MT-Safejn(),jnf(),jnl()β Attribute: Thread safety β Value: MT-Safe
all MT-Safe, all the time. multithreading girlies we are FED. π
π STANDARDS π
j0()j1()jn()
POSIX.1-2008.
Others:
- BSD.
π¦ HISTORY π¦
j0()j1()jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
Others:
- BSD.
she's been around. veteran behavior. π
π BUGS π
okay this is the part where we hold hands:
There are errors of up to2e-16in the values returned byj0(),j1(), andjn()for values ofxbetween-8and8.
so like. tiny imprecision. 2e-16. real. not a drill. π
π«Ά SEE ALSO π«Ά
(her sibling. the other kind. iykyk)
and that's the whole page bestie!! π this one came from Linux man-pages 6.20, dated 2026-02-08, so you know it's fresh. go forth and compute your Bessel functions, you absolute main character β¨ππ¦
π¦ 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