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(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600
20       || _ISOC99_SOURCE; or cc -std=c99
21

DESCRIPTION

23       The acos() function calculates the arc cosine of x; that is  the  value
24       whose cosine is x.
25

RETURN VALUE

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

ERRORS

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

CONFORMING TO

51       C99, POSIX.1-2001.  The variant returning double also conforms to SVr4,
52       4.3BSD, C89.
53

SEE ALSO

55       asin(3), atan(3), atan2(3), cacos(3), cos(3), sin(3), tan(3)
56

COLOPHON

58       This  page  is  part of release 3.22 of the Linux man-pages project.  A
59       description of the project, and information about reporting  bugs,  can
60       be found at http://www.kernel.org/doc/man-pages/.
61
62
63
64                                  2008-08-05                           ACOS(3)
Impressum