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>
6 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
8 .\" References consulted:
9 .\" Linux libc source code
10 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
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)
16 .TH acos 3 (date) "Linux man-pages (unreleased)"
18 acos, acosf, acosl \- arc cosine function
21 .RI ( libm ", " \-lm )
26 .BI "double acos(double " x );
27 .BI "float acosf(float " x );
28 .BI "long double acosl(long double " x );
32 Feature Test Macro Requirements for glibc (see
33 .BR feature_test_macros (7)):
39 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
40 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
41 || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
44 These functions calculate the arc cosine of
47 the value whose cosine is
50 On success, these functions return the arc cosine of
52 in radians; the return value is in the range [0,\ pi].
56 is a NaN, a NaN is returned.
65 is positive infinity or negative infinity,
66 a domain error occurs,
67 and a NaN is returned.
71 is outside the range [\-1,\ 1],
72 a domain error occurs,
73 and a NaN is returned.
77 for information on how to determine whether an error has occurred
78 when calling these functions.
80 The following errors can occur:
82 Domain error: \fIx\fP is outside the range [\-1,\ 1]
86 An invalid floating-point exception
90 For an explanation of the terms used in this section, see
98 Interface Attribute Value
103 T} Thread safety MT-Safe
109 C99, POSIX.1-2001, POSIX.1-2008.
111 The variant returning