asin(3)
โจ asin(3) โ the arc sine bestie โจ
okay so real talk, this is asin from section 3 of the Linux man-pages, aka the arc sine function, and it's about to be your new fave trig girlie, no cap ๐
๐ NAME ๐
asin, asinf, asinl โ arc sine function, periodt โจ
๐ LIBRARY ๐
Math library (libm, link it with -lm) ๐งฎ
bestie if you forget the -lm the linker WILL humble you, iykyk ๐ญ
๐ธ SYNOPSIS ๐ธ
#include <math.h>
double asin(double x);
float asinf(float x);
long double asinl(long double x);
๐ฆ Feature Test Macro Requirements for glibc (see feature_test_macros(7)) ๐ฆ
like, if you want asinf() and asinl() to even exist, you gotta define these, bestie:
asinf(), asinl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
๐ DESCRIPTION ๐
So these functions calculate the principal value of the arc sine of x โ which is literally just "the value whose sine is x". It's giving undo-button for sin(), fr fr ๐
๐ RETURN VALUE ๐
okay so on success, these functions return the principal value of the arc sine of x in radians, and the return value lives in the range [-pi/2, pi/2]. iconic range, no notes ๐
- If
xis a NaN, a NaN is returned. (NaN in, NaN out, the vibes stay consistent ๐ซถ) - If
xis+0(-0),+0(-0) is returned. (it just hands your zero right back to you, respectfully โจ) - If
xis outside the range[-1, 1], a domain error occurs, and a NaN is returned. yeah she's not doing that one ๐ญ
๐ ERRORS ๐
go read math_error(7) if you wanna know how to tell whether an error actually happened when you called these functions โจ
The following errors can occur:
- Domain error:
xis outside the range[-1, 1]โerrnois set toEDOM, and an invalid floating-point exception (FE_INVALID) is raised. ma'am that input is simply not invited ๐ซ
๐ ATTRIBUTES ๐
for an explanation of the terms used in this section, see attributes(7) ๐
- Interface:
asin(),asinf(),asinl()โ Attribute: Thread safety โ Value:MT-Safe๐
thread safety slay!! she's safe to share with all your little threads, bestie ๐ง
โญ STANDARDS โญ
C11, POSIX.1-2008. certified and everything โจ
๐ HISTORY ๐
C99, POSIX.1-2001. she's been around, and she's been thriving ๐
The variant returning double also conforms to SVr4, 4.3BSD, C89. (the double girlie has the longest rรฉsumรฉ, we love a versatile icon ๐)
๐ธ SEE ALSO ๐ธ
acos(3), atan(3), atan2(3), casin(3), cos(3), sin(3), tan(3) โ the whole trig friend group, go say hi ๐ซถ
and that's the whole page bestie!! this was Linux man-pages 6.20, dated 2026-02-08, filed as asin(3) โ mwah, go compute some arcs ๐โจ๐
๐ฆ 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