1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
4 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
5 .\" all rights reserved.
6 .\" Translated 2003-07-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
7 .\" Updated 2005-10-02, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
9 .\"WORD: argument (極座標の)偏角
10 .\"WORD: coordinates 座標
11 .\"WORD: rectangular coordinates 直交座標
12 .\"WORD: polar coordinates 極座標
14 .TH CARG 3 2008-08-06 "" "Linux Programmer's Manual"
17 .\"O carg, cargf, cargl \- calculate the complex argument
18 carg, cargf, cargl \- 複素数の偏角を計算する
21 .B #include <complex.h>
23 .BI "double carg(double complex " z ");"
25 .BI "float cargf(float complex " z ");"
27 .BI "long double cargl(long double complex " z ");"
29 .\"O Link with \fI\-lm\fP.
33 .\"O A complex number can be described by two real coordinates.
34 .\"O One may use rectangular coordinates and gets
40 .\"O where \fIx\ =\ creal(z)\fP and \fIy\ =\ cimag(z)\fP.
41 複素数は 2つの実数値からなる座標で表すことができる。
42 直交座標を使うと、以下のように書くことができる。
48 ここで、\fIx\ =\ creal(z)\fP, \fIy\ =\ cimag(z)\fP である。
50 .\"O Or one may use polar coordinates and gets
53 .\"O z = r * cexp(I * a)
56 .\"O where \fIr\ =\ cabs(z)\fP
57 .\"O is the "radius", the "modulus", the absolute value of \fIz\fP, and
58 .\"O \fIa\ =\ carg(z)\fP
59 .\"O is the "phase angle", the argument of \fIz\fP.
60 また、極座標を使うと、以下のように書くことができる。
67 \fIr\ =\ cabs(z)\fP は「半径」、「係数」であり、
69 \fIa\ =\ carg(z)\fP は「位相角」であり、
76 tan(carg(z)) = cimag(z) / creal(z)
78 .\"O .SH "RETURN VALUE"
80 .\"O The return value is the range of [\-pi,pi].
81 返り値は [\-pi,pi] の範囲である。
84 .\"O These functions first appeared in glibc in version 2.1.
85 これらの関数は glibc バージョン 2.1 で初めて登場した。
86 .\"O .SH "CONFORMING TO"