OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / draft / man3 / atan2.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:50:45 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 2008-09-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
41 .\"
42 .TH ATAN2 3  2008-11-20 "" "Linux Programmer's Manual"
43 .\"O .SH NAME
44 .SH Ì¾Á°
45 .\"O atan2, atan2f, atan2l \- arc tangent function of two variables
46 atan2, atan2f, atan2l \- Æó¤Ä¤ÎÊÑ¿ô¤ËÂФ¹¤ëµÕÀµÀÜ¡Êarc tangent¡Ë´Ø¿ô
47 .\"O .SH SYNOPSIS
48 .SH ½ñ¼°
49 .nf
50 .B #include <math.h>
51
52 .BI "double atan2(double " y ", double " x );
53 .BI "float atan2f(float " y ", float " x );
54 .BI "long double atan2l(long double " y ", long double " x );
55
56 .fi
57 .\"O Link with \fI\-lm\fP.
58 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
59 .sp
60 .in -4n
61 .\"O Feature Test Macro Requirements for glibc (see
62 .\"O .BR feature_test_macros (7)):
63 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
64 .RB ( feature_test_macros (7)
65 »²¾È):
66 .in
67 .sp
68 .ad l
69 .BR atan2f (),
70 .BR atan2l ():
71 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
72 .I cc\ -std=c99
73 .ad b
74 .\"O .SH DESCRIPTION
75 .SH ÀâÌÀ
76 .\"O The
77 .\"O .BR atan2 ()
78 .\"O function calculates the principal value of the arc tangent of
79 .\"O .IR y/x ,
80 .\"O using the signs of the two arguments to determine
81 .\"O the quadrant of the result.
82 .BR atan2 ()
83 ´Ø¿ô¤Ï
84 .I y/x
85 ¤ÎµÕÀµÀÜ (arg tangent) ¤Î¼çÃͤò·×»»¤¹¤ë¡£
86 Æó¤Ä¤Î°ú¤­¿ô¤ÎÉä¹æ¤Ï·ë²Ì¤Î¾Ý¸Â¤ò·èÄꤹ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
87 .\"O .SH "RETURN VALUE"
88 .SH ÊÖ¤êÃÍ
89 .\"O On success, these functions return the principal value of the arc tangent of
90 .\"O .IR y/x
91 .\"O in radians; the return value is in the range [\-pi,\ pi].
92 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
93 .I y/x
94 ¤ÎµÕÀµÀܤμçÃͤò¥é¥¸¥¢¥óñ°Ì¤ÇÊÖ¤¹¡£
95 ÊÖ¤êÃͤϠ[\-pi,\ pi] ¤ÎÈϰϤȤʤ롣
96
97 .\"O If
98 .\"O .I y
99 .\"O is +0 (\-0) and
100 .\"O .I x
101 .\"O is less than 0, +pi (\-pi) is returned.
102 .I y
103 ¤¬ +0 (\-0) ¤Ç
104 .I x
105 ¤¬ 0 Ì¤Ëþ¤Î¾ì¹ç¡¢+pi (\-pi) ¤¬ÊÖ¤µ¤ì¤ë¡£
106
107 .\"O If
108 .\"O .I y
109 .\"O is +0 (\-0) and
110 .\"O .I x
111 .\"O is greater than 0, +0 (\-0) is returned.
112 .I y
113 ¤¬ +0 (\-0) ¤Ç
114 .I x
115 ¤¬ 0 ¤è¤êÂ礭¤¤¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
116
117 .\"O If
118 .\"O .I y
119 .\"O is less than 0 and
120 .\"O .I x
121 .\"O is +0 or \-0, \-pi/2 is returned.
122 .I y
123 ¤¬ 0 Ì¤Ëþ¤Ç
124 .I x
125 ¤¬ +0 ¤« \-0 ¤Î¾ì¹ç¡¢\-pi/2 ¤¬ÊÖ¤µ¤ì¤ë¡£
126
127 .\"O If
128 .\"O .I y
129 .\"O is greater than 0 and
130 .\"O .I x
131 .\"O is +0 or \-0, pi/2 is returned.
132 .I y
133 ¤¬ 0 ¤è¤êÂ礭¤¯
134 .I x
135 ¤¬ +0 ¤« \-0 ¤Î¾ì¹ç¡¢pi/2 ¤¬ÊÖ¤µ¤ì¤ë¡£
136
137 .\" POSIX.1 says:
138 .\" If
139 .\" .I x
140 .\" is 0, a pole error shall not occur.
141 .\"
142 .\"O If either
143 .\"O .I x
144 .\"O or
145 .\"O .I y
146 .\"O is NaN, a NaN is returned.
147 .I x
148 ¤«
149 .I y
150 ¤Î¤¤¤º¤«¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
151
152 .\" POSIX.1 says:
153 .\" If  the  result  underflows, a range error may occur and
154 .\" .I y/x
155 .\" should be returned.
156 .\"
157 .\"O If
158 .\"O .I y
159 .\"O is +0 (\-0) and
160 .\"O .I x
161 .\"O is \-0, +pi (\-pi) is returned.
162 .I y
163 ¤¬ +0 (\-0) ¤Ç
164 .I x
165 ¤¬ \-0 ¤Î¾ì¹ç¡¢+pi (\-pi) ¤¬ÊÖ¤µ¤ì¤ë¡£
166
167 .\"O If
168 .\"O .I y
169 .\"O is +0 (\-0) and
170 .\"O .I x
171 .\"O is +0, +0 (\-0) is returned.
172 .I y
173 ¤¬ +0 (\-0) ¤Ç
174 .I x
175 ¤¬ +0 ¤Î¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
176
177 .\"O If
178 .\"O .I y
179 .\"O is a finite value greater (less) than 0, and
180 .\"O .I x
181 .\"O is negative infinity, +pi (\-pi) is returned.
182 .I y
183 ¤¬ 0 ¤è¤êÂ礭¤¤ (¾®¤µ¤¤) Í­¸ÂÃͤÇ
184 .I x
185 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢+pi (\-pi) ¤¬ÊÖ¤µ¤ì¤ë¡£
186
187 .\"O If
188 .\"O .I y
189 .\"O is a finite value greater (less) than 0, and
190 .\"O .I x
191 .\"O is positive infinity, +0 (\-0) is returned.
192 .I y
193 ¤¬ 0 ¤è¤êÂ礭¤¤ (¾®¤µ¤¤) Í­¸ÂÃͤÇ
194 .I x
195 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
196
197 .\"O If
198 .\"O .I y
199 .\"O is positive infinity (negative infinity), and
200 .\"O .I x
201 .\"O is finite,
202 .\"O pi/2 (\-pi/2) is returned.
203 .I y
204 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
205 .I x
206 ¤¬Í­¸ÂÃͤξì¹ç¡¢pi/2 (\-pi/2) ¤¬ÊÖ¤µ¤ì¤ë¡£
207
208 .\"O If
209 .\"O .I y
210 .\"O is positive infinity (negative infinity) and
211 .\"O .I x
212 .\"O is negative infinity, +3*pi/4 (-3*pi/4) is returned.
213 .I y
214 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
215 .I x
216 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢+3*pi/4 (-3*pi/4) ¤¬ÊÖ¤µ¤ì¤ë¡£
217
218 .\"O If
219 .\"O .I y
220 .\"O is positive infinity (negative infinity) and
221 .\"O .I x
222 .\"O is positive infinity, +pi/4 (-pi/4) is returned.
223 .I y
224 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
225 .I x
226 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢+pi/4 (-pi/4) ¤¬ÊÖ¤µ¤ì¤ë¡£
227 .\"
228 .\" POSIX.1 says:
229 .\" If both arguments are 0, a domain error shall not occur.
230 .\"O .SH ERRORS
231 .SH ¥¨¥é¡¼
232 .\"O No errors occur.
233 ¥¨¥é¡¼¤ÏȯÀ¸¤·¤Ê¤¤¡£
234 .\" POSIX.1 documents an optional underflow error
235 .\" glibc 2.8 does not do this.
236 .\"O .SH "CONFORMING TO"
237 .SH ½àµò
238 C99, POSIX.1-2001.
239 .\"O The variant returning
240 .\"O .I double
241 .\"O also conforms to
242 .\"O SVr4, 4.3BSD, C89.
243 .I double
244 ÈǤδؿô¤Ï SVr4, 4.3BSD, C89 ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
245 .\"O .SH "SEE ALSO"
246 .SH ´ØÏ¢¹àÌÜ
247 .BR acos (3),
248 .BR asin (3),
249 .BR atan (3),
250 .BR carg (3),
251 .BR cos (3),
252 .BR sin (3),
253 .BR tan (3)