tzfile.5, tzselect.8: sync from tzdb upstream
[man-pages.git] / man3 / acos.3
blob1628f81254db95cf524b82792ed372ff932fb21e
1 '\" t
2 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
4 .\"     <mtk.manpages@gmail.com>
5 .\"
6 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .\"
8 .\" References consulted:
9 .\"     Linux libc source code
10 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
11 .\"     386BSD man pages
12 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
13 .\" Modified 2002-07-25 by Walter Harms
14 .\"     (walter.harms@informatik.uni-oldenburg.de)
15 .\"
16 .TH acos 3 (date) "Linux man-pages (unreleased)"
17 .SH NAME
18 acos, acosf, acosl \- arc cosine function
19 .SH LIBRARY
20 Math library
21 .RI ( libm ", " \-lm )
22 .SH SYNOPSIS
23 .nf
24 .B #include <math.h>
25 .PP
26 .BI "double acos(double " x );
27 .BI "float acosf(float " x );
28 .BI "long double acosl(long double " x );
29 .fi
30 .PP
31 .RS -4
32 Feature Test Macro Requirements for glibc (see
33 .BR feature_test_macros (7)):
34 .RE
35 .PP
36 .BR acosf (),
37 .BR acosl ():
38 .nf
39     _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
40         || /* Since glibc 2.19: */ _DEFAULT_SOURCE
41         || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
42 .fi
43 .SH DESCRIPTION
44 These functions calculate the arc cosine of
45 .IR x ;
46 that is
47 the value whose cosine is
48 .IR x .
49 .SH RETURN VALUE
50 On success, these functions return the arc cosine of
51 .I x
52 in radians; the return value is in the range [0,\ pi].
53 .PP
55 .I x
56 is a NaN, a NaN is returned.
57 .PP
59 .I x
60 is +1,
61 +0 is returned.
62 .PP
64 .I x
65 is positive infinity or negative infinity,
66 a domain error occurs,
67 and a NaN is returned.
68 .PP
70 .I x
71 is outside the range [\-1,\ 1],
72 a domain error occurs,
73 and a NaN is returned.
74 .SH ERRORS
75 See
76 .BR math_error (7)
77 for information on how to determine whether an error has occurred
78 when calling these functions.
79 .PP
80 The following errors can occur:
81 .TP
82 Domain error: \fIx\fP is outside the range [\-1,\ 1]
83 .I errno
84 is set to
85 .BR EDOM .
86 An invalid floating-point exception
87 .RB ( FE_INVALID )
88 is raised.
89 .SH ATTRIBUTES
90 For an explanation of the terms used in this section, see
91 .BR attributes (7).
92 .ad l
93 .nh
94 .TS
95 allbox;
96 lbx lb lb
97 l l l.
98 Interface       Attribute       Value
100 .BR acos (),
101 .BR acosf (),
102 .BR acosl ()
103 T}      Thread safety   MT-Safe
107 .sp 1
108 .SH STANDARDS
109 C99, POSIX.1-2001, POSIX.1-2008.
111 The variant returning
112 .I double
113 also conforms to
114 SVr4, 4.3BSD.
115 .SH SEE ALSO
116 .BR asin (3),
117 .BR atan (3),
118 .BR atan2 (3),
119 .BR cacos (3),
120 .BR cos (3),
121 .BR sin (3),
122 .BR tan (3)