sinh(3)
π sinh(3) β hyperbolic sine but make it iconic π
okay bestie, welcome to the Library Functions Manual page for sinh(3) β yes that's the section 3 one, the math-y one, not some other imposter. sit down, grab a boba, we're doing hyperbolics. π¦
β¨ NAME β¨
sinh, sinhf, sinhl β the hyperbolic sine function, and its float-y little siblings πΈ
β¨ LIBRARY β¨
Math library (libm, link it with -lm β yes you have to, no it's not optional, we've all cried about it) π
β¨ SYNOPSIS β¨
#include <math.h>
double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);
π Feature Test Macro Requirements for glibc (peep feature_test_macros(7) for the lore)
sinhf(), sinhl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
like, define one of these babies or the functions will simply not show up. it's giving gatekeeping bestie π
β¨ DESCRIPTION β¨
These functions return the hyperbolic sine of x, which is mathematically defined as:
sinh(x) = (exp(x) - exp(-x)) / 2
that's it. that's the whole vibe. the difference of the exponentials, split straight down the middle. math ate and left no crumbs π
β¨ RETURN VALUE β¨
- On success, you get the hyperbolic sine of x. slay. β¨
- If x is a NaN, you get a NaN back. NaN in, NaN out, no thoughts, head empty π«Ά
- If x is
+0(-0), you get+0(-0) back. it preserves the sign, respectful king behavior π - If x is positive infinity (negative infinity), you get positive infinity (negative infinity) back. matching energy fr fr π
- If the result overflows, a range error happens, and the functions return
HUGE_VAL,HUGE_VALF, orHUGE_VALLrespectively β all with the same sign as x. so it goes out loud, not quietly. π₯
β¨ ERRORS β¨
Run, don't walk, to math_error(7) for the whole "how do I even know if an error happened" tutorial, bestie.
The errors that can occur:
- Range error: result overflow β
errnogets set toERANGE, and an overflow floating-point exception (FE_OVERFLOW) is raised. that's it, that's the error. π¨
β¨ ATTRIBUTES β¨
For what all these words even mean, see attributes(7). Basically:
sinh(),sinhf(),sinhl()β Thread safety:MT-Safe. no cap, you can call these from multiple threads, they're chill like that π§
β¨ STANDARDS β¨
C11, POSIX.1-2008. certified, licensed, official, iconic π
β¨ HISTORY β¨
C99, POSIX.1-2001. ancient history bestie, but like, in a cute way.
The double-returning variant also conforms to SVr4, 4.3BSD, C89. it's been everywhere, it's a legend π
β¨ SEE ALSO β¨
acosh(3), asinh(3), atanh(3), cosh(3), csinh(3), tanh(3) β the whole hyperbolic friend group, they roll deep π
that's the whole page bestie, you're officially a hyperbolic sine expert π
source check: this is Linux man-pages 6.20, dated 2026-02-08, for sinh(3). go forth and compute, and remember: -lm. always. ππ«Άβ¨
π¦ 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