acosh(3)
π acosh(3) β the inverse hyperbolic cosine glow-up π
okay bestie, gather round, because today we're talking about acosh, acoshf, and acoshl from the acosh(3) manual page. yes that's the whole name of the page, it's giving "title card energy" and we're keeping it. this is the inverse hyperbolic cosine function and she is essential, no cap. π¦
β¨ NAME β¨
acosh, acoshf, acoshl β inverse hyperbolic cosine function, aka the math girlies who undo what cosh did π
π LIBRARY π
Math library (libm, -lm)
fr fr, if you forget the -lm at link time she will simply Not Be There. link the lib, bestie. π
π SYNOPSIS π
#include <math.h>
double acosh(double x);
float acoshf(float x);
long double acoshl(long double x);
πΈ Feature Test Macro Requirements for glibc (see feature_test_macros(7)): πΈ
acosh():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| _XOPEN_SOURCE >= 500
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
acoshf(), acoshl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
lowkey the_SVID_SOURCEthing is so retro-coded, and yes it's literally only for glibc<= 2.19, they said what they said. π°οΈ
π« DESCRIPTION π«
These functions calculate the inverse hyperbolic cosine of x; that is, the value whose hyperbolic cosine is x. it's the un-cosh. the reverse card. she looks at your x and says "what did I have to plug into cosh to get you??" and then tells you. iconic behaviour honestly π
π₯ RETURN VALUE π₯
- On success, these functions return the inverse hyperbolic cosine of
x. β - If
xis a NaN, a NaN is returned. π (NaN in, NaN out, the vibes stay consistent) - If
xis+1,+0is returned. π― - If
xis positive infinity, positive infinity is returned. βΎοΈ (infinity said "I'm gonna keep being infinity, actually") - If
xis less than1, a domain error occurs, and the functions return a NaN. π¨ like why would you even ask that, bestie,coshnever goes below1, she's just built different
π ERRORS π
See math_error(7) for information on how to determine whether an error has occurred when calling these functions. (aka: go read that page if you wanna vibe check your errno properly π«Ά)
The following errors can occur:
- Domain error:
xis less than1
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised. π©
π ATTRIBUTES π
For an explanation of the terms used in this section, see attributes(7).
acosh(),acoshf(),acoshl()β Thread safety: MT-Safe β
translation? all three of them can be called from multiple threads at the same time and they will not start drama. MT-Safe girlies. we love a low-maintenance queen πΈ
π STANDARDS π
C11, POSIX.1-2008.
π¦ HISTORY π¦
C99, POSIX.1-2001.
The variant returning double also conforms to SVr4, 4.3BSD. πΎ (yes bestie, this math is that old, she's been serving since before your parents were cool)
π SEE ALSO π
asinh(3), atanh(3), cacosh(3), cosh(3), sinh(3), tanh(3)
and that's the whole lore!! π this was the Linux man-pages 6.20 era, dated 2026-02-08, and honestly? she ate. go forth, compute your inverse hyperbolic cosines, stay MT-Safe, and remember: x < 1 is a domain error and we do NOT do that here. periodt π
β¨
π¦ 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