OSDN Git Service

(split) LDP man-pages の original/ を v3.29 に更新。
[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  2010-09-20 "" "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 .RS 4
56 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
57 _POSIX_C_SOURCE\ >=\ 200112L;
58 .br
59 or
60 .I cc\ -std=c99
61 .RE
62 .ad b
63 .SH DESCRIPTION
64 The
65 .BR acos ()
66 function calculates the arc cosine of \fIx\fP; that is
67 the value whose cosine is \fIx\fP.
68 .SH "RETURN VALUE"
69 On success, these functions return the arc cosine of
70 .IR x
71 in radians; the return value is in the range [0,\ pi].
72
73 If
74 .I x
75 is a NaN, a NaN is returned.
76
77 If
78 .I x
79 is +1,
80 +0 is returned.
81
82 If
83 .I x
84 is positive infinity or negative infinity,
85 a domain error occurs,
86 and a NaN is returned.
87
88 If
89 .I x
90 is outside the range [\-1,\ 1],
91 a domain error occurs,
92 and a NaN is returned.
93 .SH ERRORS
94 See
95 .BR math_error (7)
96 for information on how to determine whether an error has occurred
97 when calling these functions.
98 .PP
99 The following errors can occur:
100 .TP
101 Domain error: \fIx\fP is outside the range [\-1,\ 1]
102 .I errno
103 is set to
104 .BR EDOM .
105 An invalid floating-point exception
106 .RB ( FE_INVALID )
107 is raised.
108 .SH "CONFORMING TO"
109 C99, POSIX.1-2001.
110 The variant returning
111 .I double
112 also conforms to
113 SVr4, 4.3BSD, C89.
114 .SH "SEE ALSO"
115 .BR asin (3),
116 .BR atan (3),
117 .BR atan2 (3),
118 .BR cacos (3),
119 .BR cos (3),
120 .BR sin (3),
121 .BR tan (3)