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