OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[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  2010-09-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 .RS
72 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
73 _POSIX_C_SOURCE\ >=\ 200112L;
74 .br
75 or
76 .I cc\ -std=c99
77 .RE
78 .ad b
79 .\"O .SH DESCRIPTION
80 .SH ÀâÌÀ
81 .\"O The
82 .\"O .BR atan2 ()
83 .\"O function calculates the principal value of the arc tangent of
84 .\"O .IR y/x ,
85 .\"O using the signs of the two arguments to determine
86 .\"O the quadrant of the result.
87 .BR atan2 ()
88 ´Ø¿ô¤Ï
89 .I y/x
90 ¤ÎµÕÀµÀÜ (arg tangent) ¤Î¼çÃͤò·×»»¤¹¤ë¡£
91 Æó¤Ä¤Î°ú¤­¿ô¤ÎÉä¹æ¤Ï·ë²Ì¤Î¾Ý¸Â¤ò·èÄꤹ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
92 .\"O .SH "RETURN VALUE"
93 .SH ÊÖ¤êÃÍ
94 .\"O On success, these functions return the principal value of the arc tangent of
95 .\"O .IR y/x
96 .\"O in radians; the return value is in the range [\-pi,\ pi].
97 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
98 .I y/x
99 ¤ÎµÕÀµÀܤμçÃͤò¥é¥¸¥¢¥óñ°Ì¤ÇÊÖ¤¹¡£
100 ÊÖ¤êÃͤϠ[\-pi,\ pi] ¤ÎÈϰϤȤʤ롣
101
102 .\"O If
103 .\"O .I y
104 .\"O is +0 (\-0) and
105 .\"O .I x
106 .\"O is less than 0, +pi (\-pi) is returned.
107 .I y
108 ¤¬ +0 (\-0) ¤Ç
109 .I x
110 ¤¬ 0 Ì¤Ëþ¤Î¾ì¹ç¡¢+pi (\-pi) ¤¬ÊÖ¤µ¤ì¤ë¡£
111
112 .\"O If
113 .\"O .I y
114 .\"O is +0 (\-0) and
115 .\"O .I x
116 .\"O is greater than 0, +0 (\-0) is returned.
117 .I y
118 ¤¬ +0 (\-0) ¤Ç
119 .I x
120 ¤¬ 0 ¤è¤êÂ礭¤¤¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
121
122 .\"O If
123 .\"O .I y
124 .\"O is less than 0 and
125 .\"O .I x
126 .\"O is +0 or \-0, \-pi/2 is returned.
127 .I y
128 ¤¬ 0 Ì¤Ëþ¤Ç
129 .I x
130 ¤¬ +0 ¤« \-0 ¤Î¾ì¹ç¡¢\-pi/2 ¤¬ÊÖ¤µ¤ì¤ë¡£
131
132 .\"O If
133 .\"O .I y
134 .\"O is greater than 0 and
135 .\"O .I x
136 .\"O is +0 or \-0, pi/2 is returned.
137 .I y
138 ¤¬ 0 ¤è¤êÂ礭¤¯
139 .I x
140 ¤¬ +0 ¤« \-0 ¤Î¾ì¹ç¡¢pi/2 ¤¬ÊÖ¤µ¤ì¤ë¡£
141
142 .\" POSIX.1 says:
143 .\" If
144 .\" .I x
145 .\" is 0, a pole error shall not occur.
146 .\"
147 .\"O If either
148 .\"O .I x
149 .\"O or
150 .\"O .I y
151 .\"O is NaN, a NaN is returned.
152 .I x
153 ¤«
154 .I y
155 ¤Î¤¤¤º¤«¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
156
157 .\" POSIX.1 says:
158 .\" If  the  result  underflows, a range error may occur and
159 .\" .I y/x
160 .\" should be returned.
161 .\"
162 .\"O If
163 .\"O .I y
164 .\"O is +0 (\-0) and
165 .\"O .I x
166 .\"O is \-0, +pi (\-pi) is returned.
167 .I y
168 ¤¬ +0 (\-0) ¤Ç
169 .I x
170 ¤¬ \-0 ¤Î¾ì¹ç¡¢+pi (\-pi) ¤¬ÊÖ¤µ¤ì¤ë¡£
171
172 .\"O If
173 .\"O .I y
174 .\"O is +0 (\-0) and
175 .\"O .I x
176 .\"O is +0, +0 (\-0) is returned.
177 .I y
178 ¤¬ +0 (\-0) ¤Ç
179 .I x
180 ¤¬ +0 ¤Î¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
181
182 .\"O If
183 .\"O .I y
184 .\"O is a finite value greater (less) than 0, and
185 .\"O .I x
186 .\"O is negative infinity, +pi (\-pi) is returned.
187 .I y
188 ¤¬ 0 ¤è¤êÂ礭¤¤ (¾®¤µ¤¤) Í­¸ÂÃͤÇ
189 .I x
190 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢+pi (\-pi) ¤¬ÊÖ¤µ¤ì¤ë¡£
191
192 .\"O If
193 .\"O .I y
194 .\"O is a finite value greater (less) than 0, and
195 .\"O .I x
196 .\"O is positive infinity, +0 (\-0) is returned.
197 .I y
198 ¤¬ 0 ¤è¤êÂ礭¤¤ (¾®¤µ¤¤) Í­¸ÂÃͤÇ
199 .I x
200 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
201
202 .\"O If
203 .\"O .I y
204 .\"O is positive infinity (negative infinity), and
205 .\"O .I x
206 .\"O is finite,
207 .\"O pi/2 (\-pi/2) is returned.
208 .I y
209 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
210 .I x
211 ¤¬Í­¸ÂÃͤξì¹ç¡¢pi/2 (\-pi/2) ¤¬ÊÖ¤µ¤ì¤ë¡£
212
213 .\"O If
214 .\"O .I y
215 .\"O is positive infinity (negative infinity) and
216 .\"O .I x
217 .\"O is negative infinity, +3*pi/4 (-3*pi/4) is returned.
218 .I y
219 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
220 .I x
221 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢+3*pi/4 (-3*pi/4) ¤¬ÊÖ¤µ¤ì¤ë¡£
222
223 .\"O If
224 .\"O .I y
225 .\"O is positive infinity (negative infinity) and
226 .\"O .I x
227 .\"O is positive infinity, +pi/4 (-pi/4) is returned.
228 .I y
229 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
230 .I x
231 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢+pi/4 (-pi/4) ¤¬ÊÖ¤µ¤ì¤ë¡£
232 .\"
233 .\" POSIX.1 says:
234 .\" If both arguments are 0, a domain error shall not occur.
235 .\"O .SH ERRORS
236 .SH ¥¨¥é¡¼
237 .\"O No errors occur.
238 ¥¨¥é¡¼¤ÏȯÀ¸¤·¤Ê¤¤¡£
239 .\" POSIX.1 documents an optional underflow error
240 .\" glibc 2.8 does not do this.
241 .\"O .SH "CONFORMING TO"
242 .SH ½àµò
243 C99, POSIX.1-2001.
244 .\"O The variant returning
245 .\"O .I double
246 .\"O also conforms to
247 .\"O SVr4, 4.3BSD, C89.
248 .I double
249 ÈǤδؿô¤Ï SVr4, 4.3BSD, C89 ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
250 .\"O .SH "SEE ALSO"
251 .SH ´ØÏ¢¹àÌÜ
252 .BR acos (3),
253 .BR asin (3),
254 .BR atan (3),
255 .BR carg (3),
256 .BR cos (3),
257 .BR sin (3),
258 .BR tan (3)