#include <complex.h> double carg(double complex z); float cargf(float complex z); long double cargl(long double complex z);
複素数は 2つの実数値からなる座標で表すことができる。 直交座標を使うと、以下のように書くことができる。
z = x + I * y
where x~=~creal(z) and y~=~cimag(z).
また、極座標を使うと、以下のように書くことができる。
z = r * cexp(I * a)
where r~=~cabs(z) is the "radius", the "modulus", the absolute value of z, and a~=~carg(z) is the "phase angle", the argument of z.
次の関係が成立する:
tan(carg(z)) = cimag(z) / creal(z)
| インターフェース | 属性 | 値 |
| carg(), cargf(), cargl() | Thread safety | MT-Safe |