.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" .\" Japanese Version Copyright (c) 1996 Kenji Kajiwara and Kentaro Ogawa .\" all rights reserved. .\" Translated Sat, 13 Jul 1996 17:50:45 JST .\" by Kenji Kajiwara and Kentaro Ogawa .\" Proof Reading: Takashi Yoshino .\" Updated Tue Aug 5 23:16:48 JST 2003 .\" by Akihiro MOTOKI .\" Updated 2008-09-15, Akihiro MOTOKI .\" .TH ATAN2 3 2010-09-20 "" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O atan2, atan2f, atan2l \- arc tangent function of two variables atan2, atan2f, atan2l \- 二つの変数に対する逆正接(arc tangent)関数 .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .BI "double atan2(double " y ", double " x ); .BI "float atan2f(float " y ", float " x ); .BI "long double atan2l(long double " y ", long double " x ); .fi .\"O Link with \fI\-lm\fP. \fI\-lm\fP でリンクする。 .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR atan2f (), .BR atan2l (): .RS _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .ad b .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR atan2 () .\"O function calculates the principal value of the arc tangent of .\"O .IR y/x , .\"O using the signs of the two arguments to determine .\"O the quadrant of the result. .BR atan2 () 関数は .I y/x の逆正接 (arg tangent) の主値を計算する。 二つの引き数の符号は結果の象限を決定するために使われる。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O On success, these functions return the principal value of the arc tangent of .\"O .IR y/x .\"O in radians; the return value is in the range [\-pi,\ pi]. 成功すると、これらの関数は .I y/x の逆正接の主値をラジアン単位で返す。 返り値は [\-pi,\ pi] の範囲となる。 .\"O If .\"O .I y .\"O is +0 (\-0) and .\"O .I x .\"O is less than 0, +pi (\-pi) is returned. .I y が +0 (\-0) で .I x が 0 未満の場合、+pi (\-pi) が返される。 .\"O If .\"O .I y .\"O is +0 (\-0) and .\"O .I x .\"O is greater than 0, +0 (\-0) is returned. .I y が +0 (\-0) で .I x が 0 より大きい場合、+0 (\-0) が返される。 .\"O If .\"O .I y .\"O is less than 0 and .\"O .I x .\"O is +0 or \-0, \-pi/2 is returned. .I y が 0 未満で .I x が +0 か \-0 の場合、\-pi/2 が返される。 .\"O If .\"O .I y .\"O is greater than 0 and .\"O .I x .\"O is +0 or \-0, pi/2 is returned. .I y が 0 より大きく .I x が +0 か \-0 の場合、pi/2 が返される。 .\" POSIX.1 says: .\" If .\" .I x .\" is 0, a pole error shall not occur. .\" .\"O If either .\"O .I x .\"O or .\"O .I y .\"O is NaN, a NaN is returned. .I x か .I y のいずかが NaN の場合、NaN が返される。 .\" POSIX.1 says: .\" If the result underflows, a range error may occur and .\" .I y/x .\" should be returned. .\" .\"O If .\"O .I y .\"O is +0 (\-0) and .\"O .I x .\"O is \-0, +pi (\-pi) is returned. .I y が +0 (\-0) で .I x が \-0 の場合、+pi (\-pi) が返される。 .\"O If .\"O .I y .\"O is +0 (\-0) and .\"O .I x .\"O is +0, +0 (\-0) is returned. .I y が +0 (\-0) で .I x が +0 の場合、+0 (\-0) が返される。 .\"O If .\"O .I y .\"O is a finite value greater (less) than 0, and .\"O .I x .\"O is negative infinity, +pi (\-pi) is returned. .I y が 0 より大きい (小さい) 有限値で .I x が負の無限大の場合、+pi (\-pi) が返される。 .\"O If .\"O .I y .\"O is a finite value greater (less) than 0, and .\"O .I x .\"O is positive infinity, +0 (\-0) is returned. .I y が 0 より大きい (小さい) 有限値で .I x が正の無限大の場合、+0 (\-0) が返される。 .\"O If .\"O .I y .\"O is positive infinity (negative infinity), and .\"O .I x .\"O is finite, .\"O pi/2 (\-pi/2) is returned. .I y が正の無限大 (負の無限大) で .I x が有限値の場合、pi/2 (\-pi/2) が返される。 .\"O If .\"O .I y .\"O is positive infinity (negative infinity) and .\"O .I x .\"O is negative infinity, +3*pi/4 (-3*pi/4) is returned. .I y が正の無限大 (負の無限大) で .I x が負の無限大の場合、+3*pi/4 (-3*pi/4) が返される。 .\"O If .\"O .I y .\"O is positive infinity (negative infinity) and .\"O .I x .\"O is positive infinity, +pi/4 (-pi/4) is returned. .I y が正の無限大 (負の無限大) で .I x が正の無限大の場合、+pi/4 (-pi/4) が返される。 .\" .\" POSIX.1 says: .\" If both arguments are 0, a domain error shall not occur. .\"O .SH ERRORS .SH エラー .\"O No errors occur. エラーは発生しない。 .\" POSIX.1 documents an optional underflow error .\" glibc 2.8 does not do this. .\"O .SH "CONFORMING TO" .SH 準拠 C99, POSIX.1-2001. .\"O The variant returning .\"O .I double .\"O also conforms to .\"O SVr4, 4.3BSD, C89. .I double 版の関数は SVr4, 4.3BSD, C89 にも準拠している。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR acos (3), .BR asin (3), .BR atan (3), .BR carg (3), .BR cos (3), .BR sin (3), .BR tan (3)