]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/acos.3
man*/: ffix (un-bracket tables)
[thirdparty/man-pages.git] / man3 / acos.3
CommitLineData
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
18acos, acosf, acosl \- arc cosine function
2af19291
AC
19.SH LIBRARY
20Math 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
32Feature 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 44These functions calculate the arc cosine of
022671eb
MK
45.IR x ;
46that is
47the value whose cosine is
48.IR x .
47297adb 49.SH RETURN VALUE
e279ffc3 50On success, these functions return the arc cosine of
1ae6b2c7 51.I x
e279ffc3 52in radians; the return value is in the range [0,\ pi].
847e0d88 53.PP
e279ffc3
MK
54If
55.I x
56is a NaN, a NaN is returned.
847e0d88 57.PP
e279ffc3
MK
58If
59.I x
60is +1,
61+0 is returned.
847e0d88 62.PP
e279ffc3
MK
63If
64.I x
65is positive infinity or negative infinity,
efe294cb 66a domain error occurs,
e279ffc3 67and a NaN is returned.
847e0d88 68.PP
e279ffc3
MK
69If
70.I x
71is outside the range [\-1,\ 1],
efe294cb 72a domain error occurs,
e279ffc3 73and a NaN is returned.
fea681da 74.SH ERRORS
e279ffc3
MK
75See
76.BR math_error (7)
77for information on how to determine whether an error has occurred
78when calling these functions.
79.PP
80The following errors can occur:
fea681da 81.TP
e279ffc3
MK
82Domain error: \fIx\fP is outside the range [\-1,\ 1]
83.I errno
84is set to
85.BR EDOM .
86An invalid floating-point exception
87.RB ( FE_INVALID )
88is raised.
44dc6b32
MS
89.SH ATTRIBUTES
90For an explanation of the terms used in this section, see
91.BR attributes (7).
92.TS
93allbox;
c466875e 94lbx lb lb
44dc6b32
MS
95l l l.
96Interface Attribute Value
97T{
9e54434e
BR
98.na
99.nh
44dc6b32
MS
100.BR acos (),
101.BR acosf (),
102.BR acosl ()
103T} Thread safety MT-Safe
104.TE
c466875e 105.sp 1
3113c7f3 106.SH STANDARDS
4131356c
AC
107C11, POSIX.1-2008.
108.SH HISTORY
109C99, POSIX.1-2001.
847e0d88 110.PP
e279ffc3
MK
111The variant returning
112.I double
113also conforms to
4131356c 114C89, 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)