2 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
4 .\" SPDX-License-Identifier: GPL-1.0-or-later
6 .TH carg 3 (date) "Linux man-pages (unreleased)"
8 carg, cargf, cargl \- calculate the complex argument
11 .RI ( libm ", " \-lm )
14 .B #include <complex.h>
16 .BI "double carg(double complex " z ");"
17 .BI "float cargf(float complex " z ");"
18 .BI "long double cargl(long double complex " z ");"
21 These functions calculate the complex argument (also called phase angle) of
23 with a branch cut along the negative real axis.
25 A complex number can be described by two real coordinates.
26 One may use rectangular coordinates and gets
39 Or one may use polar coordinates and gets
49 is the "radius", the "modulus", the absolute value of
53 is the "phase angle", the argument of
60 tan(carg(z)) = cimag(z) / creal(z)
64 The return value is in the range of [\-pi,pi].
66 These functions were added in glibc 2.1.
68 For an explanation of the terms used in this section, see
76 Interface Attribute Value
81 T} Thread safety MT-Safe
87 C99, POSIX.1-2001, POSIX.1-2008.