OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / man3 / acos.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 2002-07-25 by Walter Harms
31 .\"     (walter.harms@informatik.uni-oldenburg.de)
32 .\"
33 .TH ACOS 3  2008-08-05 "" "Linux Programmer's Manual"
34 .SH NAME
35 acos, acosf, acosl \- arc cosine function
36 .SH SYNOPSIS
37 .nf
38 .B #include <math.h>
39 .sp
40 .BI "double acos(double " x );
41 .BI "float acosf(float " x );
42 .BI "long double acosl(long double " x );
43 .fi
44 .sp
45 Link with \fI\-lm\fP.
46 .sp
47 .in -4n
48 Feature Test Macro Requirements for glibc (see
49 .BR feature_test_macros (7)):
50 .in
51 .sp
52 .ad l
53 .BR acosf (),
54 .BR acosl ():
55 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
56 .I cc\ -std=c99
57 .ad b
58 .SH DESCRIPTION
59 The
60 .BR acos ()
61 function calculates the arc cosine of \fIx\fP; that is
62 the value whose cosine is \fIx\fP.
63 .SH "RETURN VALUE"
64 On success, these functions return the arc cosine of
65 .IR x
66 in radians; the return value is in the range [0,\ pi].
67
68 If
69 .I x
70 is a NaN, a NaN is returned.
71
72 If
73 .I x
74 is +1,
75 +0 is returned.
76
77 If
78 .I x
79 is positive infinity or negative infinity,
80 a domain error occurs,
81 and a NaN is returned.
82
83 If
84 .I x
85 is outside the range [\-1,\ 1],
86 a domain error occurs,
87 and a NaN is returned.
88 .SH ERRORS
89 See
90 .BR math_error (7)
91 for information on how to determine whether an error has occurred
92 when calling these functions.
93 .PP
94 The following errors can occur:
95 .TP
96 Domain error: \fIx\fP is outside the range [\-1,\ 1]
97 .I errno
98 is set to
99 .BR EDOM .
100 An invalid floating-point exception
101 .RB ( FE_INVALID )
102 is raised.
103 .SH "CONFORMING TO"
104 C99, POSIX.1-2001.
105 The variant returning
106 .I double
107 also conforms to
108 SVr4, 4.3BSD, C89.
109 .SH "SEE ALSO"
110 .BR asin (3),
111 .BR atan (3),
112 .BR atan2 (3),
113 .BR cacos (3),
114 .BR cos (3),
115 .BR sin (3),
116 .BR tan (3)