OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / release / man3 / tan.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 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\"
40 .TH TAN 3 2010-09-11 ""  "Linux Programmer's Manual"
41 .SH 名前
42 tan, tanf, tanl \- 正接(タンジェント)関数
43 .SH 書式
44 .nf
45 .B #include <math.h>
46 .sp
47 .BI "double tan(double " x );
48 .br
49 .BI "float tanf(float " x );
50 .br
51 .BI "long double tanl(long double " x );
52 .fi
53 .sp
54 \fI\-lm\fP でリンクする。
55 .sp
56 .in -4n
57 Feature Test Macro Requirements for glibc (see
58 .BR feature_test_macros (7)):
59 .in
60 .sp
61 .ad l
62 .BR tanf (),
63 .BR tanl ():
64 .RS 4
65 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
66 _POSIX_C_SOURCE\ >=\ 200112L;
67 .br
68 or
69 .I cc\ -std=c99
70 .RE
71 .ad
72 .SH 説明
73 .BR tan ()
74 関数は \fIx\fP の正接(タンジェント)の値を返す。
75 \fIx\fP はラジアン単位で指定する。
76 .SH 返り値
77 成功すると、これらの関数は
78 .I x
79 の正接 (タンジェント) を返す。
80
81 .I x
82 が NaN の場合、NaN が返される。
83
84 .I x
85 が正の無限大か負の無限大の場合、
86 領域エラー (domain error) が発生し、NaN が返される。
87
88 結果がオーバーフローする場合、範囲エラー (range error) が発生し、
89 各関数はそれぞれ
90 .BR HUGE_VAL ,
91 .BR HUGE_VALF ,
92 .B HUGE_VALL
93 を返す。
94 .\" I think overflow can't occur, because the closest floating-point
95 .\" representation of pi/2 is still not close enough to pi/2 to
96 .\" produce a large enough value to overflow.
97 .\" Testing certainly seems to bear this out.  -- mtk, Jul 08
98 .\"
99 .\" POSIX.1 allows an optional underflow error;
100 .\" glibc 2.8 doesn't do this
101 .\" POSIX.1 an optional range error for subnormal x;
102 .\" glibc 2.8 doesn't do this
103 .SH エラー
104 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
105 .BR math_error (7)
106 を参照のこと。
107 .PP
108 以下のエラーが発生する可能性がある。
109 .TP
110 領域エラー (domain error): \fIx\fP は無限大である
111 .I errno
112
113 .B EDOM
114 が設定される (「バグ」の節も参照)。
115 不正 (invalid) 浮動小数点例外
116 .RB ( FE_INVALID )
117 が上がる。
118 .TP
119 範囲エラー (range error): 結果のオーバーフロー
120 .\" Unable to test this case, since the best approximation of
121 .\" pi/2 in double precision only yields a tan() value of 1.633e16.
122 .\" .I errno
123 .\" is set to
124 .\" .BR ERANGE .
125 オーバーフロー浮動小数点例外
126 .RB ( FE_OVERFLOW )
127 が上がる。
128 .SH バグ
129 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=6782
130 バージョン 2.10 より前の glibc の実装では、
131 領域エラーが発生した際に、
132 .I error
133
134 .B EDOM
135 が設定されなかった。
136 .SH 準拠
137 C99, POSIX.1-2001.
138 .I double
139 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
140 .SH 関連項目
141 .BR acos (3),
142 .BR asin (3),
143 .BR atan (3),
144 .BR atan2 (3),
145 .BR cos (3),
146 .BR ctan (3),
147 .BR sin (3)