.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\" .\" 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) .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" 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" .SH 名前 atan2, atan2f, atan2l \- 二つの変数に対する逆正接(arc tangent)関数 .SH 書式 .nf \fB#include \fP \fBdouble atan2(double \fP\fIy\fP\fB, double \fP\fIx\fP\fB);\fP \fBfloat atan2f(float \fP\fIy\fP\fB, float \fP\fIx\fP\fB);\fP \fBlong double atan2l(long double \fP\fIy\fP\fB, long double \fP\fIx\fP\fB);\fP .fi \fI\-lm\fP でリンクする。 .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp .ad l \fBatan2f\fP(), \fBatan2l\fP(): .RS _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or \fIcc\ \-std=c99\fP .RE .ad b .SH 説明 \fBatan2\fP() 関数は \fIy/x\fP の逆正接 (arg tangent) の主値を計算する。 二つの引き数の符号は結果の象限を決定するために使われる。 .SH 返り値 成功すると、これらの関数は \fIy/x\fP の逆正接の主値をラジアン単位で返す。 返り値は [\-pi,\ pi] の範囲となる。 \fIy\fP が +0 (\-0) で \fIx\fP が 0 未満の場合、+pi (\-pi) が返される。 \fIy\fP が +0 (\-0) で \fIx\fP が 0 より大きい場合、+0 (\-0) が返される。 \fIy\fP が 0 未満で \fIx\fP が +0 か \-0 の場合、\-pi/2 が返される。 \fIy\fP が 0 より大きく \fIx\fP が +0 か \-0 の場合、pi/2 が返される。 .\" POSIX.1 says: .\" If .\" .I x .\" is 0, a pole error shall not occur. .\" \fIx\fP か \fIy\fP のいずかが NaN の場合、NaN が返される。 .\" POSIX.1 says: .\" If the result underflows, a range error may occur and .\" .I y/x .\" should be returned. .\" \fIy\fP が +0 (\-0) で \fIx\fP が \-0 の場合、+pi (\-pi) が返される。 \fIy\fP が +0 (\-0) で \fIx\fP が +0 の場合、+0 (\-0) が返される。 \fIy\fP が 0 より大きい (小さい) 有限値で \fIx\fP が負の無限大の場合、+pi (\-pi) が返される。 \fIy\fP が 0 より大きい (小さい) 有限値で \fIx\fP が正の無限大の場合、+0 (\-0) が返される。 \fIy\fP が正の無限大 (負の無限大) で \fIx\fP が有限値の場合、pi/2 (\-pi/2) が返される。 \fIy\fP が正の無限大 (負の無限大) で \fIx\fP が負の無限大の場合、+3*pi/4 (\-3*pi/4) が返される。 .\" .\" POSIX.1 says: .\" If both arguments are 0, a domain error shall not occur. \fIy\fP が正の無限大 (負の無限大) で \fIx\fP が正の無限大の場合、+pi/4 (\-pi/4) が返される。 .SH エラー .\" POSIX.1 documents an optional underflow error .\" glibc 2.8 does not do this. エラーは発生しない。 .SH 準拠 C99, POSIX.1\-2001. \fIdouble\fP 版の関数は SVr4, 4.3BSD, C89 にも準拠している。 .SH 関連項目 \fBacos\fP(3), \fBasin\fP(3), \fBatan\fP(3), \fBcarg\fP(3), \fBcos\fP(3), \fBsin\fP(3), \fBtan\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。