Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at carg, cargf, cargl.
Retrieves the argument of a complex number, with a branch cut along the negative real axis.
Syntax
double carg(
_Dcomplex z
);
float carg(
_Fcomplex z
); // C++ only
long double carg(
_Lcomplex z
); // C++ only
float cargf(
_Fcomplex z
);
long double cargl(
_Lcomplex z
);
Parameters
z
A complex number.
Return Value
The argument (also known as the phase) of z. The result is in the interval [−π, +π].
Remarks
Because C++ allows overloading, you can call overloads of carg that take _Fcomplex or _Lcomplex values, and return float or long double values. In a C program, carg always takes a _Dcomplex value and returns a double value.
Requirements
| Routine | C header | C++ header |
|---|---|---|
carg, cargf, cargl |
<complex.h> | <ccomplex> |
For more compatibility information, see Compatibility in the Introduction.
See Also
Alphabetical Function Reference
norm, normf, norml
creal, crealf, creall
cproj, cprojf, cprojl
conj, conjf, conjl
cimag, cimagf, cimagl
cabs, cabsf, cabsl