1ACOS(3)                    Linux Programmer's Manual                   ACOS(3)
2
3
4

NAME

6       acos, acosf, acosl - arc cosine function
7

SYNOPSIS

9       #include <math.h>
10
11       double acos(double x);
12       float acosf(float x);
13       long double acosl(long double x);
14
15       Link with -lm.
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       acosf(), acosl():
20           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
21               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
22               || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
23

DESCRIPTION

25       These  functions calculate the arc cosine of x; that is the value whose
26       cosine is x.
27

RETURN VALUE

29       On success, these functions return the arc cosine of x in radians;  the
30       return value is in the range [0, pi].
31
32       If x is a NaN, a NaN is returned.
33
34       If x is +1, +0 is returned.
35
36       If  x is positive infinity or negative infinity, a domain error occurs,
37       and a NaN is returned.
38
39       If x is outside the range [-1, 1], a domain error occurs, and a NaN  is
40       returned.
41

ERRORS

43       See  math_error(7) for information on how to determine whether an error
44       has occurred when calling these functions.
45
46       The following errors can occur:
47
48       Domain error: x is outside the range [-1, 1]
49              errno is set  to  EDOM.   An  invalid  floating-point  exception
50              (FE_INVALID) is raised.
51

ATTRIBUTES

53       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
54       tributes(7).
55
56       ┌────────────────────────────────────────────┬───────────────┬─────────┐
57Interface                                   Attribute     Value   
58       ├────────────────────────────────────────────┼───────────────┼─────────┤
59acos(), acosf(), acosl()                    │ Thread safety │ MT-Safe │
60       └────────────────────────────────────────────┴───────────────┴─────────┘
61

CONFORMING TO

63       C99, POSIX.1-2001, POSIX.1-2008.
64
65       The variant returning double also conforms to SVr4, 4.3BSD, C89.
66

SEE ALSO

68       asin(3), atan(3), atan2(3), cacos(3), cos(3), sin(3), tan(3)
69

COLOPHON

71       This page is part of release 5.12 of the Linux  man-pages  project.   A
72       description  of  the project, information about reporting bugs, and the
73       latest    version    of    this    page,    can     be     found     at
74       https://www.kernel.org/doc/man-pages/.
75
76
77
78                                  2021-03-22                           ACOS(3)
Impressum