cabs, cabsf, cabsl
Visual Studio 2015
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 cabs, cabsf, cabsl.
Retrieves the absolute value of a complex number.
double cabs( _Dcomplex z ); float cabs( _Fcomplex z ); // C++ only long double cabs( _Lcomplex z ); // C++ only float cabsf( _Fcomplex z ); long double cabsl( _Lcomplex z );
Parameters
z
A complex number.
The absolute value of z.
Because C++ allows overloading, you can call overloads of cabs that take _Fcomplex or _Lcomplex values, and return float or long double values. In a C program, cabs always takes a _Dcomplex value and returns a double value.
| Routine | C header | C++ header |
|---|---|---|
cabs, cabsf, cabsl | <complex.h> | <ccomplex> |
For more compatibility information, see Compatibility in the Introduction.
Alphabetical Function Reference
norm, normf, norml
creal, crealf, creall
cproj, cprojf, cprojl
conj, conjf, conjl
cimag, cimagf, cimagl
carg, cargf, cargl
Show: