aboutsummaryrefslogtreecommitdiff
path: root/documentation/manual-pages/ja/man3/atan2.3
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/manual-pages/ja/man3/atan2.3')
-rw-r--r--documentation/manual-pages/ja/man3/atan2.3209
1 files changed, 209 insertions, 0 deletions
diff --git a/documentation/manual-pages/ja/man3/atan2.3 b/documentation/manual-pages/ja/man3/atan2.3
new file mode 100644
index 0000000000..c3cd6840d1
--- /dev/null
+++ b/documentation/manual-pages/ja/man3/atan2.3
@@ -0,0 +1,209 @@
+.\" Copyright (c) 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" from: @(#)atan2.3 5.1 (Berkeley) 5/2/91
+.\" %FreeBSD: src/lib/msun/man/atan2.3,v 1.6.2.4 2001/12/17 10:08:36 ru Exp %
+.\"
+.\" $FreeBSD$
+.Dd May 2, 1991
+.Dt ATAN2 3
+.Os
+.Sh 名称
+.Nm atan2 ,
+.Nm atan2f
+.Nd 2 つの変数の逆正接関数
+.Sh ライブラリ
+.Lb libm
+.Sh 書式
+.Fd #include <math.h>
+.Ft double
+.Fn atan2 "double y" "double x"
+.Ft float
+.Fn atan2f "float y" "float x"
+.Sh 解説
+.Fn atan2
+関数と
+.Fn atan2f
+関数は、
+.Fa y/ Ns Ar x
+の逆正接の主値を計算します。その際、
+両方の引数の符号を使用して戻り値の象限を判定します。
+.Pp
+.Sh 戻り値
+.Fn atan2
+関数と
+.Fn atan2f
+関数は、処理が成功すると、範囲
+.Bk -words
+.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi
+.Ek
+のラジアンで、
+.Fa y/ Ns Ar x
+の逆正接を返します。
+.Fa x
+と
+.Fa y
+の両方が 0 の場合、
+グローバル変数
+.Va errno
+が
+.Er EDOM
+に設定されます。
+.Tn VAX
+では次のとおりです。
+.Bl -column atan2_(y,x)_:=____ sign(y)_(Pi_atan2(Xy_xX))___
+.It Fn atan2 y x No := Ta
+.Fn atan y/x Ta
+.Ar x
+> 0
+の場合
+.It Ta sign( Ns Ar y Ns )*(\*(Pi -
+.Fn atan "\\*(Bay/x\\*(Ba" ) Ta
+.Ar x
+< 0
+の場合
+.It Ta
+.No 0 Ta
+x = y = 0
+の場合、
+.It Ta
+.Pf sign( Ar y Ns )*\\*(Pi/2 Ta
+.Ar x
+= 0 \(!=
+.Ar y
+の場合
+.El
+.Sh 注
+関数
+.Fn atan2
+は
+.Tn VAX
+で ``x > 0 の場合''、
+.Fn atan2 0 0
+= 0
+を定義します。以前は
+.Fn atan2 0 0
+はエラーメッセージを生成していた
+可能性があるにもかかわらずです。
+.Fn atan2 0 0
+に値を割り当てる理由は次のとおりです。
+.Bl -enum -offset indent
+.It
+.Fn atan2 0 0
+の計算を回避するために引数をテストするプログラムは、この値に
+無関係である必要があります。これが無効であることを要求するプログラムは、
+さまざまなコンピュータシステム上でこれが無効であることに対するさまざまな
+反応に対し脆弱です。
+.It
+.Fn atan2
+関数は、矩形
+(x,y)
+を、極座標
+.if n\
+(r,theta)
+.if t\
+(r,\(*h)
+に変換するために最も良く使用されます。この座標は、
+.if n\
+r\(**cos theta
+.if t\
+r\(**cos\(*h
+および
+y =
+.if n\
+r\(**sin theta
+.if t\
+r\(**sin\(*h
+を満たします。
+.if n\
+(r,theta)
+.if t\
+これらの等式が
+満たされるのは、(x=0,y=0) が
+.Tn VAX
+で
+.if n \
+(r=0,theta=0)
+.if t \
+(r=0,\(*h=0)
+にマップされるときです。
+一般に、極座標への変換は次のようにして計算する必要があります。
+.Bd -unfilled -offset indent
+.if n \{\
+r := hypot(x,y); ... := sqrt(x\(**x+y\(**y)
+theta := atan2(y,x)
+.\}
+.if t \{\
+r := hypot(x,y); ... := \(sr(x\u\s82\s10\d+y\u\s82\s10\d)
+theta := atan2(y,x)
+.\}
+.\"XX .XX sqrt x*x+y*y
+.Ed
+.It
+上記の公式は、
+.Tn IEEE 754
+に準拠するマシンでは符号付きの 0 および無限に、
+合理的な方法で、対処しようと変更する必要はありません。そのようなマシン用に
+提供されている
+.Xr hypot 3
+と
+.Fn atan2
+はすべてのケースを処理するよう
+設計されています。これがたとえば
+.Fn atan2 \(+-0 \-0
+= \(+-\*(Pi
+である理由です。一般に、
+上記の公式は次のものと同等です。
+.Bd -unfilled -offset indent
+.if n \
+r := sqrt(x\(**x+y\(**y); r =0 の場合は、x := copysign(1,x);
+.if t \
+r := \(sr(x\(**x+y\(**y);\0\0 r =0 の場合は、x := copysign(1,x);
+.Ed
+.El
+.Sh 関連項目
+.Xr acos 3 ,
+.Xr asin 3 ,
+.Xr atan 3 ,
+.Xr cos 3 ,
+.Xr cosh 3 ,
+.Xr math 3 ,
+.Xr sin 3 ,
+.Xr sinh 3 ,
+.Xr tan 3 ,
+.Xr tanh 3
+.Pp
+.Sh 規格
+.Fn atan2
+関数は
+.St -isoC
+に適合しています。
+.\"X kuma