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 x is a NaN, a NaN is returned. (NaN in, NaN out, the vibes stay consistent ๐Ÿซถ)
  • If x is +0 (-0), +0 (-0) is returned. (it just hands your zero right back to you, respectfully โœจ)
  • If x is 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: x is outside the range [-1, 1] โ€” errno is set to EDOM, 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
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms