OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / cos.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-27 by Walter Harms
31 .\"     (walter.harms@informatik.uni-oldenburg.de)
32 .\"
33 .\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa
34 .\"         all rights reserved.
35 .\" Translated Sat, 13 Jul 1996 17:42:24 JST
36 .\"         by Kenji Kajiwara and Kentaro Ogawa
37 .\" Proof Reading: Takashi Yoshino
38 .\" Updated Tue Aug  5 23:16:48 JST 2003
39 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\" Updated & Modified Tue Feb 15 04:17:01 JST 2005
41 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
42 .\" Updated 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
43 .\"
44 .TH COS 3 2010-09-11 ""   "Linux Programmer's Manual"
45 .\"O .SH NAME
46 .SH 名前
47 .\"O cos, cosf, cosl \- cosine function
48 cos, cosf, cosl \- 余弦 (コサイン) 関数
49 .\"O .SH SYNOPSIS
50 .SH 書式
51 .nf
52 .B #include <math.h>
53 .sp
54 .BI "double cos(double " x );
55 .br
56 .BI "float cosf(float " x );
57 .br
58 .BI "long double cosl(long double " x );
59 .fi
60 .sp
61 .\"O Link with \fI\-lm\fP.
62 \fI\-lm\fP でリンクする。
63 .sp
64 .in -4n
65 .\"O Feature Test Macro Requirements for glibc (see
66 .\"O .BR feature_test_macros (7)):
67 glibc 向けの機能検査マクロの要件
68 .RB ( feature_test_macros (7)
69 参照):
70 .in
71 .sp
72 .ad l
73 .BR cosf (),
74 .BR cosl ():
75 .RS 4
76 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
77 _POSIX_C_SOURCE\ >=\ 200112L;
78 .br
79 or
80 .I cc\ -std=c99
81 .RE
82 .ad
83 .\"O .SH DESCRIPTION
84 .SH 説明
85 .\"O The
86 .\"O .BR cos ()
87 .\"O function returns the cosine of \fIx\fP, where \fIx\fP is
88 .\"O given in radians.
89 .BR cos ()
90 関数は \fIx\fP の余弦 (コサイン) の値を返す。
91 \fIx\fP はラジアン単位で指定する。
92 .\"O .SH RETURN VALUE
93 .SH 返り値
94 .\"O On success, these functions return the cosine of
95 .\"O .IR x .
96 成功すると、これらの関数は
97 .I x
98 の余弦を返す。
99
100 .\"O If
101 .\"O .I x
102 .\"O is a NaN, a NaN is returned.
103 .I x
104 が NaN の場合、NaN が返される。
105
106 .\"O If
107 .\"O .I x
108 .\"O is positive infinity or negative infinity,
109 .\"O a domain error occurs,
110 .\"O and a NaN is returned.
111 .I x
112 が正の無限大か負の無限大の場合、
113 領域エラー (domain error) が発生し、NaN が返される。
114 .\"O .SH ERRORS
115 .SH エラー
116 .\"O See
117 .\"O .BR math_error (7)
118 .\"O for information on how to determine whether an error has occurred
119 .\"O when calling these functions.
120 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
121 .BR math_error (7)
122 を参照のこと。
123 .PP
124 .\"O The following errors can occur:
125 以下のエラーが発生する可能性がある。
126 .TP
127 .\"O Domain error: \fIx\fP is an infinity
128 領域エラー (domain error): \fIx\fP が無限大である
129 .\"O .I errno
130 .\"O is set to
131 .\"O .BR EDOM
132 .\"O (but see BUGS).
133 .I errno
134
135 .B EDOM
136 に設定される
137 (「バグ」の節を参照)。
138 .\"O An invalid floating-point exception
139 .\"O .RB ( FE_INVALID )
140 .\"O is raised.
141 無効 (invalid) 浮動小数点例外
142 .RB ( FE_INVALID )
143 が上がる。
144 .\"O .SH "CONFORMING TO"
145 .SH 準拠
146 C99, POSIX.1-2001.
147 .\"O The variant returning
148 .\"O .I double
149 .\"O also conforms to
150 .\"O SVr4, 4.3BSD.
151 .I double
152 版の関数は SVr4, 4.3BSD にも準拠している。
153 .\"O .SH BUGS
154 .SH バグ
155 .\"O Before version 2.10, the glibc implementation did not set
156 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6780
157 .\"O .I errno
158 .\"O to
159 .\"O .B EDOM
160 .\"O when a domain error occurred.
161 バージョン 2.10 より前の glibc の実装では、
162 ドメインエラーが発生した際に、
163 .I errno
164
165 .B EDOM
166 が設定されなかった。
167 .\"O .SH "SEE ALSO"
168 .SH 関連項目
169 .BR acos (3),
170 .BR asin (3),
171 .BR atan (3),
172 .BR atan2 (3),
173 .BR ccos (3),
174 .BR sin (3),
175 .BR sincos (3),
176 .BR tan (3)