Compartilhar via


cimag, cimagf, cimagl

 

The latest version of this topic can be found at cimag, cimagf, cimagl.

Retrieves the imaginary part of a complex number.

Syntax

double cimag(   
   _Dcomplex z   
);  
float cimag(   
   _Fcomplex z   
);  // C++  
long double cimag(   
  _Lcomplex z   
);  // C++  
float cimagf(   
   _Fcomplex z   
);  
long double cimagl(   
   _Lcomplex z   
);  

Parameters

z
A complex number.

Return Value

The imaginary part of z.

Remarks

Because C++ allows overloading, you can call overloads of cimag that take _Fcomplex or _Lcomplex values, and return float or long double values. In a C program, cimag always takes a _Dcomplex value and returns a double value.

Requirements

Routine C header C++ header
cimag, cimagf, cimagl <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
carg, cargf, cargl
cabs, cabsf, cabsl