OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / release / 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 .SH 名前
46 cos, cosf, cosl \- 余弦 (コサイン) 関数
47 .SH 書式
48 .nf
49 .B #include <math.h>
50 .sp
51 .BI "double cos(double " x );
52 .br
53 .BI "float cosf(float " x );
54 .br
55 .BI "long double cosl(long double " x );
56 .fi
57 .sp
58 \fI\-lm\fP でリンクする。
59 .sp
60 .in -4n
61 glibc 向けの機能検査マクロの要件
62 .RB ( feature_test_macros (7)
63 参照):
64 .in
65 .sp
66 .ad l
67 .BR cosf (),
68 .BR cosl ():
69 .RS 4
70 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
71 _POSIX_C_SOURCE\ >=\ 200112L;
72 .br
73 or
74 .I cc\ -std=c99
75 .RE
76 .ad
77 .SH 説明
78 .BR cos ()
79 関数は \fIx\fP の余弦 (コサイン) の値を返す。
80 \fIx\fP はラジアン単位で指定する。
81 .SH 返り値
82 成功すると、これらの関数は
83 .I x
84 の余弦を返す。
85
86 .I x
87 が NaN の場合、NaN が返される。
88
89 .I x
90 が正の無限大か負の無限大の場合、
91 領域エラー (domain error) が発生し、NaN が返される。
92 .SH エラー
93 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
94 .BR math_error (7)
95 を参照のこと。
96 .PP
97 以下のエラーが発生する可能性がある。
98 .TP
99 領域エラー (domain error): \fIx\fP が無限大である
100 .I errno
101
102 .B EDOM
103 に設定される
104 (「バグ」の節を参照)。
105 無効 (invalid) 浮動小数点例外
106 .RB ( FE_INVALID )
107 が上がる。
108 .SH 準拠
109 C99, POSIX.1-2001.
110 .I double
111 版の関数は SVr4, 4.3BSD にも準拠している。
112 .SH バグ
113 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6780
114 バージョン 2.10 より前の glibc の実装では、
115 ドメインエラーが発生した際に、
116 .I errno
117
118 .B EDOM
119 が設定されなかった。
120 .SH 関連項目
121 .BR acos (3),
122 .BR asin (3),
123 .BR atan (3),
124 .BR atan2 (3),
125 .BR ccos (3),
126 .BR sin (3),
127 .BR sincos (3),
128 .BR tan (3)