]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
fea681da | 2 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
e279ffc3 MK |
3 | .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk |
4 | .\" <mtk.manpages@gmail.com> | |
fea681da | 5 | .\" |
5fbde956 | 6 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
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 | .\" | |
4c1c5274 | 16 | .TH acos 3 (date) "Linux man-pages (unreleased)" |
fea681da MK |
17 | .SH NAME |
18 | acos, acosf, acosl \- arc cosine function | |
2af19291 AC |
19 | .SH LIBRARY |
20 | Math library | |
8fc3b2cf | 21 | .RI ( libm ", " \-lm ) |
fea681da MK |
22 | .SH SYNOPSIS |
23 | .nf | |
24 | .B #include <math.h> | |
68e4db0a | 25 | .PP |
fea681da MK |
26 | .BI "double acos(double " x ); |
27 | .BI "float acosf(float " x ); | |
28 | .BI "long double acosl(long double " x ); | |
29 | .fi | |
68e4db0a | 30 | .PP |
d39ad78f | 31 | .RS -4 |
e279ffc3 MK |
32 | Feature Test Macro Requirements for glibc (see |
33 | .BR feature_test_macros (7)): | |
d39ad78f | 34 | .RE |
68e4db0a | 35 | .PP |
e279ffc3 MK |
36 | .BR acosf (), |
37 | .BR acosl (): | |
9d2adbae | 38 | .nf |
5c10d2c5 | 39 | _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L |
9d2adbae | 40 | || /* Since glibc 2.19: */ _DEFAULT_SOURCE |
75c018a1 | 41 | || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE |
9d2adbae | 42 | .fi |
fea681da | 43 | .SH DESCRIPTION |
5600f73a | 44 | These functions calculate the arc cosine of |
022671eb MK |
45 | .IR x ; |
46 | that is | |
47 | the value whose cosine is | |
48 | .IR x . | |
47297adb | 49 | .SH RETURN VALUE |
e279ffc3 | 50 | On success, these functions return the arc cosine of |
1ae6b2c7 | 51 | .I x |
e279ffc3 | 52 | in radians; the return value is in the range [0,\ pi]. |
847e0d88 | 53 | .PP |
e279ffc3 MK |
54 | If |
55 | .I x | |
56 | is a NaN, a NaN is returned. | |
847e0d88 | 57 | .PP |
e279ffc3 MK |
58 | If |
59 | .I x | |
60 | is +1, | |
61 | +0 is returned. | |
847e0d88 | 62 | .PP |
e279ffc3 MK |
63 | If |
64 | .I x | |
65 | is positive infinity or negative infinity, | |
efe294cb | 66 | a domain error occurs, |
e279ffc3 | 67 | and a NaN is returned. |
847e0d88 | 68 | .PP |
e279ffc3 MK |
69 | If |
70 | .I x | |
71 | is outside the range [\-1,\ 1], | |
efe294cb | 72 | a domain error occurs, |
e279ffc3 | 73 | and a NaN is returned. |
fea681da | 74 | .SH ERRORS |
e279ffc3 MK |
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: | |
fea681da | 81 | .TP |
e279ffc3 MK |
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. | |
44dc6b32 MS |
89 | .SH ATTRIBUTES |
90 | For an explanation of the terms used in this section, see | |
91 | .BR attributes (7). | |
92 | .TS | |
93 | allbox; | |
c466875e | 94 | lbx lb lb |
44dc6b32 MS |
95 | l l l. |
96 | Interface Attribute Value | |
97 | T{ | |
9e54434e BR |
98 | .na |
99 | .nh | |
44dc6b32 MS |
100 | .BR acos (), |
101 | .BR acosf (), | |
102 | .BR acosl () | |
103 | T} Thread safety MT-Safe | |
104 | .TE | |
c466875e | 105 | .sp 1 |
3113c7f3 | 106 | .SH STANDARDS |
4131356c AC |
107 | C11, POSIX.1-2008. |
108 | .SH HISTORY | |
109 | C99, POSIX.1-2001. | |
847e0d88 | 110 | .PP |
e279ffc3 MK |
111 | The variant returning |
112 | .I double | |
113 | also conforms to | |
4131356c | 114 | C89, SVr4, 4.3BSD. |
47297adb | 115 | .SH SEE ALSO |
fea681da MK |
116 | .BR asin (3), |
117 | .BR atan (3), | |
118 | .BR atan2 (3), | |
36268806 | 119 | .BR cacos (3), |
fea681da MK |
120 | .BR cos (3), |
121 | .BR sin (3), | |
122 | .BR tan (3) |